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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/eventsource/script-tests/eventsource-csp-redirect-worker.php

Issue 2807533003: [WIP2] off-main-thread loading
Patch Set: call set_is_secure_context in EmbeddedSharedWorkerStub::CreateWorkerFetchContext() 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/eventsource/script-tests/eventsource-csp-redirect-worker.php
diff --git a/third_party/WebKit/LayoutTests/http/tests/eventsource/script-tests/eventsource-csp-redirect-worker.php b/third_party/WebKit/LayoutTests/http/tests/eventsource/script-tests/eventsource-csp-redirect-worker.php
new file mode 100644
index 0000000000000000000000000000000000000000..45c8104a3cec83d666ad5e2c7a6a6752a003c7e3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/eventsource/script-tests/eventsource-csp-redirect-worker.php
@@ -0,0 +1,17 @@
+<?php
+header("Content-Security-Policy: connect-src http://127.0.0.1:8000/js-test-resources/js-test.js http://127.0.0.1:8000/resources/redirect.php");
+?>
+if (self.importScripts)
+ importScripts("/js-test-resources/js-test.js");
+
+description("Test that basic EventSource cross-origin requests fail on blocked CSP redirect.");
+
+self.jsTestIsAsync = true;
+
+var es;
+
+shouldNotThrow("es = new EventSource(\"http://127.0.0.1:8000/resources/redirect.php?code=307&cors_allow_origin=*&url=http://127.0.0.1:8080/resources/redirect.php\")");
+es.onerror = function() {
+ shouldBe("es.readyState", "EventSource.CLOSED");
+ finishJSTest();
+};

Powered by Google App Engine
This is Rietveld 408576698