Changeset 223556 in webkit
- Timestamp:
- Oct 17, 2017 10:41:28 AM (7 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r223555 r223556 1 2017-10-17 Alex Christensen <achristensen@webkit.org> 2 3 de-flakify http/tests/security/cross-frame-access-put.html 4 https://bugs.webkit.org/show_bug.cgi?id=178371 5 6 Reviewed by Tim Horton. 7 8 In the iframe, the test was being run after 0ms. Sometimes, the whole iframe hadn't loaded yet, 9 so window.innerHeight and window.innerWidth were 0 instead of their intended values. This changes 10 the test to wait for the iframe to finish loading before running the test, then post a message to 11 the parent to tell it to finish running its test instead of just relying on setTimeout(..., 0) to 12 always work after the iframe had finished loading. 13 14 * http/tests/security/cross-frame-access-put-expected.txt: 15 * http/tests/security/cross-frame-access-put.html: 16 * http/tests/security/resources/cross-frame-iframe-for-put-test.html: 17 * platform/mac-wk2/TestExpectations: 18 1 19 2017-10-17 Alex Christensen <achristensen@webkit.org> 2 20 -
trunk/LayoutTests/http/tests/security/cross-frame-access-put-expected.txt
r219663 r223556 186 186 ALERT: PASS: window.showModalDialog matched the expected value. 187 187 ALERT: PASS: window.stop should be 'function stop() { [native code]}' and is. 188 ALERT: continue test in parent frame 188 189 This test checks cross-frame access security of window attribute setters (rdar://problem/5326791). 189 190 -
trunk/LayoutTests/http/tests/security/cross-frame-access-put.html
r191423 r223556 20 20 window.targetWindow = window.frames[0]; 21 21 22 window.addEventListener("message", test, false); 23 22 24 window.onload = function() 23 25 { … … 26 28 testRunner.waitUntilDone(); 27 29 } 28 29 // There is code in subframe that runs some tests, and that is scheduled on a zero delay 30 // timer when the subframe loads. The timer that we schedule here will run after the one 31 // in subframe, making the order of tests predictable. 32 setTimeout(test, 0); 33 } 34 35 function test() { 30 } 31 32 function test(message) { 33 alert(message.data); 36 34 // FIXME: This test should use fast/window/resources/window-properties.js instead of a custom list. 37 35 // Constructors -
trunk/LayoutTests/http/tests/security/resources/cross-frame-iframe-for-put-test.html
r191423 r223556 242 242 // The test runs on a timer and not in a load event handler because we want both 243 243 // window.onload and window.event to be undefined. 244 setTimeout(function() {244 function runTest() { 245 245 // Constructors 246 246 shouldBe("window.Attr", "AttrOld"); … … 452 452 shouldBe("window.showModalDialog", "showModalDialogOld", true); 453 453 shouldBe("window.stop", "stopOld"); 454 }, 0); 454 window.parent.postMessage("continue test in parent frame", "*") 455 }; 456 function checkAndRunTest() { 457 if (window.innerHeight == 150) 458 runTest(); 459 else 460 setTimeout(checkAndRunTest, 10); 461 } 462 checkAndRunTest(); 455 463 </script> 456 464 </body> -
trunk/LayoutTests/platform/mac-wk2/TestExpectations
r223555 r223556 337 337 webkit.org/b/150942 animations/multiple-backgrounds.html [ Pass ImageOnlyFailure ] 338 338 339 webkit.org/b/151053 http/tests/security/cross-frame-access-put.html [ Pass Failure ]340 341 339 webkit.org/b/151326 [ Yosemite+ ] webarchive/loading/missing-data.html [ Pass Crash ] 342 340
Note: See TracChangeset
for help on using the changeset viewer.