mirror of
https://github.com/servo/servo.git
synced 2025-08-23 14:25:33 +01:00
Update web-platform-tests to revision 181f8381fe9373e027f4b5ba5d1439843ad2c2e6
This commit is contained in:
parent
0dda115609
commit
0355b8e70d
105 changed files with 2775 additions and 764 deletions
|
@ -7,6 +7,7 @@
|
|||
<script src="/resources/testharnessreport.js"></script>
|
||||
<!-- Common global functions for referrer-policy tests. -->
|
||||
<script src="/referrer-policy/generic/common.js"></script>
|
||||
<script src="/referrer-policy/generic/referrer-policy-test-case.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Fetch messaging - same-origin Fetch request</h1>
|
||||
|
@ -20,26 +21,21 @@
|
|||
assert_true(!!window.fetch, "Fetch is not supported by this browser.");
|
||||
}, "Fetch is supported by the browser.");
|
||||
|
||||
(function() {
|
||||
if (!window.fetch)
|
||||
return;
|
||||
|
||||
async_test(function(fetch_test) {
|
||||
promise_test(function() {
|
||||
var urlPath = '/referrer-policy/generic/subresource/xhr.py';
|
||||
var url = location.protocol + "//" + location.hostname + ":" +
|
||||
location.port + urlPath;
|
||||
queryFetch(url, function(message) {
|
||||
var pre = document.getElementById('received_message')
|
||||
var headers = message.headers;
|
||||
pre.innerHTML = "";
|
||||
pre.innerHTML += url + ":\n\n";
|
||||
pre.innerHTML += JSON.stringify(headers, null, 2) + "\n\n";
|
||||
assert_own_property(headers, "host")
|
||||
assert_own_property(headers, "connection")
|
||||
fetch_test.done();
|
||||
}, null, null, fetch_test);
|
||||
}, "Fetch is responding with HTTP headers");
|
||||
})();
|
||||
return requestViaFetch(url)
|
||||
.then(function(message) {
|
||||
var pre = document.getElementById('received_message')
|
||||
var headers = message.headers;
|
||||
pre.innerHTML = "";
|
||||
pre.innerHTML += url + ":\n\n";
|
||||
pre.innerHTML += JSON.stringify(headers, null, 2) + "\n\n";
|
||||
assert_own_property(headers, "host")
|
||||
assert_own_property(headers, "connection")
|
||||
});
|
||||
}, "Fetch is responding with HTTP headers");
|
||||
</script>
|
||||
|
||||
<div id="log"></div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue