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

Unified Diff: LayoutTests/http/tests/security/contentSecurityPolicy/1.1/stylehash-basic-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/1.1/stylehash-basic-blocked-error-event.html
diff --git a/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/stylehash-basic-blocked-error-event.html b/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/stylehash-basic-blocked-error-event.html
new file mode 100644
index 0000000000000000000000000000000000000000..893518e4f8358a5dac609aeb04b12f8415001309
--- /dev/null
+++ b/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/stylehash-basic-blocked-error-event.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Style element has error on bad style hash</title>
+ <meta http-equiv="Content-Security-Policy" content="style-src 'sha1-pfeR5wMA6np45oqDTP6Pj3tLpJo='">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script>
+ function styleError() {
+ var color = window.getComputedStyle(document.querySelector('p')).color;
+ assert_equals(color, "rgb(0, 128, 0)", "The color of the paragraph is still green.");
+ done();
+ }
+ </script>
+ <style>p { color: green; }</style>
+ <style onerror="styleError();">p { color: red; }</style>
+</head>
+ <p>A test paragraph</p>
+</html>

Powered by Google App Engine
This is Rietveld 408576698