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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/connect-src-anchor-ping.html

Issue 2500023002: <a ping="..."> should be covered by connect-src CSP directive. (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/connect-src-anchor-ping-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/connect-src-anchor-ping.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/connect-src-anchor-ping.html b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/connect-src-anchor-ping.html
new file mode 100644
index 0000000000000000000000000000000000000000..99cca51f521fb0116f6aeafb8eef49621682b275
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/connect-src-anchor-ping.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta http-equiv="Content-Security-Policy" content="connect-src http://127.0.0.1:8000">
+<script>
+if (window.testRunner) {
+ testRunner.overridePreference("WebKitHyperlinkAuditingEnabled", 1);
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+}
+function onload() {
+ if (window.testRunner) {
+ anchor = document.getElementById('anchor');
+ anchor.click();
+ }
+}
+</script>
+</head>
+<body onload="onload();">
+ <p>
+ Tests whether "ping" attribute of an &lt;at&gt; / "anchor" tag is subject
+ to CSP enforcement (via 'connect-src').
+ </p>
+ <p>
+ <!-- Note that ping's URL has different origin from what was specified
+ in the content-src content security policy in the header above. -->
+ <a href="/resources/notify-done.html"
+ ping="https://localhost:8443/resources/dummy.txt"
+ id="anchor"
+ >Link</a>
+ </p>
+</body>
+</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/connect-src-anchor-ping-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698