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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/security/contentTypeOptions/block-video-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
Index: third_party/WebKit/LayoutTests/http/tests/security/contentTypeOptions/block-video-as-script.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentTypeOptions/block-video-as-script.html b/third_party/WebKit/LayoutTests/http/tests/security/contentTypeOptions/block-video-as-script.html
new file mode 100644
index 0000000000000000000000000000000000000000..4352a144547e0f8140434ffbf16c890280ef3386
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/security/contentTypeOptions/block-video-as-script.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<head>
+ <title>Block 'video/*' 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=video/avi&amp;options=invalid"></script>
+ <script src="resources/script-with-header.pl?mime=ViDeO/fli&amp;options=invalid"></script>
+ <script src="resources/script-with-header.pl?mime=video/x-motion-jpeg&amp;options=invalid"></script>
+ <script src="resources/script-with-header.pl?mime=video/whatever+xml&amp;options=invalid"></script>
+ <script>
+ test(function () {
+ assert_equals(window.scriptsSuccessfullyLoaded, 0);
+ }, "All video/* scripts should be blocked.");
+ </script>
+</body>
+</html>
+

Powered by Google App Engine
This is Rietveld 408576698