Title: [202742] trunk/Source/WebInspectorUI
Revision
202742
Author
[email protected]
Date
2016-07-01 10:06:57 -0700 (Fri, 01 Jul 2016)

Log Message

Web Inspector: Make enabling protocol logging in inspector tests easy to remember
https://bugs.webkit.org/show_bug.cgi?id=159323

Patch by Joseph Pecoraro <[email protected]> on 2016-07-01
Reviewed by Brian Burg.

Now you just need to type InspectorTest.debug() or
ProtocolTest.debug() and it will include stderr logging.

* UserInterface/Test/FrontendTestHarness.js:
(FrontendTestHarness.prototype.debug):
* UserInterface/Test/ProtocolTestHarness.js:
(ProtocolTestHarness.prototype.debug):
(ProtocolTestHarness):
* UserInterface/Test/TestHarness.js:
(TestHarness.prototype.debug):

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (202741 => 202742)


--- trunk/Source/WebInspectorUI/ChangeLog	2016-07-01 17:03:27 UTC (rev 202741)
+++ trunk/Source/WebInspectorUI/ChangeLog	2016-07-01 17:06:57 UTC (rev 202742)
@@ -1,3 +1,21 @@
+2016-07-01  Joseph Pecoraro  <[email protected]>
+
+        Web Inspector: Make enabling protocol logging in inspector tests easy to remember
+        https://bugs.webkit.org/show_bug.cgi?id=159323
+
+        Reviewed by Brian Burg.
+
+        Now you just need to type InspectorTest.debug() or
+        ProtocolTest.debug() and it will include stderr logging.
+
+        * UserInterface/Test/FrontendTestHarness.js:
+        (FrontendTestHarness.prototype.debug):
+        * UserInterface/Test/ProtocolTestHarness.js:
+        (ProtocolTestHarness.prototype.debug):
+        (ProtocolTestHarness):
+        * UserInterface/Test/TestHarness.js:
+        (TestHarness.prototype.debug):
+
 2016-06-30  Matt Baker  <[email protected]>
 
         Unreviewed build fix.

Modified: trunk/Source/WebInspectorUI/UserInterface/Test/FrontendTestHarness.js (202741 => 202742)


--- trunk/Source/WebInspectorUI/UserInterface/Test/FrontendTestHarness.js	2016-07-01 17:03:27 UTC (rev 202741)
+++ trunk/Source/WebInspectorUI/UserInterface/Test/FrontendTestHarness.js	2016-07-01 17:06:57 UTC (rev 202742)
@@ -86,6 +86,12 @@
         RuntimeAgent.evaluate.invoke({_expression_, objectGroup: "test", includeCommandLineAPI: false}, callback);
     }
 
+    debug()
+    {
+        this.dumpActivityToSystemConsole = true;
+        InspectorBackend.dumpInspectorProtocolMessages = true;
+    }
+
     // Frontend test-specific methods.
 
     expectNoError(error)

Modified: trunk/Source/WebInspectorUI/UserInterface/Test/ProtocolTestHarness.js (202741 => 202742)


--- trunk/Source/WebInspectorUI/UserInterface/Test/ProtocolTestHarness.js	2016-07-01 17:03:27 UTC (rev 202741)
+++ trunk/Source/WebInspectorUI/UserInterface/Test/ProtocolTestHarness.js	2016-07-01 17:06:57 UTC (rev 202742)
@@ -69,4 +69,10 @@
         else
             return InspectorProtocol.awaitCommand(args);
     }
+
+    debug()
+    {
+        this.dumpActivityToSystemConsole = true;
+        this.dumpInspectorProtocolMessages = true;
+    }
 }

Modified: trunk/Source/WebInspectorUI/UserInterface/Test/TestHarness.js (202741 => 202742)


--- trunk/Source/WebInspectorUI/UserInterface/Test/TestHarness.js	2016-07-01 17:03:27 UTC (rev 202741)
+++ trunk/Source/WebInspectorUI/UserInterface/Test/TestHarness.js	2016-07-01 17:06:57 UTC (rev 202742)
@@ -52,6 +52,11 @@
         throw new Error("Must be implemented by subclasses.");
     }
 
+    debug()
+    {
+        throw new Error("Must be implemented by subclasses.");
+    }
+
     createAsyncSuite(name)
     {
         return new AsyncTestSuite(this, name);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to