Changeset 229371 in webkit
- Timestamp:
- Mar 7, 2018 10:53:21 AM (6 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 3 added
- 4 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r229370 r229371 1 2018-03-07 Chris Dumez <cdumez@apple.com> 2 3 http/tests/misc/location-replace-crossdomain.html is failing with async policy delegates 4 https://bugs.webkit.org/show_bug.cgi?id=183408 5 6 Reviewed by Alex Christensen. 7 8 The test was trying to navigate a cross-origin iframe via location.replace() and checking 9 that the load succeeded in a setTimeout(1). There is no guarantee that the frame has loaded 10 by that point. We would normally rely on the 'load' event but it is not feasible here since 11 the iframe is cross-origin. Instead, I opted to have the iframe to a page that posts a 12 message to its parent window to indicate that the load has succeeded. 13 14 * http/tests/misc/location-replace-crossdomain-async-delegates-expected.txt: Added. 15 * http/tests/misc/location-replace-crossdomain-async-delegates.html: Added. 16 * http/tests/misc/location-replace-crossdomain-expected.txt: Added. 17 * http/tests/misc/location-replace-crossdomain.html: 18 * platform/gtk/http/tests/misc/location-replace-crossdomain-expected.txt: Removed. 19 * platform/ios/http/tests/misc/location-replace-crossdomain-expected.txt: Removed. 20 * platform/mac/http/tests/misc/location-replace-crossdomain-expected.txt: Removed. 21 * platform/win/http/tests/misc/location-replace-crossdomain-expected.txt: Removed. 22 1 23 2018-03-07 Per Arne Vollan <pvollan@apple.com> 2 24 -
trunk/LayoutTests/http/tests/misc/location-replace-crossdomain.html
r191652 r229371 1 <!DOCTYPE html> 1 2 <html> 2 <head> 3 <body> 4 <script src="/js-test-resources/js-test.js"></script> 3 5 <script> 4 function test() 5 { 6 window.frames['crossDomainFrame'].location.replace("http://127.0.0.1:8000/misc/resources/success.html"); 7 if (window.testRunner) 8 setTimeout("testRunner.notifyDone()", 1); 6 description("Checks that a cross origin iframe can be navigated using location.replace()."); 7 jsTestIsAsync = true; 8 9 onload = function() 10 { 11 addEventListener("message", function() { 12 testPassed("Navigated cross-origin frame via Location.replace"); 13 shouldBeEqualToString("window.frames['crossDomainFrame'].location.href", "http://127.0.0.1:8000/security/resources/postMessage.html"); 14 finishJSTest(); 15 }); 16 window.frames['crossDomainFrame'].location.replace("http://127.0.0.1:8000/security/resources/postMessage.html"); 17 setTimeout(function() { 18 testFailed("Failed to navigate cross-origin frame via Location.replace"); 19 finishJSTest(); 20 }, 10000); 9 21 } 10 11 if (window.testRunner)12 testRunner.waitUntilDone();13 14 22 </script> 15 </head>16 <body onload="test();">17 23 <iframe id="crossDomainFrame" name="crossDomainFrame" src="http://localhost:8000/misc/resources/failure.html"></iframe> 18 24 </body>
Note: See TracChangeset
for help on using the changeset viewer.