Changeset 231690 in webkit


Ignore:
Timestamp:
May 10, 2018 10:00:23 PM (6 years ago)
Author:
rniwa@webkit.org
Message:

REGRESSION(r227983): fast/dom/adopt-node-crash-2.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=182589

Reviewed by Wenson Hsieh.

This is a speculative fix for the test since I can't reproduce the flakiness locally. Because r227983 makes
the layout update async, I suspect the focus change which occurs to the keygen having autofocus attribute
isn't updating the layout in time for notifyDone call. Manually update the layout before/after the test.

Also wait for the load event to figure before starting the test since layout, etc... may not be updated
immediately after DOMContentLoaded.

  • fast/dom/adopt-node-crash-2.html:
Location:
trunk/LayoutTests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r231662 r231690  
     12018-05-10  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        REGRESSION(r227983): fast/dom/adopt-node-crash-2.html is flaky
     4        https://bugs.webkit.org/show_bug.cgi?id=182589
     5
     6        Reviewed by Wenson Hsieh.
     7
     8        This is a speculative fix for the test since I can't reproduce the flakiness locally. Because r227983 makes
     9        the layout update async, I suspect the focus change which occurs to the keygen having autofocus attribute
     10        isn't updating the layout in time for notifyDone call. Manually update the layout before/after the test.
     11
     12        Also wait for the load event to figure before starting the test since layout, etc... may not be updated
     13        immediately after DOMContentLoaded.
     14
     15        * fast/dom/adopt-node-crash-2.html:
     16
    1172018-05-10  Wenson Hsieh  <wenson_hsieh@apple.com>
    218
  • trunk/LayoutTests/fast/dom/adopt-node-crash-2.html

    r203941 r231690  
    2121function doit()
    2222{
    23     div2.addEventListener("DOMFocusOut", function () { document.implementation.createDocument("", "", null).adoptNode(div2); }, false);
     23    div2.addEventListener("DOMFocusOut", function () {
     24        document.implementation.createDocument("", "", null).adoptNode(div2);
     25        setTimeout(() => {
     26            if (window.internals)
     27                internals.updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks();
     28            if (window.testRunner)
     29                testRunner.notifyDone();
     30        }, 0);
     31    }, false);
    2432    div1.outerHTML = header1.outerHTML;
    25     if (window.testRunner)
    26         testRunner.notifyDone();
    2733}
    28 document.addEventListener("DOMContentLoaded", function() {
     34window.onload = function() {
     35    if (window.internals)
     36        internals.updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks();
     37    else
     38        div2.getBoundingClientRect();
    2939    setTimeout("doit()", 1);
    30 }, false);
     40}
    3141</script>
    3242</html>
Note: See TracChangeset for help on using the changeset viewer.