| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 } | 44 } |
| 45 | 45 |
| 46 allRules = rules.matchedCSSRules; | 46 allRules = rules.matchedCSSRules; |
| 47 next(); | 47 next(); |
| 48 } | 48 } |
| 49 }, | 49 }, |
| 50 | 50 |
| 51 function testAddProperty(next) | 51 function testAddProperty(next) |
| 52 { | 52 { |
| 53 for (var i = 0; i < allRules.length; ++i) { | 53 for (var i = 0; i < allRules.length; ++i) { |
| 54 if (allRules[i].isRegular) { | 54 if (allRules[i].isRegular()) { |
| 55 rule = allRules[i]; | 55 rule = allRules[i]; |
| 56 break; | 56 break; |
| 57 } | 57 } |
| 58 } | 58 } |
| 59 rule.style.appendProperty("width", "100%", callback); | 59 rule.style.appendProperty("width", "100%", callback); |
| 60 function callback(newStyle) | 60 function callback(newStyle) |
| 61 { | 61 { |
| 62 InspectorTest.addResult("=== Rule modified ==="); | 62 InspectorTest.addResult("=== Rule modified ==="); |
| 63 if (!newStyle) { | 63 if (!newStyle) { |
| 64 InspectorTest.addResult("[!] No valid rule style received"); | 64 InspectorTest.addResult("[!] No valid rule style received"); |
| (...skipping 34 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 |