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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/content-security-policy/style-src/style-src-error-event-fires.html

Issue 2784543003: Fixed wpt content-security-policy/style-src tests (Closed)
Patch Set: CR changes Created 3 years, 8 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!doctype html>
2 <html>
3 <head>
4 <meta http-equiv="Content-Security-Policy" content="style-src 'none';">
5 <script src="/resources/testharness.js"></script>
6 <script src="/resources/testharnessreport.js"></script>
7
8 <script>
9 function styleError(t) {
10 t.done();
11 }
12
13 function styleLoad(t) {
14 t.unreached_func("Should not be able to load style");
15 }
16
17 var t1 = async_test("Test error event fires on stylesheet link");
18 var t2 = async_test("Test error event fires on inline style")
19 </script>
20
21 </head>
22 <body>
23 <div id='log'></div>
24
25 <div id="content">Lorem ipsum</div>
26
27 <link onerror="styleError(t1)" onload="styleLoad(t1)" href="/content-securit y-policy/style-src/resources/style-src.css" rel=stylesheet type=text/css>
28
29 <style onerror="styleError(t2)" onload="styleLoad(t2)">
30 #content { margin-left: 2px; }
31 </style>
32
33 </body>
34 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698