mirror of
https://github.com/servo/servo.git
synced 2025-08-08 23:15:33 +01:00
Update web-platform-tests to revision 53f3408ffe1fd0e56a37aff4aaf1fa8441c41d6d
This commit is contained in:
parent
9b01a4cc97
commit
0edf0ececb
59 changed files with 2247 additions and 1071 deletions
|
@ -0,0 +1,15 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Fetch in worker: response url getter</title>
|
||||
<meta name="help" href="https://fetch.spec.whatwg.org/#response-class">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
fetch_tests_from_worker(new Worker("response-url.js?pipe=sub"));
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,13 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Fetch: response url getter</title>
|
||||
<meta name="help" href="https://fetch.spec.whatwg.org/#response-class">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script src="response-url.js?pipe=sub"></script>
|
||||
</body>
|
||||
</html>
|
21
tests/wpt/web-platform-tests/fetch/api/basic/response-url.js
Normal file
21
tests/wpt/web-platform-tests/fetch/api/basic/response-url.js
Normal file
|
@ -0,0 +1,21 @@
|
|||
if (this.document === undefined) {
|
||||
importScripts("/resources/testharness.js");
|
||||
}
|
||||
|
||||
function checkResponseURL(fetchedURL, expectedURL)
|
||||
{
|
||||
promise_test(function() {
|
||||
return fetch(fetchedURL).then(function(response) {
|
||||
assert_equals(response.url, expectedURL);
|
||||
});
|
||||
}, "Testing response url getter with " +fetchedURL);
|
||||
}
|
||||
|
||||
var baseURL = "http://{{host}}:{{ports[http][0]}}";
|
||||
checkResponseURL(baseURL + "/ada", baseURL + "/ada");
|
||||
checkResponseURL(baseURL + "/#", baseURL + "/");
|
||||
checkResponseURL(baseURL + "/#ada", baseURL + "/");
|
||||
checkResponseURL(baseURL + "#ada", baseURL + "/");
|
||||
|
||||
done();
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue