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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/connect-src-xmlhttprequest-redirect-to-blocked.html

Issue 2456013002: CSP: 'connect-src' should not cause exceptions. (Closed)
Patch Set: Ugh. Created 3 years, 9 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/security/contentSecurityPolicy/connect-src-xmlhttprequest-redirect-to-blocked.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/connect-src-xmlhttprequest-redirect-to-blocked.html b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/connect-src-xmlhttprequest-redirect-to-blocked.html
deleted file mode 100644
index 2fa9f97ff09b3b32cf2cc46cdcd7089f778002ae..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/connect-src-xmlhttprequest-redirect-to-blocked.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta http-equiv="Content-Security-Policy" content="connect-src http://127.0.0.1:8000/security/contentSecurityPolicy/resources/redir.php">
- <script src="/js-test-resources/js-test.js"></script>
-</head>
-<body>
- <script>
- window.jsTestIsAsync = true;
- function log(msg) {
- document.getElementById("console").appendChild(document.createTextNode(msg + "\n"));
- }
-
- var xhr = new XMLHttpRequest;
- try {
- // Redirect to a different host, because as of CSP2 paths
- // are ignored when matching after a redirect.
- xhr.open("GET", "resources/redir.php?url=http://localhost:8000/security/contentSecurityPolicy/resources/xhr-redirect-not-allowed.pl", true);
- } catch(e) {
- testFailed("XMLHttpRequest.open() should not throw an exception.");
- }
-
- xhr.onload = function () {
- testFailed("XMLHttpRequest.send() should fail to follow the disallowed redirect.");
- finishJSTest();
- };
-
- xhr.onerror = function () {
- testPassed("XMLHttpRequest.send() did not follow the disallowed redirect.");
- finishJSTest();
- };
-
- xhr.send();
- </script>
-</script>
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698