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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/fetch/api/policies/referrer-origin-when-cross-origin.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 referrerOrigin = location.origin + '/';
11 var fetchedUrl = "https://{{domains[www]}}:{{ports[https][0]}}" + dirname(locati on.pathname) + RESOURCES_DIR + "inspect-headers.py?cors&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.headers.get("x-request-referer"), referrerOrigin, "reques t's referrer is " + referrerOrigin);
17 });
18 }, "Request's referrer is origin");
19
20 done();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698