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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/content-security-policy/blink-contrib/resources/shared-worker-make-xhr-allowed.sub.js

Issue 2695813009: Import wpt@503f5b5f78ec4e87d144f78609f363f0ed0ea8db (Closed)
Patch Set: Skip some tests Created 3 years, 10 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 onconnect = function (event) {
2 var port = event.ports[0];
3 var xhr = new XMLHttpRequest;
4 xhr.onerror = function () {
5 port.postMessage("xhr blocked");
6 port.postMessage("TEST COMPLETE");
7 };
8 xhr.onload = function () {
9 if (xhr.responseText == "FAIL") {
10 port.postMessage("xhr allowed");
11 } else {
12 port.postMessage("xhr blocked");
13 }
14 port.postMessage("TEST COMPLETE");
15 };
16 try {
17 xhr.open("GET", "/common/redirect.py?location=http://www1.{{host}}:{{por ts[http][0]}}/content-security-policy/support/fail.asis", true);
18 xhr.send();
19 } catch (e) {
20 port.postMessage("xhr blocked");
21 port.postMessage("TEST COMPLETE");
22 }
23 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698