Title: [250956] trunk/LayoutTests
Revision
250956
Author
[email protected]
Date
2019-10-09 22:28:18 -0700 (Wed, 09 Oct 2019)

Log Message

LayoutTest inspector/dom-debugger/node-removed.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=154610
<rdar://problem/24801209>

Reviewed by Matt Baker.

Reenabled the test on all platforms.

The test was missing call to Debugger.setBreakpointsActive. Apparently at the time
it was written calling Debugger.setBreakpoint automatically activated breakpoint but
the behavior changed over time. I also removed some unnecessary code.

* inspector/dom-debugger/node-removed-expected.txt:
* inspector/dom-debugger/node-removed.html:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (250955 => 250956)


--- trunk/LayoutTests/ChangeLog	2019-10-10 05:12:58 UTC (rev 250955)
+++ trunk/LayoutTests/ChangeLog	2019-10-10 05:28:18 UTC (rev 250956)
@@ -1,3 +1,22 @@
+2019-10-09  Yury Semikhatsky  <[email protected]>
+
+        LayoutTest inspector/dom-debugger/node-removed.html is flaky
+        https://bugs.webkit.org/show_bug.cgi?id=154610
+        <rdar://problem/24801209>
+
+        Reviewed by Matt Baker.
+
+        Reenabled the test on all platforms.
+
+        The test was missing call to Debugger.setBreakpointsActive. Apparently at the time
+        it was written calling Debugger.setBreakpoint automatically activated breakpoint but
+        the behavior changed over time. I also removed some unnecessary code.
+
+        * inspector/dom-debugger/node-removed-expected.txt:
+        * inspector/dom-debugger/node-removed.html:
+        * platform/gtk/TestExpectations:
+        * platform/mac/TestExpectations:
+
 2019-10-09  Myles C. Maxfield  <[email protected]>
 
         Make fast/text/complex-initial-advance.html more robust

Modified: trunk/LayoutTests/inspector/dom-debugger/node-removed-expected.txt (250955 => 250956)


--- trunk/LayoutTests/inspector/dom-debugger/node-removed-expected.txt	2019-10-10 05:12:58 UTC (rev 250955)
+++ trunk/LayoutTests/inspector/dom-debugger/node-removed-expected.txt	2019-10-10 05:28:18 UTC (rev 250956)
@@ -1,6 +1,6 @@
 Testing that DOM.childNodeRemoved is correctly triggered even when the element is moved while paused in the debugger on a DOMDebugger "node-removed" breakpoint.
 
-Found <script>
+Created output element.
 Stopped on DOM breakpoint
 PASS: onChildNodeRemoved called for #target_element
 PASS: onChildNodeInserted called for parent node #final_container

Modified: trunk/LayoutTests/inspector/dom-debugger/node-removed.html (250955 => 250956)


--- trunk/LayoutTests/inspector/dom-debugger/node-removed.html	2019-10-10 05:12:58 UTC (rev 250955)
+++ trunk/LayoutTests/inspector/dom-debugger/node-removed.html	2019-10-10 05:28:18 UTC (rev 250956)
@@ -2,8 +2,6 @@
 <head>
 <script src=""
 <script>
-window._onload_ = runTest;
-
 function removeNode()
 {
     document.getElementById("target_element").remove();
@@ -23,8 +21,7 @@
     InspectorProtocol.eventHandler["DOM.childNodeRemoved"] = onChildNodeRemoved;
     InspectorProtocol.eventHandler["DOM.childNodeInserted"] = onChildNodeInserted;
     InspectorProtocol.eventHandler["Debugger.paused"] = onDebuggerPaused;
-    InspectorProtocol.eventHandler["Debugger.scriptParsed"] = onScriptParsed;
-    
+
     function createNodeAttributesMap(attributes)
     {
         var attributesMap = {};
@@ -82,7 +79,7 @@
     }
 
     function onDebuggerPaused(response)
-    {   
+    {
         ProtocolTest.log("Stopped on DOM breakpoint");
         InspectorProtocol.sendCommand("Runtime.evaluate", {"_expression_": "moveNode()"}, function() {
             InspectorProtocol.sendCommand("Debugger.resume");
@@ -90,20 +87,6 @@
         });
     }
 
-    function onScriptParsed(messageObject)
-    {
-        // FIXME: The DOM breakpoints are not working unless there's a JS brakpoint set. Setting a fake breakpoint to workaround that.
-        // https://bugs.webkit.org/show_bug.cgi?id=123770 
-        if (/node-removed\.html$/.test(messageObject.params.url) && messageObject.params.startLine > 20) {
-            InspectorProtocol.eventHandler["Debugger.scriptParsed"] = null;
-            ProtocolTest.log("Found <script>");
-            var location = {scriptId: messageObject.params.scriptId, lineNumber: messageObject.params.startLine + 2, columnNumber: 0};
-            InspectorProtocol.sendCommand("Debugger.setBreakpoint", {location: location}, function() {
-                InspectorProtocol.sendCommand("DOM.getDocument", {}, onGotDocument);
-            });
-        }
-    }
-
     function onGotDocument(response)
     {
         InspectorProtocol.checkForError(response);
@@ -122,10 +105,14 @@
     }
 
     InspectorProtocol.sendCommand("Debugger.enable", {});
+    InspectorProtocol.sendCommand("Debugger.setBreakpointsActive", {active: true});
+    InspectorProtocol.sendCommand("DOM.getDocument", {}, onGotDocument);
+    // Log something to precreate output element to avoid DOM events from test logs.
+    ProtocolTest.log("Created output element.");
 }
 </script>
 </head>
-<body>
+<body _onload_="runTest()">
 
 <p>Testing that DOM.childNodeRemoved is correctly triggered even when the element is moved while paused in the debugger on a DOMDebugger "node-removed" breakpoint.</p>
 
@@ -132,12 +119,5 @@
 <div id="target_element"></div>
 <div id="final_container"></div>
 
-<!-- Script tag required to workaround bug 123770. See onScriptParsed for details. -->
-<script>// Line 0
-function testFunction() { // Line 1
-    console.log("FAIL: Workaround JS code should not run.");
-}
-</script>
-
 </body>
 </html>

Modified: trunk/LayoutTests/platform/gtk/TestExpectations (250955 => 250956)


--- trunk/LayoutTests/platform/gtk/TestExpectations	2019-10-10 05:12:58 UTC (rev 250955)
+++ trunk/LayoutTests/platform/gtk/TestExpectations	2019-10-10 05:28:18 UTC (rev 250956)
@@ -2403,8 +2403,6 @@
 webkit.org/b/145169 media/track/track-css-user-override.html [ Timeout Pass ]
 webkit.org/b/145171 fast/events/tabindex-focus-blur-all.html [ Crash Pass ]
 
-webkit.org/b/153468 inspector/dom-debugger/node-removed.html [ Timeout ]
-
 webkit.org/b/113127 media/track/track-prefer-captions.html [ Timeout ]
 
 webkit.org/b/144690 editing/spelling/context-menu-suggestions-multiword-selection.html [ Timeout ]

Modified: trunk/LayoutTests/platform/mac/TestExpectations (250955 => 250956)


--- trunk/LayoutTests/platform/mac/TestExpectations	2019-10-10 05:12:58 UTC (rev 250955)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2019-10-10 05:28:18 UTC (rev 250956)
@@ -1062,7 +1062,6 @@
 webkit.org/b/168387 [ Debug ] inspector/debugger/tail-recursion.html [ Pass Timeout ]
 webkit.org/b/170127 inspector/dom-debugger/dom-breakpoints.html [ Pass Timeout ]
 webkit.org/b/148636 inspector/dom/getAccessibilityPropertiesForNode.html [ Pass Timeout ]
-webkit.org/b/154610 inspector/dom-debugger/node-removed.html [ Pass Timeout ]
 webkit.org/b/153039 [ Debug ] inspector/heap/garbageCollected.html [ Pass Timeout ]
 webkit.org/b/167408 [ Debug ] inspector/heap/gc.html [ Slow ]
 webkit.org/b/167184 [ Debug ] inspector/indexeddb/clearObjectStore.html [ Pass Timeout ]
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to