WebKit Bugzilla
Attachment 350046 Details for
Bug 189710
: http/tests/navigation/window-open-cross-origin-then-navigated-back-same-origin.html is flaky
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-189710-20180918135115.patch (text/plain), 4.17 KB, created by
Chris Dumez
on 2018-09-18 13:51:16 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Chris Dumez
Created:
2018-09-18 13:51:16 PDT
Size:
4.17 KB
patch
obsolete
>Subversion Revision: 236149 >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 4b81bc1389b11ccccc9f461969266fa1514153c8..7f84ab9f68f7deef2e356ef337421000d4daf2f2 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,19 @@ >+2018-09-18 Chris Dumez <cdumez@apple.com> >+ >+ http/tests/navigation/window-open-cross-origin-then-navigated-back-same-origin.html is flaky >+ https://bugs.webkit.org/show_bug.cgi?id=189710 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Update the test to stop relying on the test page posting a message to the auxiliary window >+ to trigger a navigation. Instead, the auxiliary window now takes care of navigating itself >+ after it is loaded. This is more robust, especially considering that the test page is cross >+ origin and thus is not getting a load event for the auxiliary window. >+ >+ * http/tests/navigation/resources/navigate-back-same-origin-helper.html: Added. >+ * http/tests/navigation/resources/navigate-helper.html: Removed. >+ * http/tests/navigation/window-open-cross-origin-then-navigated-back-same-origin.html: >+ > 2018-09-18 Youenn Fablet <youenn@apple.com> > > Enable Unified Plan by default >diff --git a/LayoutTests/http/tests/navigation/resources/navigate-back-same-origin-helper.html b/LayoutTests/http/tests/navigation/resources/navigate-back-same-origin-helper.html >new file mode 100644 >index 0000000000000000000000000000000000000000..fb9ac47d17889b756716bba3ac0527a32555bd56 >--- /dev/null >+++ b/LayoutTests/http/tests/navigation/resources/navigate-back-same-origin-helper.html >@@ -0,0 +1,12 @@ >+<!DOCTYPE html> >+<html> >+<body> >+<script> >+onload = () => { >+ setTimeout(() => { >+ window.location = "http://127.0.0.1:8000/navigation/resources/otherpage.html"; >+ }, 0); >+}; >+</script> >+</body> >+</html> >diff --git a/LayoutTests/http/tests/navigation/resources/navigate-helper.html b/LayoutTests/http/tests/navigation/resources/navigate-helper.html >deleted file mode 100644 >index dfc9e6ecdbb0c389eaf0e708cca38c41863bb76a..0000000000000000000000000000000000000000 >--- a/LayoutTests/http/tests/navigation/resources/navigate-helper.html >+++ /dev/null >@@ -1,12 +0,0 @@ >-<!DOCTYPE html> >-<html> >-<body> >-<script> >-onmessage = (msg) => { >- setTimeout(() => { >- window.location = msg.data.navigate; >- }, 0); >-}; >-</script> >-</body> >-</html> >diff --git a/LayoutTests/http/tests/navigation/window-open-cross-origin-then-navigated-back-same-origin.html b/LayoutTests/http/tests/navigation/window-open-cross-origin-then-navigated-back-same-origin.html >index ebcbea8d4c550e7688e47def57431552d3da7511..5025a5c4b3452f4f7e41412161242681c3db40dc 100644 >--- a/LayoutTests/http/tests/navigation/window-open-cross-origin-then-navigated-back-same-origin.html >+++ b/LayoutTests/http/tests/navigation/window-open-cross-origin-then-navigated-back-same-origin.html >@@ -11,36 +11,18 @@ jsTestIsAsync = true; > if (window.testRunner) > testRunner.setCanOpenWindows(); > >-function wasNavigatedSameOrigin() >-{ >- shouldBeEqualToString("w.location.href", "http://127.0.0.1:8000/navigation/resources/otherpage.html"); >- finishJSTest(); >-} >- >-function wasNavigatedCrossOrigin() >-{ >- // Navigate back same origin. >- w.postMessage({ navigate: "http://127.0.0.1:8000/navigation/resources/otherpage.html" }, "*"); >- handle = setInterval(() => { >- try { >- w.name; >- clearInterval(handle); >- wasNavigatedSameOrigin(); >- } catch(e) { >- } >- }, 10); >-} >- > onload = function() { > w = window.open(); > w.opener = null; >- w.location = "http://localhost:8000/navigation/resources/navigate-helper.html"; >+ w.location = "http://localhost:8000/navigation/resources/navigate-back-same-origin-helper.html"; > handle = setInterval(() => { > try { >- w.name; >+ if (w.location.href != "about:blank") { >+ clearInterval(handle); >+ shouldBeEqualToString("w.location.href", "http://127.0.0.1:8000/navigation/resources/otherpage.html"); >+ finishJSTest(); >+ } > } catch(e) { >- clearInterval(handle); >- wasNavigatedCrossOrigin(); > } > }, 10); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 189710
: 350046