OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <title>Response.redirect URL parsing, with multiple globals in play</title> |
| 3 <link rel="help" href="https://fetch.spec.whatwg.org/#dom-response-redirect"> |
| 4 <link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me"> |
| 5 <script src="/resources/testharness.js"></script> |
| 6 <script src="/resources/testharnessreport.js"></script> |
| 7 |
| 8 <!-- This is the entry global --> |
| 9 |
| 10 <iframe src="incumbent/incumbent.html"></iframe> |
| 11 |
| 12 <script> |
| 13 'use strict'; |
| 14 |
| 15 const loadPromise = new Promise(resolve => { |
| 16 window.addEventListener("load", () => resolve()); |
| 17 }); |
| 18 |
| 19 promise_test(() => { |
| 20 return loadPromise.then(() => { |
| 21 const res = document.querySelector('iframe').contentWindow.createRedirec
tResponse("url"); |
| 22 |
| 23 assert_equals(res.headers.get("Location"), new URL("current/success/url"
, location.href).href); |
| 24 }); |
| 25 }, "should parse the redirect Location URL relative to the current settings obje
ct"); |
| 26 |
| 27 </script> |
OLD | NEW |