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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/content-security-policy/font-src/font-stylesheet-font-blocked.sub.html

Issue 2777823003: Fixed and un-skipped csp/font-src wpt 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 <meta charset=utf-8>
3 <meta http-equiv="Content-Security-Policy" content="font-src 'none'">
4 <head>
5 <title>Test font does not load if it does not match font-src.</title>
6 <script src='/resources/testharness.js'></script>
7 <script src='/resources/testharnessreport.js'></script>
8 </head>
9 <body>
10 <div id="log"/>
11 <script>
12 async_test(function(t) {
13 var link = document.createElement('link');
14 link.rel="stylesheet";
15 link.type="text/css";
16 link.href="/content-security-policy/support/fonts.css";
17 // The stylesheet should stil load, even though the font contained does no t
18 link.onerror = t.unreached_func("Should have loaded the stylesheet.");
19 document.addEventListener("securitypolicyviolation", t.step_func_done(func tion(e) {
20 assert_equals(e.violatedDirective, "font-src");
21 }));
22 document.getElementsByTagName('head')[0].appendChild(link);
23 }, "Test font does not load if it does not match font-src.");
24 </script>
25 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698