mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Ensure that the API base URL is used in Fetch APIs.
This commit is contained in:
parent
26cf0a7a8c
commit
fbed4d23d6
6 changed files with 14 additions and 2 deletions
|
@ -0,0 +1,5 @@
|
||||||
|
[url-parsing.html]
|
||||||
|
type: testharness
|
||||||
|
[should parse the URL relative to the current settings object]
|
||||||
|
expected: FAIL
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
[url-parsing.html]
|
||||||
|
type: testharness
|
||||||
|
[should parse the redirect Location URL relative to the current settings object]
|
||||||
|
expected: FAIL
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<title>Current page used as a test helper</title>
|
<title>Current page used as a test helper</title>
|
||||||
|
<base href="success/">
|
||||||
|
|
|
@ -20,7 +20,7 @@ promise_test(() => {
|
||||||
return loadPromise.then(() => {
|
return loadPromise.then(() => {
|
||||||
const req = document.querySelector('iframe').contentWindow.createRequest("url");
|
const req = document.querySelector('iframe').contentWindow.createRequest("url");
|
||||||
|
|
||||||
assert_equals(req.url, new URL("current/url", location.href).href);
|
assert_equals(req.url, new URL("current/success/url", location.href).href);
|
||||||
});
|
});
|
||||||
}, "should parse the URL relative to the current settings object");
|
}, "should parse the URL relative to the current settings object");
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<title>Current page used as a test helper</title>
|
<title>Current page used as a test helper</title>
|
||||||
|
<base href="success/">
|
||||||
|
|
|
@ -20,7 +20,7 @@ promise_test(() => {
|
||||||
return loadPromise.then(() => {
|
return loadPromise.then(() => {
|
||||||
const res = document.querySelector('iframe').contentWindow.createRedirectResponse("url");
|
const res = document.querySelector('iframe').contentWindow.createRedirectResponse("url");
|
||||||
|
|
||||||
assert_equals(res.headers.get("Location"), new URL("current/url", location.href).href);
|
assert_equals(res.headers.get("Location"), new URL("current/success/url", location.href).href);
|
||||||
});
|
});
|
||||||
}, "should parse the redirect Location URL relative to the current settings object");
|
}, "should parse the redirect Location URL relative to the current settings object");
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue