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

Unified Diff: LayoutTests/http/tests/security/contentSecurityPolicy/script-src-blocked-error-event.html

Issue 1032033002: Fire error events for a variety of script and style failures. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed test failures Created 5 years, 9 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: LayoutTests/http/tests/security/contentSecurityPolicy/script-src-blocked-error-event.html
diff --git a/LayoutTests/http/tests/security/contentSecurityPolicy/script-src-blocked-error-event.html b/LayoutTests/http/tests/security/contentSecurityPolicy/script-src-blocked-error-event.html
new file mode 100644
index 0000000000000000000000000000000000000000..bc75adfb8b6be1636bc1074c61d509280a985735
--- /dev/null
+++ b/LayoutTests/http/tests/security/contentSecurityPolicy/script-src-blocked-error-event.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Script element has error on bad script-src</title>
+ <meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline'">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script>
+ window.result = false;
+ function scriptError() {
+ assert_equals(result, false, "Value should not be set");
+ done();
+ }
+ function scriptLoad() {
+ assert_unreached("Script loaded");
+ done();
+ }
+ </script>
+</head>
+ <body>
+ <script onload="scriptLoad();" onerror="scriptError();" src="http://localhost:8000/security/contentSecurityPolicy/resources/script-set-value.js"></script>
+ </body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698