Title: [187692] trunk
Revision
187692
Author
[email protected]
Date
2015-07-31 16:57:22 -0700 (Fri, 31 Jul 2015)

Log Message

Web Inspector: Unskip / Unflake inspector tests after r187627
https://bugs.webkit.org/show_bug.cgi?id=147503

Reviewed by Brian Burg.

Source/WebInspectorUI:

* UserInterface/Base/Test.js:
(InspectorTest.completeTest):
(InspectorTest.completeTest.signalCompletionToTestPage): Deleted.
(InspectorTest.testPageDidLoad):
Instead of immediately resending results if completeTest was called
during a reload before the load has completed, we just set a flag
to complete the test when the load completes. This consistently
resends the output to the new page for test output.

(InspectorTest._resendResults):
Delete clear results. If the page had logged anything directly on
the page side (using InspectorTestProxy) this clearMessages would
have deleted those messages and not been able to recreate them.
Clearing messages wasn't really serving a purpose.

LayoutTests:

* TestExpectations:
* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:
Unskip and unflake inspector tests.

* http/tests/inspector/inspector-test.js:
(InspectorTestProxy.addResult):
Simplify with the new append API.

(InspectorTestProxy.clearResults): Deleted.
Delete, as it is no longer used.

* inspector/debugger/probe-manager-add-remove-actions-expected.txt:
Include output that was getting erronously cleared by clearResults
which we removed.

* inspector/dom/highlightSelector-expected.txt:
* inspector/dom/highlightSelector.html:
Make this test more reliable when run with other tests.
Never assume the frame id for the main frame or sub frame,
instead compute them and mask them in the output.

* inspector/dom/resources/highlightSelector-iframe.html: Renamed from LayoutTests/inspector/dom/highlightSelector-iframe.html.
Move the non-test iframe html resource into a sub-folder
so it won't be treated like an actual test.

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (187691 => 187692)


--- trunk/LayoutTests/ChangeLog	2015-07-31 23:56:00 UTC (rev 187691)
+++ trunk/LayoutTests/ChangeLog	2015-07-31 23:57:22 UTC (rev 187692)
@@ -1,5 +1,38 @@
 2015-07-31  Joseph Pecoraro  <[email protected]>
 
+        Web Inspector: Unskip / Unflake inspector tests after r187627
+        https://bugs.webkit.org/show_bug.cgi?id=147503
+
+        Reviewed by Brian Burg.
+
+        * TestExpectations:
+        * platform/mac-wk2/TestExpectations:
+        * platform/mac/TestExpectations:
+        Unskip and unflake inspector tests.
+
+        * http/tests/inspector/inspector-test.js:
+        (InspectorTestProxy.addResult):
+        Simplify with the new append API.
+
+        (InspectorTestProxy.clearResults): Deleted.
+        Delete, as it is no longer used.
+
+        * inspector/debugger/probe-manager-add-remove-actions-expected.txt:
+        Include output that was getting erronously cleared by clearResults
+        which we removed.
+
+        * inspector/dom/highlightSelector-expected.txt:
+        * inspector/dom/highlightSelector.html:
+        Make this test more reliable when run with other tests.
+        Never assume the frame id for the main frame or sub frame,
+        instead compute them and mask them in the output.
+
+        * inspector/dom/resources/highlightSelector-iframe.html: Renamed from LayoutTests/inspector/dom/highlightSelector-iframe.html.
+        Move the non-test iframe html resource into a sub-folder
+        so it won't be treated like an actual test.
+
+2015-07-31  Joseph Pecoraro  <[email protected]>
+
         Unreviewed gardening. Skip more inspector tests on Windows.
 
         It may be that no inspector tests are working on Windows,

Modified: trunk/LayoutTests/TestExpectations (187691 => 187692)


--- trunk/LayoutTests/TestExpectations	2015-07-31 23:56:00 UTC (rev 187691)
+++ trunk/LayoutTests/TestExpectations	2015-07-31 23:57:22 UTC (rev 187692)
@@ -78,27 +78,20 @@
 webkit.org/b/129639 inspector-protocol/dom/dom-search-crash.html [ Skip ]
 webkit.org/b/127414 inspector-protocol/page/deny-X-FrameOption.html [ Pass Failure ]
 
-# These tests cause assertion failures in subsequent tests
-webkit.org/b/131919 inspector/dom [ Skip ]
+webkit.org/b/147502 inspector/debugger/break-on-uncaught-exception-throw-in-promise-rethrow-in-catch.html [ Skip ]
+webkit.org/b/147502 inspector/debugger/break-on-uncaught-exception-throw-in-promise-then-with-catch.html [ Skip ]
+webkit.org/b/147502 inspector/debugger/break-on-uncaught-exception-throw-in-promise-then.html [ Skip ]
+webkit.org/b/147502 inspector/debugger/break-on-uncaught-exception-throw-in-promise-with-catch.html [ Skip ]
+webkit.org/b/147502 inspector/debugger/break-on-uncaught-exception-throw-in-promise.html [ Skip ]
 
-# Disabled the expectations because these tests are also skipped above.
-# webkit.org/b/129817 inspector/dom/content-flow-list.html [ Pass Failure ]
-# webkit.org/b/129817 inspector/dom/content-flow-content-removal.html [ Pass Failure ]
+webkit.org/b/142208 inspector/timeline/debugger-paused-while-recording.html [ Skip ]
+webkit.org/b/142208 inspector/timeline/exception-in-injected-script-while-recording.html [ Skip ]
 
-# These tests still mysteriously flake and/or time out.
-webkit.org/b/137131 inspector/debugger [ Skip ]
 webkit.org/b/137130 inspector/replay [ Skip ]
-webkit.org/b/142208 inspector/timeline [ Skip ]
-inspector/model/remote-object-get-properties.html [ Skip ]
-inspector/model/remote-object-weak-collection.html [ Skip ]
-inspector/model/remote-object.html [ Skip ]
 
 # Doesn't work yet, relies on network replay functionality (webkit.org/b/130728, webkit.org/b/129391)
 webkit.org/b/131318 http/tests/inspector/replay/document-last-modified-fallback-value.html [ Skip ]
 
-webkit.org/b/143719 [ Debug ] inspector/console/console-api.html [ Pass Timeout ]
-webkit.org/b/143719 [ Debug ] inspector/console/console-table.html [ Pass Timeout ]
-
 # Collecting region's children in a named flow not supported yet
 webkit.org/b/74144 fast/regions/flow-body-in-html.html [ Skip ]
 webkit.org/b/74144 fast/regions/universal-selector-children-to-the-same-region.html [ Skip ]

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


--- trunk/LayoutTests/http/tests/inspector/inspector-test.js	2015-07-31 23:56:00 UTC (rev 187691)
+++ trunk/LayoutTests/http/tests/inspector/inspector-test.js	2015-07-31 23:57:22 UTC (rev 187692)
@@ -131,16 +131,8 @@
         this._resultElement.id = "output";
         document.body.appendChild(this._resultElement);
     }
-    this._resultElement.appendChild(document.createTextNode(text));
-    this._resultElement.appendChild(document.createElement("br"));
-}
 
-InspectorTestProxy.clearResults = function()
-{
-    if (this._resultElement) {
-        this._resultElement.parentNode.removeChild(this._resultElement);
-        delete this._resultElement;
-    }
+    this._resultElement.append(text, document.createElement("br"));
 }
 
 InspectorTestProxy.needToSanitizeUncaughtExceptionURLs = false;

Modified: trunk/LayoutTests/inspector/debugger/probe-manager-add-remove-actions-expected.txt (187691 => 187692)


--- trunk/LayoutTests/inspector/debugger/probe-manager-add-remove-actions-expected.txt	2015-07-31 23:56:00 UTC (rev 187691)
+++ trunk/LayoutTests/inspector/debugger/probe-manager-add-remove-actions-expected.txt	2015-07-31 23:57:22 UTC (rev 187692)
@@ -1,5 +1,6 @@
 Testing that the probe manager properly handles addition and removal of related probes.
 
+inside breakpointActions a:(12) b:([object Object])
 Breakpoint autocontinue state changed: true
 Probe set was added. New count: 1
 Probe with identifier 1 was added to probe set.

Modified: trunk/LayoutTests/inspector/dom/highlightSelector-expected.txt (187691 => 187692)


--- trunk/LayoutTests/inspector/dom/highlightSelector-expected.txt	2015-07-31 23:56:00 UTC (rev 187691)
+++ trunk/LayoutTests/inspector/dom/highlightSelector-expected.txt	2015-07-31 23:57:22 UTC (rev 187692)
@@ -1,6 +1,6 @@
 
 SELECTOR: div
-FRAMEID: 0.1
+FRAMEID: <main-frame-id>
 FOUND: 3
 [
   {
@@ -303,7 +303,7 @@
 
 
 SELECTOR: .class-one
-FRAMEID: 0.1
+FRAMEID: <main-frame-id>
 FOUND: 2
 [
   {
@@ -508,7 +508,7 @@
 
 
 SELECTOR: #id-one
-FRAMEID: 0.1
+FRAMEID: <main-frame-id>
 FOUND: 1
 [
   {
@@ -614,7 +614,7 @@
 
 
 SELECTOR: .class-one, .class-two
-FRAMEID: 0.1
+FRAMEID: <main-frame-id>
 FOUND: 3
 [
   {
@@ -1025,22 +1025,22 @@
 
 PASS: Expected error: No frame for given id found
 SELECTOR: div
-FRAMEID: 0.2
+FRAMEID: x.x
 
 
 SELECTOR: .no-elements
-FRAMEID: 0.1
+FRAMEID: <main-frame-id>
 FOUND: 0
 []
 
 
 PASS: Expected error: DOM Error while querying
 SELECTOR: $%foobar
-FRAMEID: 0.1
+FRAMEID: <main-frame-id>
 
 
 SELECTOR: div
-FRAMEID: 0.3
+FRAMEID: <child-frame-id>
 FOUND: 2
 [
   {
@@ -1243,7 +1243,7 @@
 
 
 SELECTOR: #id-one
-FRAMEID: 0.3
+FRAMEID: <child-frame-id>
 FOUND: 1
 [
   {

Deleted: trunk/LayoutTests/inspector/dom/highlightSelector-iframe.html (187691 => 187692)


--- trunk/LayoutTests/inspector/dom/highlightSelector-iframe.html	2015-07-31 23:56:00 UTC (rev 187691)
+++ trunk/LayoutTests/inspector/dom/highlightSelector-iframe.html	2015-07-31 23:57:22 UTC (rev 187692)
@@ -1,8 +0,0 @@
-<html>
-    <head>
-    </head>
-    <body>
-        <div id="id-one"></div>
-        <div></div>
-    </body>
-</html>
\ No newline at end of file

Modified: trunk/LayoutTests/inspector/dom/highlightSelector.html (187691 => 187692)


--- trunk/LayoutTests/inspector/dom/highlightSelector.html	2015-07-31 23:56:00 UTC (rev 187691)
+++ trunk/LayoutTests/inspector/dom/highlightSelector.html	2015-07-31 23:57:22 UTC (rev 187692)
@@ -4,18 +4,36 @@
 <script>
 function test() {
     var testcases = [
-        {'frameId': '0.1', 'selector': 'div'},
-        {'frameId': '0.1', 'selector': '.class-one'},
-        {'frameId': '0.1', 'selector': '#id-one'},
-        {'frameId': '0.1', 'selector': '.class-one, .class-two'},
+        {'frameId': 'MAINFRAME', 'selector': 'div'},
+        {'frameId': 'MAINFRAME', 'selector': '.class-one'},
+        {'frameId': 'MAINFRAME', 'selector': '#id-one'},
+        {'frameId': 'MAINFRAME', 'selector': '.class-one, .class-two'},
         {'selector': 'iframe.class-one'}, // No frame ID.
-        {'frameId': '0.2', 'selector': 'div', "error": true}, // Non-existing frame ID.
-        {'frameId': '0.1', 'selector': '.no-elements'}, // Non-matching selector.
-        {'frameId': '0.1', 'selector': '$%foobar', "error": true}, // Invalid selector.
-        {'frameId': '0.3', 'selector': 'div'},
-        {'frameId': '0.3', 'selector': '#id-one'},
+        {'frameId': 'x.x', 'selector': 'div', "error": true}, // Non-existing frame ID.
+        {'frameId': 'MAINFRAME', 'selector': '.no-elements'}, // Non-matching selector.
+        {'frameId': 'MAINFRAME', 'selector': '$%foobar', "error": true}, // Invalid selector.
+        {'frameId': 'CHILDFRAME', 'selector': 'div'},
+        {'frameId': 'CHILDFRAME', 'selector': '#id-one'},
     ];
 
+    InspectorTest.assert(WebInspector.frameResourceManager.mainFrame.childFrames.length === 1);
+    var mainFrameId = WebInspector.frameResourceManager.mainFrame.id;
+    var childFrameId = WebInspector.frameResourceManager.mainFrame.childFrames[0].id;
+    for (var test of testcases) {
+        if (test.frameId === "MAINFRAME")
+            test.frameId = mainFrameId;
+        else if (test.frameId === "CHILDFRAME")
+            test.frameId = childFrameId;
+    }
+
+    function displayNameForFrameId(frameId) {
+        if (frameId === mainFrameId)
+            return "<main-frame-id>";
+        if (frameId === childFrameId)
+            return "<child-frame-id>";
+        return frameId;
+    }
+
     function getHighlightObjectForSelector(selector, frameId, errorExpected, callback) {
         var highlightConfig = {
             showInfo: true,
@@ -56,7 +74,7 @@
 
         getHighlightObjectForSelector(testcase.selector, testcase.frameId, testcase.error, function(payload) {
             InspectorTest.log("SELECTOR: " + testcase.selector);
-            InspectorTest.log("FRAMEID: " + testcase.frameId);
+            InspectorTest.log("FRAMEID: " + displayNameForFrameId(testcase.frameId));
 
             if (payload) {
                 InspectorTest.log("FOUND: " + payload.length);
@@ -80,7 +98,7 @@
     <div>
         <div class="class-one"></div>
         <div id="id-one" class="class-two"></div>
-        <iframe class="class-one" src=""
+        <iframe class="class-one" src=""
     </div>
 </body>
-</html>
\ No newline at end of file
+</html>

Copied: trunk/LayoutTests/inspector/dom/resources/highlightSelector-iframe.html (from rev 187691, trunk/LayoutTests/inspector/dom/highlightSelector-iframe.html) (0 => 187692)


--- trunk/LayoutTests/inspector/dom/resources/highlightSelector-iframe.html	                        (rev 0)
+++ trunk/LayoutTests/inspector/dom/resources/highlightSelector-iframe.html	2015-07-31 23:57:22 UTC (rev 187692)
@@ -0,0 +1,8 @@
+<html>
+    <head>
+    </head>
+    <body>
+        <div id="id-one"></div>
+        <div></div>
+    </body>
+</html>
\ No newline at end of file

Modified: trunk/LayoutTests/platform/mac/TestExpectations (187691 => 187692)


--- trunk/LayoutTests/platform/mac/TestExpectations	2015-07-31 23:56:00 UTC (rev 187691)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2015-07-31 23:57:22 UTC (rev 187692)
@@ -1083,10 +1083,6 @@
 
 webkit.org/b/136994 http/tests/media/hls/video-cookie.html [ Failure ]
 
-# Some inspector tests failing after r173992
-webkit.org/b/137157 [ Release ] inspector/page/main-frame-resource.html [ Pass Failure ]
-[ Debug ] inspector/page/main-frame-resource.html [ Pass Failure Slow ]
-
 webkit.org/b/137505 media/track/track-forced-subtitles-in-band.html [ Failure Pass Timeout ]
 
 # FIXME: Needs bugzilla (<rdar://problem/15971968>)
@@ -1169,16 +1165,6 @@
 # FIXME: Needs bugzilla (<rdar://problem/18273139>)
 [ Yosemite+ ] storage/websql/sql-error-codes.html [ Failure ]
 
-# Also, these tests are flaky in Debug/Release builds, <https://bugs.webkit.org/show_bug.cgi?id=138636>
-# and <https://bugs.webkit.org/show_bug.cgi?id=129817>.
-[ Yosemite+ ] inspector/css/matched-style-properties.html [ Pass Timeout ]
-[ Yosemite+ ] inspector/css/pseudo-element-matches.html [ Pass Timeout ]
-[ Yosemite+ ] inspector/css/selector-specificity.html [ Pass Timeout Crash ]
-[ Yosemite+ ] inspector/dom/content-flow-content-removal.html [ Skip ]
-[ Yosemite+ ] inspector/dom/content-flow-list.html [ Skip ]
-[ Yosemite+ ] inspector/model/parse-script-syntax-tree.html [ Pass Timeout ]
-[ Yosemite+ ] inspector/test-harness-trivially-works.html [ Skip ]
-
 # Specific to Yosemite's font fallback
 webkit.org/b/138328 [ Mavericks ] platform/mac/fast/text/font-cursive-italic-cjk.html [ Skip ]
 
@@ -1233,12 +1219,6 @@
 # Sometimes has an extra space at the end
 fast/forms/focus-selection-textarea.html [ Pass Failure ]
 
-# webkit.org/b/141252 [ Release Yosemite+ ] inspector/css/selector-dynamic-specificity.html [ Slow ]
-# webkit.org/b/141252 [ Debug Yosemite+ ] inspector/css/selector-dynamic-specificity.html [ Pass Timeout ]
-webkit.org/b/141118 inspector/css/selector-dynamic-specificity.html [ Skip ]
-
-webkit.org/b/141601 inspector/css/stylesheet-with-mutations.html [ Skip ]
-
 webkit.org/b/141534 [ Yosemite ] media/video-load-networkState.html [ Pass Crash ]
 
 webkit.org/b/142726 [ Yosemite+ ] fast/images/animated-png.html [ ImageOnlyFailure ]

Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (187691 => 187692)


--- trunk/LayoutTests/platform/mac-wk2/TestExpectations	2015-07-31 23:56:00 UTC (rev 187691)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations	2015-07-31 23:57:22 UTC (rev 187692)
@@ -244,8 +244,6 @@
 
 webkit.org/b/147075 [ Release Yosemite ] http/tests/cache/disk-cache/disk-cache-disable.html [ Pass Failure ]
 
-webkit.org/b/143548 [ Debug Yosemite ] inspector/console/command-line-api.html [ Slow ]
-
 webkit.org/b/147300 platform/mac-wk2/tiled-drawing/scrolling/frames/frameset-frame-scrollability.html [ Pass Failure ]
 webkit.org/b/147300 platform/mac-wk2/tiled-drawing/scrolling/frames/frameset-nested-frame-scrollability.html [ Pass Failure ]
 
@@ -516,8 +514,6 @@
 
 webkit.org/b/145702 [ Debug Yosemite ] http/tests/misc/acid3.html [ Pass Timeout ]
 
-webkit.org/b/147229 [ Yosemite ] inspector/css/modify-rule-selector.html [ Pass Timeout ]
-
 ### END OF (7) New WebKit2-only failures in Yosemite
 ########################################
 

Modified: trunk/Source/WebInspectorUI/ChangeLog (187691 => 187692)


--- trunk/Source/WebInspectorUI/ChangeLog	2015-07-31 23:56:00 UTC (rev 187691)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-07-31 23:57:22 UTC (rev 187692)
@@ -1,3 +1,25 @@
+2015-07-31  Joseph Pecoraro  <[email protected]>
+
+        Web Inspector: Unskip / Unflake inspector tests after r187627
+        https://bugs.webkit.org/show_bug.cgi?id=147503
+
+        Reviewed by Brian Burg.
+
+        * UserInterface/Base/Test.js:
+        (InspectorTest.completeTest):
+        (InspectorTest.completeTest.signalCompletionToTestPage): Deleted.
+        (InspectorTest.testPageDidLoad):
+        Instead of immediately resending results if completeTest was called
+        during a reload before the load has completed, we just set a flag
+        to complete the test when the load completes. This consistently
+        resends the output to the new page for test output.
+        
+        (InspectorTest._resendResults):
+        Delete clear results. If the page had logged anything directly on
+        the page side (using InspectorTestProxy) this clearMessages would
+        have deleted those messages and not been able to recreate them.
+        Clearing messages wasn't really serving a purpose.
+
 2015-07-31  Brian J. Burg  <[email protected]>
 
         Web Inspector: Convert timeline view classes to ES6 classes

Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Test.js (187691 => 187692)


--- trunk/Source/WebInspectorUI/UserInterface/Base/Test.js	2015-07-31 23:56:00 UTC (rev 187691)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Test.js	2015-07-31 23:57:22 UTC (rev 187692)
@@ -168,16 +168,14 @@
     if (InspectorTest.dumpMessagesToConsole)
         InspectorFrontendHost.unbufferedLog("InspectorTest.completeTest()");
 
-    function signalCompletionToTestPage() {
-        InspectorBackend.runAfterPendingDispatches(this.evaluateInPage.bind(this, "InspectorTestProxy.completeTest()"));
-    }
-
     // Wait for results to be resent before requesting completeTest(). Otherwise, messages will be
     // queued after pending dispatches run to zero and the test page will quit before processing them.
-    if (this._shouldResendResults)
-        this._resendResults(signalCompletionToTestPage.bind(this));
-    else
-        signalCompletionToTestPage.call(this);
+    if (this._testPageIsReloading) {
+        this._completeTestAfterReload = true;
+        return;
+    }
+
+    InspectorBackend.runAfterPendingDispatches(this.evaluateInPage.bind(this, "InspectorTestProxy.completeTest()"));
 }
 
 InspectorTest.evaluateInPage = function(codeString, callback)
@@ -203,21 +201,13 @@
         this.evaluateInPage("InspectorTestProxy.addResult(unescape('" + escape(text) + "'))");
 }
 
-InspectorTest._resendResults = function(callback)
+InspectorTest._resendResults = function()
 {
     console.assert(this._shouldResendResults);
-    delete this._shouldResendResults;
+    this._shouldResendResults = false;
 
-    var pendingResponseCount = 1 + this._results.length;
-    function decrementPendingResponseCount() {
-        pendingResponseCount--;
-        if (!pendingResponseCount && typeof callback === "function")
-            callback();
-    }
-
-    this.evaluateInPage("InspectorTestProxy.clearResults()", decrementPendingResponseCount);
     for (var result of this._results)
-        this.evaluateInPage("InspectorTestProxy.addResult(unescape('" + escape(result) + "'))", decrementPendingResponseCount);
+        this.evaluateInPage("InspectorTestProxy.addResult(unescape('" + escape(result) + "'))");
 }
 
 InspectorTest.testPageDidLoad = function()
@@ -226,6 +216,9 @@
     this._resendResults();
 
     this.eventDispatcher.dispatchEvent(InspectorTest.EventDispatcher.Event.TestPageDidLoad);
+
+    if (this._completeTestAfterReload)
+        InspectorTest.completeTest();
 }
 
 InspectorTest.reloadPage = function(shouldIgnoreCache)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to