| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto
r-protocol-test.js"></script> | 3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto
r-protocol-test.js"></script> |
| 4 <script type="text/javascript" src="css-protocol-test.js"></script> | 4 <script type="text/javascript" src="css-protocol-test.js"></script> |
| 5 <script type="text/javascript"> | 5 <script type="text/javascript"> |
| 6 function test() | 6 function test() |
| 7 { | 7 { |
| 8 var setPropertyText; | 8 var setPropertyText; |
| 9 var verifyProtocolError; | 9 var verifyProtocolError; |
| 10 var dumpStyleSheet; | 10 var dumpStyleSheet; |
| 11 var documentNodeId; |
| 11 | 12 |
| 12 InspectorTest.sendCommandOrDie("CSS.enable", {}, onCSSEnabled); | 13 InspectorTest.requestDocumentNodeId(onDocumentNodeReceived); |
| 14 |
| 15 function onDocumentNodeReceived(nodeId) |
| 16 { |
| 17 documentNodeId = nodeId; |
| 18 InspectorTest.sendCommandOrDie("CSS.enable", {}, onCSSEnabled); |
| 19 } |
| 13 | 20 |
| 14 function onCSSEnabled() | 21 function onCSSEnabled() |
| 15 { | 22 { |
| 16 InspectorTest.requestNodeId("#reddiv", onNodeRecieved); | 23 InspectorTest.requestNodeId(documentNodeId, "#reddiv", onNodeRecieved); |
| 17 } | 24 } |
| 18 | 25 |
| 19 function onNodeRecieved(nodeId) | 26 function onNodeRecieved(nodeId) |
| 20 { | 27 { |
| 21 InspectorTest.sendCommandOrDie("CSS.getInlineStylesForNode", { | 28 InspectorTest.sendCommandOrDie("CSS.getInlineStylesForNode", { |
| 22 nodeId: nodeId, | 29 nodeId: nodeId, |
| 23 }, onInlineStyleRecieved); | 30 }, onInlineStyleRecieved); |
| 24 } | 31 } |
| 25 | 32 |
| 26 function onInlineStyleRecieved(result) | 33 function onInlineStyleRecieved(result) |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 }, | 88 }, |
| 82 ]; | 89 ]; |
| 83 } | 90 } |
| 84 | 91 |
| 85 </script> | 92 </script> |
| 86 </head> | 93 </head> |
| 87 <body onload="runTest();"> | 94 <body onload="runTest();"> |
| 88 <div id="reddiv" style="color: red; border: 0px;">Some red text goes here</d
iv> | 95 <div id="reddiv" style="color: red; border: 0px;">Some red text goes here</d
iv> |
| 89 </body> | 96 </body> |
| 90 </html> | 97 </html> |
| OLD | NEW |