Title: [141100] trunk/LayoutTests
Revision
141100
Author
commit-qu...@webkit.org
Date
2013-01-29 04:57:04 -0800 (Tue, 29 Jan 2013)

Log Message

Web Inspector: in inspector-protocol tests do not swallow errors
https://bugs.webkit.org/show_bug.cgi?id=108087

Patch by Peter Rybin <peter.ry...@gmail.com> on 2013-01-29
Reviewed by Pavel Feldman.
Additional checks are added. Debuggee is more aggressive at
when to kill the test.

* http/tests/inspector-protocol/resources/InspectorTest.js:
* http/tests/inspector-protocol/resources/protocol-test.js:
(runTest):

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (141099 => 141100)


--- trunk/LayoutTests/ChangeLog	2013-01-29 12:54:00 UTC (rev 141099)
+++ trunk/LayoutTests/ChangeLog	2013-01-29 12:57:04 UTC (rev 141100)
@@ -1,3 +1,16 @@
+2013-01-29  Peter Rybin  <peter.ry...@gmail.com>
+
+        Web Inspector: in inspector-protocol tests do not swallow errors
+        https://bugs.webkit.org/show_bug.cgi?id=108087
+
+        Reviewed by Pavel Feldman.
+        Additional checks are added. Debuggee is more aggressive at
+        when to kill the test.
+
+        * http/tests/inspector-protocol/resources/InspectorTest.js:
+        * http/tests/inspector-protocol/resources/protocol-test.js:
+        (runTest):
+
 2013-01-29  Andrey Adaikin  <aand...@chromium.org>
 
         Web Inspector: [Canvas] support instrumenting canvases in iframes (backend side)

Modified: trunk/LayoutTests/http/tests/inspector-protocol/resources/InspectorTest.js (141099 => 141100)


--- trunk/LayoutTests/http/tests/inspector-protocol/resources/InspectorTest.js	2013-01-29 12:54:00 UTC (rev 141099)
+++ trunk/LayoutTests/http/tests/inspector-protocol/resources/InspectorTest.js	2013-01-29 12:57:04 UTC (rev 141100)
@@ -94,6 +94,7 @@
         eval(event.data);
     } catch (e) {
         alert(e.stack);
+        InspectorTest.completeTest();
         throw e;
     }
 });

Modified: trunk/LayoutTests/http/tests/inspector-protocol/resources/protocol-test.js (141099 => 141100)


--- trunk/LayoutTests/http/tests/inspector-protocol/resources/protocol-test.js	2013-01-29 12:54:00 UTC (rev 141099)
+++ trunk/LayoutTests/http/tests/inspector-protocol/resources/protocol-test.js	2013-01-29 12:57:04 UTC (rev 141100)
@@ -83,8 +83,15 @@
 
     var url = "" + "/protocol-test.html";
     var inspectorFrontend = window.internals.openDummyInspectorFrontend(url);
-
     inspectorFrontend.addEventListener("load", function(event) {
-        inspectorFrontend.postMessage("(" + test.toString() +")();", "*");
+        // FIXME: rename this 'test' global field across all tests.
+        var testFunction = window.test;
+        if (typeof testFunction === "function") {
+	        inspectorFrontend.postMessage("(" + testFunction.toString() +")();", "*");
+            return;
+        }
+        // Kill waiting process if failed to send.
+        alert("Failed to send test function");
+        testRunner.notifyDone();
     });
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to