Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/fetch/api/policies/referrer-unsafe-url.js

Issue 2778753002: Import //fetch from Web Platform Tests. (Closed)
Patch Set: Baselines. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 if (this.document === undefined) {
2 importScripts("/resources/testharness.js");
3 importScripts("../resources/utils.js");
4
5 // A nested importScripts() with a referrer-policy should have no effect
6 // on overall worker policy.
7 importScripts("nested-policy.js");
8 }
9
10 var referrerUrl = location.href;
11 var fetchedUrl = RESOURCES_DIR + "inspect-headers.py?headers=referer";
12
13 promise_test(function(test) {
14 return fetch(fetchedUrl).then(function(resp) {
15 assert_equals(resp.status, 200, "HTTP status is 200");
16 assert_equals(resp.type , "basic", "Response's type is basic");
17 assert_equals(resp.headers.get("x-request-referer"), referrerUrl, "request's referrer is " + referrerUrl);
18 });
19 }, "Request's referrer is the full url of current document/worker");
20
21 done();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698