OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <meta http-equiv="Content-Security-Policy" content="style-src https://*:443 'uns
afe-eval'"> | 3 <meta http-equiv="Content-Security-Policy" content="style-src https://*:443 'uns
afe-eval'"> |
4 <script src="../../../http/tests/inspector/inspector-test.js"></script> | 4 <script src="../../../http/tests/inspector/inspector-test.js"></script> |
5 <script src="../../../http/tests/inspector/elements-test.js"></script> | 5 <script src="../../../http/tests/inspector/elements-test.js"></script> |
6 <script> | 6 <script> |
7 | 7 |
8 function test() | 8 function test() |
9 { | 9 { |
10 var nodeId; | 10 var nodeId; |
(...skipping 30 matching lines...) Expand all Loading... |
41 rule.style.appendProperty("width", "100%", callback); | 41 rule.style.appendProperty("width", "100%", callback); |
42 | 42 |
43 function callback(success) | 43 function callback(success) |
44 { | 44 { |
45 InspectorTest.addResult("=== Added rule modified ==="); | 45 InspectorTest.addResult("=== Added rule modified ==="); |
46 if (!success) { | 46 if (!success) { |
47 InspectorTest.addResult("[!] No valid rule style received"); | 47 InspectorTest.addResult("[!] No valid rule style received"); |
48 InspectorTest.completeTest(); | 48 InspectorTest.completeTest(); |
49 } else { | 49 } else { |
50 dumpProperties(rule.style); | 50 dumpProperties(rule.style); |
51 rule.setSelectorText(nodeId, "body", successCallback); | 51 rule.setSelectorText(nodeId, "body").then(successCallback); |
52 } | 52 } |
53 } | 53 } |
54 | 54 |
55 function successCallback(success) | 55 function successCallback(success) |
56 { | 56 { |
57 if (!success) { | 57 if (!success) { |
58 InspectorTest.addResult("[!] Failed to change selector"); | 58 InspectorTest.addResult("[!] Failed to change selector"); |
59 InspectorTest.completeTest(); | 59 InspectorTest.completeTest(); |
60 return; | 60 return; |
61 } | 61 } |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 | 112 |
113 <body onload="runTest()"> | 113 <body onload="runTest()"> |
114 <p> | 114 <p> |
115 Tests that adding a new rule does not crash the renderer and modifying an inline
style does not report errors when forbidden by Content-Security-Policy. | 115 Tests that adding a new rule does not crash the renderer and modifying an inline
style does not report errors when forbidden by Content-Security-Policy. |
116 </p> | 116 </p> |
117 | 117 |
118 <div id="inspected">Text</div> | 118 <div id="inspected">Text</div> |
119 | 119 |
120 </body> | 120 </body> |
121 </html> | 121 </html> |
OLD | NEW |