Changeset 140885 in webkit


Ignore:
Timestamp:
Jan 25, 2013 5:13:15 PM (11 years ago)
Author:
esprehn@chromium.org
Message:

Make unload-reparent-sibling-frame.html wait for completion
https://bugs.webkit.org/show_bug.cgi?id=107987

Reviewed by Ojan Vafai.

While this test runs fine locally and in the cr-linux EWS it
appears to be flaky on many of the other bots because it doesn't
wait for the test to complete. Instead make the waiting in the test
explicit.

  • fast/frames/unload-reparent-sibling-frame.html:
Location:
trunk/LayoutTests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r140882 r140885  
     12013-01-25  Elliott Sprehn  <esprehn@chromium.org>
     2
     3        Make unload-reparent-sibling-frame.html wait for completion
     4        https://bugs.webkit.org/show_bug.cgi?id=107987
     5
     6        Reviewed by Ojan Vafai.
     7
     8        While this test runs fine locally and in the cr-linux EWS it
     9        appears to be flaky on many of the other bots because it doesn't
     10        wait for the test to complete. Instead make the waiting in the test
     11        explicit.
     12
     13        * fast/frames/unload-reparent-sibling-frame.html:
     14
    1152013-01-25  Pan Deng  <pan.deng@intel.com>
    216
  • trunk/LayoutTests/fast/frames/unload-reparent-sibling-frame.html

    r140856 r140885  
    55<div id="container">
    66    <div id="inside">
     7        <iframe id="frame1" srcdoc="frame1"></iframe>
     8        <iframe id="frame2" srcdoc="frame2"></iframe>
    79    </div>
    810</div>
     
    1113description('Reparented sibling frames from unload handlers should load.');
    1214
     15var jsTestIsAsync = true;
     16var count = 2;
     17var container = document.getElementById('container');
     18var inside = document.getElementById('inside');
     19var frame1 = document.getElementById('frame1');
     20var frame2 = document.getElementById('frame2');
     21
    1322if (window.testRunner) {
    1423    testRunner.dumpAsText();
     
    1625}
    1726
    18 function onframeload(text)
     27function runTest()
    1928{
    20     this.contentDocument.body.innerHTML = this.id;
     29    if (--count) return;
     30    // Wait until all frame disconnection calls are complete to ensure inDocument
     31    // frames remain loaded.
     32    setTimeout(function() {
     33        shouldNotBe('frame1.contentDocument', 'null');
     34        shouldNotBe('frame2.contentDocument', 'null');
     35        finishJSTest();
     36    }, 0);
    2137}
    22 
    23 function runTest()
    24 {   
    25 }
    26 
    27 var container = document.getElementById('container');
    28 var inside = document.getElementById('inside');
    29 
    30 var frame1 = document.createElement('iframe');
    31 frame1.id = 'frame1';
    32 frame1.onload = onframeload;
    33 
    34 var frame2 = document.createElement('iframe');
    35 frame2.id = 'frame2';
    36 frame2.onload = onframeload;
    3738
    3839onload = function() {
     
    4142
    4243    frame1.contentWindow.onunload = function() {
     44        frame1.onload = runTest;
     45        frame2.onload = runTest;
    4346        document.body.appendChild(inside);
    4447    };
    4548
    4649    container.parentNode.removeChild(container);
    47     shouldNotBe('frame1.contentDocument', 'null');
    48     shouldNotBe('frame2.contentDocument', 'null');
    49     isSuccessfullyParsed();
    5050};
    5151</script>
     52
     53<script src="../js/resources/js-test-post.js"></script>
Note: See TracChangeset for help on using the changeset viewer.