Title: [89556] trunk
Revision
89556
Author
zherc...@webkit.org
Date
2011-06-23 05:02:58 -0700 (Thu, 23 Jun 2011)

Log Message

Inspector may close at the start of the next inspector test in DRT
https://bugs.webkit.org/show_bug.cgi?id=60881

Patch by Zoltan Herczeg <zherc...@inf.u-szeged.hu> on 2011-06-23
Reviewed by Pavel Feldman.

Source/WebCore: 

Add a new function to the inspector, which tests whether the
dispatch queue is empty.

* inspector/front-end/inspector.js:
(WebInspector.dispatchQueueIsEmpty):

LayoutTests: 

The didEvaluateForTestInFrontend function call is postponed until
all messages in the dispatch queue is processed.

* http/tests/inspector/inspector-test.js:
(initialize_InspectorTest.InspectorTest.completeTest):

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (89555 => 89556)


--- trunk/LayoutTests/ChangeLog	2011-06-23 11:52:15 UTC (rev 89555)
+++ trunk/LayoutTests/ChangeLog	2011-06-23 12:02:58 UTC (rev 89556)
@@ -1,3 +1,16 @@
+2011-06-23  Zoltan Herczeg  <zherc...@inf.u-szeged.hu>
+
+        Reviewed by Pavel Feldman.
+
+        Inspector may close at the start of the next inspector test in DRT
+        https://bugs.webkit.org/show_bug.cgi?id=60881
+
+        The didEvaluateForTestInFrontend function call is postponed until
+        all messages in the dispatch queue is processed.
+
+        * http/tests/inspector/inspector-test.js:
+        (initialize_InspectorTest.InspectorTest.completeTest):
+
 2011-06-23  Sergio Villar Senin  <svil...@igalia.com>
 
         Unreviewed, final round of baselines for the new CSS2.1 tests added in r88913.

Modified: trunk/LayoutTests/http/tests/inspector/inspector-test.js (89555 => 89556)


--- trunk/LayoutTests/http/tests/inspector/inspector-test.js	2011-06-23 11:52:15 UTC (rev 89555)
+++ trunk/LayoutTests/http/tests/inspector/inspector-test.js	2011-06-23 12:02:58 UTC (rev 89556)
@@ -14,7 +14,15 @@
 
 InspectorTest.completeTest = function()
 {
-    RuntimeAgent.evaluate("didEvaluateForTestInFrontend(" + InspectorTest.completeTestCallId + ", \"\")", "test");
+    function testDispatchQueueIsEmpty() {
+        if (!WebInspector.dispatchQueueIsEmpty()) {
+            // Wait for unprocessed messages.
+            setTimeout(testDispatchQueueIsEmpty, 10);
+            return;
+        }
+        RuntimeAgent.evaluate("didEvaluateForTestInFrontend(" + InspectorTest.completeTestCallId + ", \"\")", "test");
+    }
+    testDispatchQueueIsEmpty();
 }
 
 InspectorTest.evaluateInConsole = function(code, callback)

Modified: trunk/Source/WebCore/ChangeLog (89555 => 89556)


--- trunk/Source/WebCore/ChangeLog	2011-06-23 11:52:15 UTC (rev 89555)
+++ trunk/Source/WebCore/ChangeLog	2011-06-23 12:02:58 UTC (rev 89556)
@@ -1,3 +1,16 @@
+2011-06-23  Zoltan Herczeg  <zherc...@inf.u-szeged.hu>
+
+        Reviewed by Pavel Feldman.
+
+        Inspector may close at the start of the next inspector test in DRT
+        https://bugs.webkit.org/show_bug.cgi?id=60881
+
+        Add a new function to the inspector, which tests whether the
+        dispatch queue is empty.
+
+        * inspector/front-end/inspector.js:
+        (WebInspector.dispatchQueueIsEmpty):
+
 2011-06-23  Jeffrey Pfau  <jp...@apple.com>
 
         Reviewed by Nikolas Zimmermann.

Modified: trunk/Source/WebCore/inspector/front-end/inspector.js (89555 => 89556)


--- trunk/Source/WebCore/inspector/front-end/inspector.js	2011-06-23 11:52:15 UTC (rev 89555)
+++ trunk/Source/WebCore/inspector/front-end/inspector.js	2011-06-23 12:02:58 UTC (rev 89556)
@@ -537,6 +537,10 @@
 
 var messagesToDispatch = [];
 
+WebInspector.dispatchQueueIsEmpty = function() {
+    return messagesToDispatch.length == 0;
+}
+
 WebInspector.dispatch = function(message) {
     messagesToDispatch.push(message);
     setTimeout(function() {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to