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

Unified Diff: LayoutTests/http/tests/security/contentSecurityPolicy/resources/fail-to-inject-script.js

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/resources/fail-to-inject-script.js
diff --git a/LayoutTests/http/tests/security/contentSecurityPolicy/resources/fail-to-inject-script.js b/LayoutTests/http/tests/security/contentSecurityPolicy/resources/fail-to-inject-script.js
new file mode 100644
index 0000000000000000000000000000000000000000..1f896d1d84fa7c221cfd931b2d5606e7d6362259
--- /dev/null
+++ b/LayoutTests/http/tests/security/contentSecurityPolicy/resources/fail-to-inject-script.js
@@ -0,0 +1,9 @@
+var s = document.createElement('script');
+s.onerror = function() {
+ done();
+};
+s.onload = function() {
+ assert_unreached('Script loaded.');
+};
+document.body.appendChild(s);
+s.innerText = 'assert_unreached("Script should not run.");'

Powered by Google App Engine
This is Rietveld 408576698