| OLD | NEW |
| (Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto
r-protocol-test.js"></script> |
| 4 <script type="text/javascript" src="../../http/tests/inspector-protocol/css-prot
ocol-test.js"></script> |
| 5 <script type="text/javascript" src="../../http/tests/inspector-protocol/dom-prot
ocol-test.js"></script> |
| 6 <script type="text/javascript"> |
| 7 |
| 8 function test() |
| 9 { |
| 10 var documentNodeId; |
| 11 var addedStyleSheetCount = 0; |
| 12 var styleSheetClasses = []; |
| 13 InspectorTest.requestDocumentNodeId(onDocumentNodeId); |
| 14 function onDocumentNodeId(nodeId) |
| 15 { |
| 16 InspectorTest.eventHandler["CSS.styleSheetAdded"] = styleSheetAdded; |
| 17 InspectorTest.sendCommandOrDie("CSS.enable", {}); |
| 18 } |
| 19 |
| 20 function styleSheetAdded(response) |
| 21 { |
| 22 var styleSheetId = response.params.header.styleSheetId; |
| 23 InspectorTest.sendCommandOrDie("CSS.collectClassNames", { styleSheetId:
styleSheetId }, onClassNamesCollected); |
| 24 } |
| 25 |
| 26 function finalizeTest() |
| 27 { |
| 28 styleSheetClasses.sort(); |
| 29 for (var i = 0; i < styleSheetClasses.length; i++) |
| 30 InspectorTest.log(styleSheetClasses[i]); |
| 31 InspectorTest.completeTest(); |
| 32 } |
| 33 |
| 34 function onClassNamesCollected(response) |
| 35 { |
| 36 var classNames = response.classNames; |
| 37 for (var i=0; i < classNames.length; i++) |
| 38 styleSheetClasses.push(classNames[i]); |
| 39 |
| 40 if (++addedStyleSheetCount == 3) |
| 41 finalizeTest(); |
| 42 } |
| 43 }; |
| 44 |
| 45 window.addEventListener("DOMContentLoaded", function () { |
| 46 runTest(); |
| 47 }, false); |
| 48 |
| 49 </script> |
| 50 <link rel="stylesheet" href="resources/collect-class-names.css"/> |
| 51 <style> |
| 52 .inline1 { |
| 53 font-size: 12px; |
| 54 } |
| 55 </style> |
| 56 </head> |
| 57 <body> |
| 58 </body> |
| 59 </html> |
| OLD | NEW |