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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/security/contentTypeOptions/block-audio-as-script.html

Issue 2294283002: Stop sniffing 'audio/', 'video/', and 'text/csv' into script. (Closed)
Patch Set: rebase Created 4 years, 3 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/security/contentTypeOptions/block-text-as-script.html » ('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/contentTypeOptions/block-audio-as-script.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentTypeOptions/block-audio-as-script.html b/third_party/WebKit/LayoutTests/http/tests/security/contentTypeOptions/block-audio-as-script.html
new file mode 100644
index 0000000000000000000000000000000000000000..40929320b3592ab68bd9288b56b4b5424c3ccf74
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/security/contentTypeOptions/block-audio-as-script.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<head>
+ <title>Block 'audio/*' when served as script.</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script>
+ window.scriptsSuccessfullyLoaded = 0;
+ </script>
+</head>
+<body>
+ <script src="resources/script-with-header.pl?mime=audio/aiff&amp;options=invalid"></script>
+ <script src="resources/script-with-header.pl?mime=AudiO/midi&amp;options=invalid"></script>
+ <script src="resources/script-with-header.pl?mime=AUDIO/wav&amp;options=invalid"></script>
+ <script src="resources/script-with-header.pl?mime=audio/x-wav&amp;options=invalid"></script>
+ <script src="resources/script-with-header.pl?mime=audio/whatever+xml&amp;options=invalid"></script>
+ <script>
+ test(function () {
+ assert_equals(window.scriptsSuccessfullyLoaded, 0);
+ }, "All audio/* scripts should be blocked.");
+ </script>
+</body>
+</html>
+
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/security/contentTypeOptions/block-text-as-script.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698