Index: third_party/WebKit/LayoutTests/http/tests/subresource_filter/resource-allowed.html |
diff --git a/third_party/WebKit/LayoutTests/http/tests/subresource_filter/resource-allowed.html b/third_party/WebKit/LayoutTests/http/tests/subresource_filter/resource-allowed.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b7a7a72c2a939a3b9b3458f19bf9bc3aa117b930 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/http/tests/subresource_filter/resource-allowed.html |
@@ -0,0 +1,25 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
+<script src="../resources/testharness.js"></script> |
+<script src="../resources/testharnessreport.js"></script> |
+</head> |
+<body> |
+<script type="text/javascript"> |
+if (window.testRunner) { |
+ // Inject a subresource filter that allows all loads. |
+ testRunner.setDisallowedSubresourcePathSuffixes([]); |
+} |
+ |
+async_test(t => { |
+ var s = document.createElement("script"); |
+ s.onload = t.step_func_done(_ => { |
+ assert_true(document.scriptExecuted, "The script should run."); |
+ }); |
+ s.onerror = t.unreached_func("The script should load."); |
+ s.src = "resources/included-script.js"; |
+ document.body.appendChild(s); |
+}, "Resources that aren't disallowed still load correctly."); |
+</script> |
+</body> |
+</html> |