Changeset 245012 in webkit


Ignore:
Timestamp:
May 7, 2019 9:28:00 AM (5 years ago)
Author:
Chris Dumez
Message:

fast/dom/frame-src-javascript-url-async.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=197664

Unreviewed, tweak test so that it is no longer flaky.

  • fast/dom/frame-src-javascript-url-async-expected.txt:
  • fast/dom/frame-src-javascript-url-async.html:
Location:
trunk/LayoutTests
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r245010 r245012  
     12019-05-07  Chris Dumez  <cdumez@apple.com>
     2
     3        fast/dom/frame-src-javascript-url-async.html is flaky
     4        https://bugs.webkit.org/show_bug.cgi?id=197664
     5
     6        Unreviewed, tweak test so that it is no longer flaky.
     7
     8        * fast/dom/frame-src-javascript-url-async-expected.txt:
     9        * fast/dom/frame-src-javascript-url-async.html:
     10
    1112019-05-07  Ryan Haddad  <ryanhaddad@apple.com>
    212
  • trunk/LayoutTests/fast/dom/frame-src-javascript-url-async-expected.txt

    r244892 r245012  
    44
    55
    6 PASS frame2.contentWindow is initialFrame2Window
    7 PASS frame2.contentDocument is initialFrame2Document
    8 PASS messages is "1234"
     6PASS frame1.contentWindow is initialFrame1Window
     7PASS frame1.contentDocument is initialFrame1Document
     8PASS messages is "123"
    99PASS frame1.contentWindow is initialFrame1Window
    1010PASS frame1.contentDocument is initialFrame1Document
    1111PASS frame2.contentWindow is initialFrame2Window
    12 PASS frame2.contentDocument is initialFrame2Document
    13 PASS frame3.contentWindow is initialFrame3Window
    14 PASS frame3.contentDocument is not initialFrame3Document
    15 PASS frame3.contentWindow is initialFrame3Window
    16 PASS frame3.contentDocument is not initialFrame3Document
    17 PASS frame3.contentDocument.documentElement.textContent is "1"
     12PASS frame2.contentDocument is not initialFrame2Document
     13PASS frame2.contentWindow is initialFrame2Window
     14PASS frame2.contentDocument is not initialFrame2Document
     15PASS frame2.contentDocument.documentElement.textContent is "1"
    1816PASS successfullyParsed is true
    1917
    2018TEST COMPLETE
    21   
     19 
  • trunk/LayoutTests/fast/dom/frame-src-javascript-url-async.html

    r244892 r245012  
    88
    99let messages = "";
    10 const expectedMessageCount = 4;
     10const expectedMessageCount = 3;
    1111function log(msg)
    1212{
    1313    messages += msg;
    1414    if (messages.length == expectedMessageCount) {
    15         shouldBeEqualToString("messages", "1234");
     15        shouldBeEqualToString("messages", "123");
    1616        shouldBe("frame1.contentWindow", "initialFrame1Window");
    1717        shouldBe("frame1.contentDocument", "initialFrame1Document");
    1818        shouldBe("frame2.contentWindow", "initialFrame2Window");
    19         shouldBe("frame2.contentDocument", "initialFrame2Document");
    20         shouldBe("frame3.contentWindow", "initialFrame3Window");
    2119        // Firefox 66 and Chrome 74 disagree here, we match Chrome.
    22         shouldNotBe("frame3.contentDocument", "initialFrame3Document");
     20        shouldNotBe("frame2.contentDocument", "initialFrame2Document");
    2321        setTimeout(() => {
    24             shouldBe("frame3.contentWindow", "initialFrame3Window");
    25             shouldNotBe("frame3.contentDocument", "initialFrame3Document");
    26             shouldBeEqualToString("frame3.contentDocument.documentElement.textContent", "1");
     22            shouldBe("frame2.contentWindow", "initialFrame2Window");
     23            shouldNotBe("frame2.contentDocument", "initialFrame2Document");
     24            shouldBeEqualToString("frame2.contentDocument.documentElement.textContent", "1");
    2725            finishJSTest();
    2826        }), 0;
     
    3028}
    3129</script>
    32 <iframe id="frame1" src="javascript:parent.log('3')"></iframe>
    33 <iframe id="frame2"></iframe>
    34 <iframe id="frame3" src="javascript:'1'"></iframe>
     30<iframe id="frame1"></iframe>
     31<iframe id="frame2" src="javascript:'1'"></iframe>
    3532<script>
    3633frame1 = document.getElementById("frame1");
    3734frame2 = document.getElementById("frame2");
    38 frame3 = document.getElementById("frame3");
    3935initialFrame1Window = frame1.contentWindow;
    4036initialFrame1Document = frame1.contentDocument;
    4137initialFrame2Window = frame2.contentWindow;
    4238initialFrame2Document = frame2.contentDocument;
    43 initialFrame3Window = frame3.contentWindow;
    44 initialFrame3Document = frame3.contentDocument;
    4539log('1');
    46 frame2.src = "javascript:parent.log('4')";
    47 shouldBe("frame2.contentWindow", "initialFrame2Window");
    48 shouldBe("frame2.contentDocument", "initialFrame2Document");
     40frame1.src = "javascript:parent.log('3')";
     41shouldBe("frame1.contentWindow", "initialFrame1Window");
     42shouldBe("frame1.contentDocument", "initialFrame1Document");
    4943log('2');
    5044</script>
Note: See TracChangeset for help on using the changeset viewer.