| Index: third_party/WebKit/LayoutTests/http/tests/security/contentTypeOptions/block-text-as-script.html
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentTypeOptions/block-text-as-script.html b/third_party/WebKit/LayoutTests/http/tests/security/contentTypeOptions/block-text-as-script.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..ac36b7b6ccf3f5a54038eef56752bf599e4cab37
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/security/contentTypeOptions/block-text-as-script.html
|
| @@ -0,0 +1,26 @@
|
| +<!DOCTYPE html>
|
| +<head>
|
| + <title>Block 'text/csv' 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=text/csv&options=invalid"></script>
|
| + <script>
|
| + test(function () {
|
| + assert_equals(window.scriptsSuccessfullyLoaded, 0);
|
| + }, "text/csv scripts should be blocked.");
|
| + </script>
|
| + <script src="resources/script-with-header.pl?mime=text/html&options=invalid"></script>
|
| + <script src="resources/script-with-header.pl?mime=text/plain&options=invalid"></script>
|
| + <script>
|
| + test(function () {
|
| + assert_equals(window.scriptsSuccessfullyLoaded, 2);
|
| + }, "text/[not-csv] scripts should not be blocked.");
|
| + </script>
|
| +</body>
|
| +</html>
|
| +
|
|
|