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 11 matching lines...) Expand all Loading... |
22 | 22 |
23 findStyleSheet(); | 23 findStyleSheet(); |
24 | 24 |
25 function findStyleSheet() | 25 function findStyleSheet() |
26 { | 26 { |
27 var styleSheetHeaders = InspectorTest.cssModel.styleSheetHeaders(); | 27 var styleSheetHeaders = InspectorTest.cssModel.styleSheetHeaders(); |
28 for (var i = 0; i < styleSheetHeaders.length; ++i) { | 28 for (var i = 0; i < styleSheetHeaders.length; ++i) { |
29 styleSheetHeader = styleSheetHeaders[i]; | 29 styleSheetHeader = styleSheetHeaders[i]; |
30 if (styleSheetHeader.sourceURL.indexOf("get-set-stylesheet-text.css"
) >= 0) { | 30 if (styleSheetHeader.sourceURL.indexOf("get-set-stylesheet-text.css"
) >= 0) { |
31 foundStyleSheetHeader = styleSheetHeader; | 31 foundStyleSheetHeader = styleSheetHeader; |
32 foundStyleSheetHeader.requestContent(callback); | 32 foundStyleSheetHeader.requestContent().then(callback); |
33 } | 33 } |
34 if (!foundStyleSheetHeader) | 34 if (!foundStyleSheetHeader) |
35 InspectorTest.cssModel.addEventListener(WebInspector.CSSStyleMod
el.Events.StyleSheetAdded, styleSheetAdded); | 35 InspectorTest.cssModel.addEventListener(WebInspector.CSSStyleMod
el.Events.StyleSheetAdded, styleSheetAdded); |
36 } | 36 } |
37 | 37 |
38 function callback(content) | 38 function callback(content) |
39 { | 39 { |
40 foundStyleSheetText = content; | 40 foundStyleSheetText = content; |
41 InspectorTest.runTestSuite([ testSetText, testNewElementStyles ]); | 41 InspectorTest.runTestSuite([ testSetText, testNewElementStyles ]); |
42 } | 42 } |
(...skipping 69 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 |