| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 { | 66 { |
| 67 InspectorTest.addResult("[!] Failed to change selector"); | 67 InspectorTest.addResult("[!] Failed to change selector"); |
| 68 InspectorTest.completeTest(); | 68 InspectorTest.completeTest(); |
| 69 } | 69 } |
| 70 }, | 70 }, |
| 71 | 71 |
| 72 function testModifyInlineStyle(next) | 72 function testModifyInlineStyle(next) |
| 73 { | 73 { |
| 74 InspectorTest.cssModel.getInlineStylesAsync(nodeId, stylesCallback); | 74 InspectorTest.cssModel.getInlineStylesAsync(nodeId, stylesCallback); |
| 75 | 75 |
| 76 function stylesCallback(inlineStyle) | 76 function stylesCallback(inlineStyleResult) |
| 77 { | 77 { |
| 78 if (!inlineStyle) { | 78 if (!inlineStyleResult || !inlineStyleResult.inlineStyle) { |
| 79 InspectorTest.completeTest(); | 79 InspectorTest.completeTest(); |
| 80 return; | 80 return; |
| 81 } | 81 } |
| 82 inlineStyle.appendProperty("font-size", "14px", appendCallback); | 82 inlineStyleResult.inlineStyle.appendProperty("font-size", "14px"
, appendCallback); |
| 83 } | 83 } |
| 84 | 84 |
| 85 function appendCallback(newStyle) | 85 function appendCallback(newStyle) |
| 86 { | 86 { |
| 87 InspectorTest.addResult("=== Inline style modified ==="); | 87 InspectorTest.addResult("=== Inline style modified ==="); |
| 88 if (!newStyle) { | 88 if (!newStyle) { |
| 89 InspectorTest.addResult("No valid inline style received"); | 89 InspectorTest.addResult("No valid inline style received"); |
| 90 InspectorTest.completeTest(); | 90 InspectorTest.completeTest(); |
| 91 return; | 91 return; |
| 92 } | 92 } |
| (...skipping 18 matching lines...) Expand all Loading... |
| 111 | 111 |
| 112 <body onload="runTest()"> | 112 <body onload="runTest()"> |
| 113 <p> | 113 <p> |
| 114 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. | 114 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 </p> | 115 </p> |
| 116 | 116 |
| 117 <div id="inspected">Text</div> | 117 <div id="inspected">Text</div> |
| 118 | 118 |
| 119 </body> | 119 </body> |
| 120 </html> | 120 </html> |
| OLD | NEW |