| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <link rel="stylesheet" href="http://localhost:8000/inspector/elements/styles/mod
ify-cross-domain-rule.css"> | 3 <link rel="stylesheet" href="http://localhost:8000/inspector/elements/styles/mod
ify-cross-domain-rule.css"> |
| 4 <script src="inspector-test.js"></script> | 4 <script src="inspector-test.js"></script> |
| 5 <script src="elements-test.js"></script> | 5 <script src="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 14 matching lines...) Expand all Loading... |
| 25 nodeId = parseInt(id, 10); | 25 nodeId = parseInt(id, 10); |
| 26 break; | 26 break; |
| 27 } | 27 } |
| 28 } | 28 } |
| 29 | 29 |
| 30 if (!nodeId) { | 30 if (!nodeId) { |
| 31 InspectorTest.completeTest(); | 31 InspectorTest.completeTest(); |
| 32 return; | 32 return; |
| 33 } | 33 } |
| 34 | 34 |
| 35 InspectorTest.cssModel.getMatchedStylesAsync(nodeId, false, fals
e, callback); | 35 InspectorTest.cssModel.matchedStylesPromise(nodeId, false, false
).then(callback); |
| 36 } | 36 } |
| 37 | 37 |
| 38 function callback(rules) | 38 function callback(rules) |
| 39 { | 39 { |
| 40 if (!rules || !rules.matchedCSSRules || !rules.matchedCSSRules.l
ength) { | 40 if (!rules || !rules.matchedCSSRules || !rules.matchedCSSRules.l
ength) { |
| 41 InspectorTest.addResult("[!] No rules found"); | 41 InspectorTest.addResult("[!] No rules found"); |
| 42 InspectorTest.completeTest(); | 42 InspectorTest.completeTest(); |
| 43 return; | 43 return; |
| 44 } | 44 } |
| 45 | 45 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 | 99 |
| 100 <body onload="runTest()"> | 100 <body onload="runTest()"> |
| 101 <p> | 101 <p> |
| 102 Tests that modifying a rule in a stylesheet loaded from a different domain does
not crash the renderer. | 102 Tests that modifying a rule in a stylesheet loaded from a different domain does
not crash the renderer. |
| 103 </p> | 103 </p> |
| 104 | 104 |
| 105 <div id="inspected">Text</div> | 105 <div id="inspected">Text</div> |
| 106 | 106 |
| 107 </body> | 107 </body> |
| 108 </html> | 108 </html> |
| OLD | NEW |