Changeset 140885 in webkit
- Timestamp:
- Jan 25, 2013 5:13:15 PM (11 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r140882 r140885 1 2013-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 1 15 2013-01-25 Pan Deng <pan.deng@intel.com> 2 16 -
trunk/LayoutTests/fast/frames/unload-reparent-sibling-frame.html
r140856 r140885 5 5 <div id="container"> 6 6 <div id="inside"> 7 <iframe id="frame1" srcdoc="frame1"></iframe> 8 <iframe id="frame2" srcdoc="frame2"></iframe> 7 9 </div> 8 10 </div> … … 11 13 description('Reparented sibling frames from unload handlers should load.'); 12 14 15 var jsTestIsAsync = true; 16 var count = 2; 17 var container = document.getElementById('container'); 18 var inside = document.getElementById('inside'); 19 var frame1 = document.getElementById('frame1'); 20 var frame2 = document.getElementById('frame2'); 21 13 22 if (window.testRunner) { 14 23 testRunner.dumpAsText(); … … 16 25 } 17 26 18 function onframeload(text)27 function runTest() 19 28 { 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); 21 37 } 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;37 38 38 39 onload = function() { … … 41 42 42 43 frame1.contentWindow.onunload = function() { 44 frame1.onload = runTest; 45 frame2.onload = runTest; 43 46 document.body.appendChild(inside); 44 47 }; 45 48 46 49 container.parentNode.removeChild(container); 47 shouldNotBe('frame1.contentDocument', 'null');48 shouldNotBe('frame2.contentDocument', 'null');49 isSuccessfullyParsed();50 50 }; 51 51 </script> 52 53 <script src="../js/resources/js-test-post.js"></script>
Note: See TracChangeset
for help on using the changeset viewer.