RESOLVED FIXED 169264
scroll-restoration-navigation-samedoc.html does cross-origin navigation in an incompatible way
https://bugs.webkit.org/show_bug.cgi?id=169264
Summary scroll-restoration-navigation-samedoc.html does cross-origin navigation in an...
Simon Fraser (smfr)
Reported 2017-03-06 22:07:43 PST
This test needs to be fixed to use get_host_info().HTTP_REMOTE_ORIGIN, like: diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-cross-origin.html b/LayoutTests/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-cross-origin.html index e3da59e39003e394f8ff165072a12385a711b331..23fbd50507d79768a85aa284f8e55315868886ea 100644 --- a/LayoutTests/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-cross-origin.html +++ b/LayoutTests/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-cross-origin.html @@ -14,9 +14,13 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> +<script src="/common/get-host-info.sub.js"></script> <script type="text/javascript"> 'use strict'; +function base_path() { + return location.pathname.replace(/\/[^\/]*$/, '/'); +} // The test does the following navigation steps for iframe // 1. load page-with-fragment.html#fragment // 2. load blank1 @@ -40,7 +44,8 @@ }); }, function() { // navigate to a new page from a different origin - iframe.src = iframe.src.replace("http://", "http://www.").replace("page-with-fragment.html#fragment", "blank1.html"); + // iframe.src = iframe.src.replace("http://", "http://www.").replace("page-with-fragment.html#fragment", "blank1.html"); + iframe.src = get_host_info().HTTP_REMOTE_ORIGIN + base_path() + "resources/blank1.html"; }, function() { // going back causes the iframe to traverse back history.back();
Attachments
Patch (2.78 KB, patch)
2017-12-19 06:35 PST, Ms2ger (he/him; ⌚ UTC+1/+2)
no flags
Ms2ger (he/him; ⌚ UTC+1/+2)
Comment 1 2017-12-19 06:35:56 PST
WebKit Commit Bot
Comment 2 2017-12-19 07:09:12 PST
Comment on attachment 329758 [details] Patch Clearing flags on attachment: 329758 Committed r226120: <https://trac.webkit.org/changeset/226120>
WebKit Commit Bot
Comment 3 2017-12-19 07:09:14 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 4 2017-12-19 07:10:26 PST
Note You need to log in before you can comment on or make changes to this bug.