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"> | 4 <script type="text/javascript"> |
5 | 5 |
6 function test() | 6 function test() |
7 { | 7 { |
8 var inlineStyleSheetId; | 8 var inlineStyleSheetId; |
9 function sendCommand(command, properties, callback) { | 9 function sendCommand(command, properties, callback) { |
10 InspectorTest.sendCommand(command, properties || {}, commandCallback); | 10 InspectorTest.sendCommand(command, properties || {}, commandCallback); |
(...skipping 24 matching lines...) Expand all Loading... |
35 }, onGotNode); | 35 }, onGotNode); |
36 } | 36 } |
37 | 37 |
38 function onGotNode(node) | 38 function onGotNode(node) |
39 { | 39 { |
40 sendCommand("CSS.getInlineStylesForNode", { nodeId: node.nodeId }, onGot
InlineStyles); | 40 sendCommand("CSS.getInlineStylesForNode", { nodeId: node.nodeId }, onGot
InlineStyles); |
41 } | 41 } |
42 | 42 |
43 function onGotInlineStyles(result) | 43 function onGotInlineStyles(result) |
44 { | 44 { |
45 inlineStyleSheetId = result.inlineStyle.styleId.styleSheetId; | 45 inlineStyleSheetId = result.inlineStyle.styleSheetId; |
46 sendCommand("CSS.getStyleSheetText", { styleSheetId: inlineStyleSheetId
}, onReceiveStyleSheetText); | 46 sendCommand("CSS.getStyleSheetText", { styleSheetId: inlineStyleSheetId
}, onReceiveStyleSheetText); |
47 } | 47 } |
48 | 48 |
49 function onReceiveStyleSheetText(result) | 49 function onReceiveStyleSheetText(result) |
50 { | 50 { |
51 InspectorTest.log(result.text); | 51 InspectorTest.log(result.text); |
52 sendCommand("CSS.setStyleSheetText", { | 52 sendCommand("CSS.setStyleSheetText", { |
53 styleSheetId: inlineStyleSheetId, | 53 styleSheetId: inlineStyleSheetId, |
54 text: "border: 1px solid black;" | 54 text: "border: 1px solid black;" |
55 }, onSetStyleSheetBody); | 55 }, onSetStyleSheetBody); |
(...skipping 13 matching lines...) Expand all Loading... |
69 | 69 |
70 </script> | 70 </script> |
71 </head> | 71 </head> |
72 <body onload="runTest()"> | 72 <body onload="runTest()"> |
73 | 73 |
74 <div id="inliner" style="color: red;"> | 74 <div id="inliner" style="color: red;"> |
75 </div> | 75 </div> |
76 | 76 |
77 </body> | 77 </body> |
78 </html> | 78 </html> |
OLD | NEW |