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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/content-security-policy/blink-contrib-2/stylenonce-allowed.sub.html

Issue 2695813009: Import wpt@503f5b5f78ec4e87d144f78609f363f0ed0ea8db (Closed)
Patch Set: Skip some tests Created 3 years, 10 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
4 <head>
5 <!-- Programmatically converted from a WebKit Reftest, please forgive result ing idiosyncracies.-->
6 <title>stylenonce-allowed</title>
7 <script src="/resources/testharness.js"></script>
8 <script src="/resources/testharnessreport.js"></script>
9 <script src="../support/logTest.sub.js?logs=[]"></script>
10 <script src="../support/alertAssert.sub.js?alerts=[]"></script>
11 <!-- enforcing policy:
12 style-src 'self' nonce-noncynonce' 'nonce-noncy+/nonce='; script-src 'self' 'uns afe-inline'; connect-src 'self';
13 -->
14 <script></script>
15 <style nonce="noncynonce">
16 #test1 {
17 color: green;
18 }
19
20 </style>
21 <style>
22 #test1 {
23 color: red;
24 }
25
26 </style>
27 <style nonce="noncynonce">
28 #test2 {
29 color: green;
30 }
31
32 </style>
33 </head>
34
35 <body>
36 <p id="test1">This text should be green.</p>
37 <p id="test2">This text should also be green.</p>
38 <script>
39 var el = document.querySelector('#test1');
40 test(function() {
41 assert_equals(window.getComputedStyle(el).color, "rgb(0, 128, 0)")
42 });
43 var el = document.querySelector('#test2');
44 test(function() {
45 assert_equals(window.getComputedStyle(el).color, "rgb(0, 128, 0)")
46 });
47
48 </script>
49 <p>Style correctly whitelisted via a 'nonce-*' expression in 'style-src' sho uld be applied to the page.</p>
50 <div id="log"></div>
51 <script async defer src="../support/checkReport.sub.js?reportExists=true&amp ;reportField=violated-directive&amp;reportValue=style-src%20&apos;nonce-noncynon ce&apos;%20&apos;nonce-noncy+/nonce=&apos;"></script>
52 </body>
53
54 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698