| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../../../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../../../http/tests/inspector/inspector-test.js"></script> |
| 4 <script src="../../../http/tests/inspector/elements-test.js"></script> | 4 <script src="../../../http/tests/inspector/elements-test.js"></script> |
| 5 <style> | 5 <style> |
| 6 div { color: red; } | 6 div { color: red; } |
| 7 /*# sourceURL=set-style.css */ | 7 /*# sourceURL=set-style.css */ |
| 8 </style> | 8 </style> |
| 9 | 9 |
| 10 <style> | 10 <style> |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 <style> | 30 <style> |
| 31 div {} | 31 div {} |
| 32 /*# sourceURL=set-text.css */ | 32 /*# sourceURL=set-text.css */ |
| 33 </style> | 33 </style> |
| 34 | 34 |
| 35 <script> | 35 <script> |
| 36 | 36 |
| 37 function test() | 37 function test() |
| 38 { | 38 { |
| 39 InspectorTest.addSniffer(WebInspector.CSSModel.prototype, "_originalContentR
equestedForTest", onOriginalContentRequested, true); |
| 40 function onOriginalContentRequested(header) |
| 41 { |
| 42 InspectorTest.addResult("original content loaded for header: " + header.
sourceURL); |
| 43 } |
| 44 |
| 39 var headers = InspectorTest.cssModel.styleSheetHeaders(); | 45 var headers = InspectorTest.cssModel.styleSheetHeaders(); |
| 40 InspectorTest.runTestSuite([ | 46 InspectorTest.runTestSuite([ |
| 41 function testSetStyle(next) | 47 function testSetStyle(next) |
| 42 { | 48 { |
| 43 var header = headers.find(header => header.sourceURL.endsWith("set-s
tyle.css")); | 49 var header = headers.find(header => header.sourceURL.endsWith("set-s
tyle.css")); |
| 44 InspectorTest.cssModel.setStyleText(header.id, new WebInspector.Text
Range(1, 5, 1, 18), "EDITED: EDITED", true) | 50 InspectorTest.cssModel.setStyleText(header.id, new WebInspector.Text
Range(1, 5, 1, 18), "EDITED: EDITED", true) |
| 45 .then(success => onEdit(header, success)) | 51 .then(success => onEdit(header, success)) |
| 46 .then(next); | 52 .then(next); |
| 47 }, | 53 }, |
| 48 | 54 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 </script> | 120 </script> |
| 115 </head> | 121 </head> |
| 116 | 122 |
| 117 <body onload="runTest()"> | 123 <body onload="runTest()"> |
| 118 <p>Verifies that CSSStyleSheetHeader.originalContentProvider() indeed returns or
iginal content.</p> | 124 <p>Verifies that CSSStyleSheetHeader.originalContentProvider() indeed returns or
iginal content.</p> |
| 119 | 125 |
| 120 <div id="inspected"></div> | 126 <div id="inspected"></div> |
| 121 | 127 |
| 122 </body> | 128 </body> |
| 123 </html> | 129 </html> |
| OLD | NEW |