OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 | 3 |
4 <style> | 4 <style> |
5 | 5 |
6 /* An inline stylesheet */ | 6 /* An inline stylesheet */ |
7 body.mainpage { | 7 body.mainpage { |
8 text-decoration: none; | 8 text-decoration: none; |
9 } | 9 } |
10 </style> | 10 </style> |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 } | 59 } |
60 | 60 |
61 InspectorTest.addResult("=== Original stylesheet text: ==="); | 61 InspectorTest.addResult("=== Original stylesheet text: ==="); |
62 InspectorTest.addResult(foundStyleSheetText); | 62 InspectorTest.addResult(foundStyleSheetText); |
63 InspectorTest.cssModel.addEventListener(WebInspector.CSSStyleModel.Event
s.StyleSheetChanged, next, this); | 63 InspectorTest.cssModel.addEventListener(WebInspector.CSSStyleModel.Event
s.StyleSheetChanged, next, this); |
64 InspectorTest.cssModel.setStyleSheetText(foundStyleSheetHeader.id, "h1 {
COLOR: Red; }", true).then(callback); | 64 InspectorTest.cssModel.setStyleSheetText(foundStyleSheetHeader.id, "h1 {
COLOR: Red; }", true).then(callback); |
65 } | 65 } |
66 | 66 |
67 function testNewElementStyles() | 67 function testNewElementStyles() |
68 { | 68 { |
69 function callback(error, matchedCSSRules) | 69 function callback(error, inlineStyle, attributeStyle, matchedCSSRules) |
70 { | 70 { |
71 if (error) { | 71 if (error) { |
72 InspectorTest.addResult("error: " + error); | 72 InspectorTest.addResult("error: " + error); |
73 return; | 73 return; |
74 } | 74 } |
75 | 75 |
76 InspectorTest.addResult("=== Matched rules for h1 after setText() ==
="); | 76 InspectorTest.addResult("=== Matched rules for h1 after setText() ==
="); |
77 dumpMatchesArray(matchedCSSRules); | 77 dumpMatchesArray(matchedCSSRules); |
78 InspectorTest.completeTest(); | 78 InspectorTest.completeTest(); |
79 } | 79 } |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 </script> | 112 </script> |
113 </head> | 113 </head> |
114 | 114 |
115 <body onload="runTest()"> | 115 <body onload="runTest()"> |
116 <p> | 116 <p> |
117 Tests that WebInspector.CSSStyleSheet methods work as expected. | 117 Tests that WebInspector.CSSStyleSheet methods work as expected. |
118 </p> | 118 </p> |
119 <h1 id="inspected">Inspect Me</h1> | 119 <h1 id="inspected">Inspect Me</h1> |
120 </body> | 120 </body> |
121 </html> | 121 </html> |
OLD | NEW |