| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 | 3 |
| 4 <style> | 4 <style> |
| 5 h1 { | 5 h1 { |
| 6 color: red; | 6 color: red; |
| 7 } | 7 } |
| 8 </style> | 8 </style> |
| 9 | 9 |
| 10 <script src="../../http/tests/inspector/inspector-test.js"></script> | 10 <script src="../../http/tests/inspector/inspector-test.js"></script> |
| 11 <script src="../../http/tests/inspector/elements-test.js"></script> | 11 <script src="../../http/tests/inspector/elements-test.js"></script> |
| 12 <script src="styles-test.js"></script> |
| 12 <script> | 13 <script> |
| 13 | 14 |
| 14 function test() | 15 function test() |
| 15 { | 16 { |
| 16 WebInspector.showPanel("elements"); | 17 WebInspector.showPanel("elements"); |
| 17 CSSAgent.getAllStyleSheets(styleSheetInfosLoaded); | 18 InspectorTest.waitForStylesheetsOnFrontend(1, styleSheetInfosLoaded); |
| 18 | 19 |
| 19 function styleSheetInfosLoaded(error, infos) | 20 function styleSheetInfosLoaded(styleSheets) |
| 20 { | 21 { |
| 21 if (error) { | 22 for (var i = 0; i < styleSheets.length; ++i) |
| 22 InspectorTest.addResult("error: " + error); | 23 CSSAgent.getStyleSheet(styleSheets[i].id, styleSheetLoaded); |
| 23 InspectorTest.completeTest(); | |
| 24 return; | |
| 25 } | |
| 26 | |
| 27 for (var i = 0; i < infos.length; ++i) | |
| 28 CSSAgent.getStyleSheet(infos[i].styleSheetId, styleSheetLoaded); | |
| 29 } | 24 } |
| 30 | 25 |
| 31 function styleSheetLoaded(error, styleSheet) | 26 function styleSheetLoaded(error, styleSheet) |
| 32 { | 27 { |
| 33 if (error) { | 28 if (error) { |
| 34 InspectorTest.addResult("error: " + error); | 29 InspectorTest.addResult("error: " + error); |
| 35 InspectorTest.completeTest(); | 30 InspectorTest.completeTest(); |
| 36 return; | 31 return; |
| 37 } | 32 } |
| 38 editRule(styleSheet.rules[0]); | 33 editRule(styleSheet.rules[0]); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 55 } | 50 } |
| 56 </script> | 51 </script> |
| 57 </head> | 52 </head> |
| 58 | 53 |
| 59 <body onload="runTest()"> | 54 <body onload="runTest()"> |
| 60 <p> | 55 <p> |
| 61 Tests that setting CSS property text out of boundaries does not crash. | 56 Tests that setting CSS property text out of boundaries does not crash. |
| 62 </p> | 57 </p> |
| 63 </body> | 58 </body> |
| 64 </html> | 59 </html> |
| OLD | NEW |