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 10 matching lines...) Expand all Loading... |
21 InspectorTest.nodeWithId("inspected", nodeCallback); | 21 InspectorTest.nodeWithId("inspected", nodeCallback); |
22 | 22 |
23 function nodeCallback(node) | 23 function nodeCallback(node) |
24 { | 24 { |
25 nodeId = node.id; | 25 nodeId = node.id; |
26 InspectorTest.addNewRule("#inspected", successCallback); | 26 InspectorTest.addNewRule("#inspected", successCallback); |
27 } | 27 } |
28 | 28 |
29 function successCallback(section) | 29 function successCallback(section) |
30 { | 30 { |
31 rule = section.styleRule.rule(); | 31 rule = section.style().parentRule; |
32 InspectorTest.addResult("=== Rule added ==="); | 32 InspectorTest.addResult("=== Rule added ==="); |
33 InspectorTest.addResult(rule.selectorText() + " {" + rule.style.
cssText + "}"); | 33 InspectorTest.addResult(rule.selectorText() + " {" + rule.style.
cssText + "}"); |
34 InspectorTest.addResult("Selectors matching the (#inspected) nod
e: " + InspectorTest.matchingSelectors(rule)); | 34 InspectorTest.addResult("Selectors matching the (#inspected) nod
e: " + InspectorTest.matchingSelectors(rule)); |
35 next(); | 35 next(); |
36 } | 36 } |
37 }, | 37 }, |
38 | 38 |
39 function testAddProperty(next) | 39 function testAddProperty(next) |
40 { | 40 { |
41 rule.style.appendProperty("width", "100%", callback); | 41 rule.style.appendProperty("width", "100%", callback); |
(...skipping 70 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 |