Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector-protocol / css / css-set-inline-styleSheetText.html
blob44e89207153209f5c0de654b3977cfd83f33b094
1 <html>
2 <head>
3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
4 <script type="text/javascript">
6 function test()
8 var inlineStyleSheetId;
10 InspectorTest.sendCommand("CSS.enable", {}, cssWasEnabled);
12 function cssWasEnabled()
14 InspectorTest.sendCommandOrDie("DOM.getDocument", {}, onGotDocument);
17 function onGotDocument(result)
19 var root = result.root;
20 InspectorTest.sendCommandOrDie("DOM.querySelector", {
21 nodeId: root.nodeId,
22 selector: "#inliner"
23 }, onGotNode);
26 function onGotNode(node)
28 InspectorTest.sendCommandOrDie("CSS.getInlineStylesForNode", { nodeId: node.nodeId }, onGotInlineStyles);
31 function onGotInlineStyles(result)
33 inlineStyleSheetId = result.inlineStyle.styleSheetId;
34 InspectorTest.sendCommandOrDie("CSS.getStyleSheetText", { styleSheetId: inlineStyleSheetId }, onReceiveStyleSheetText);
37 function onReceiveStyleSheetText(result)
39 InspectorTest.log(result.text);
40 InspectorTest.sendCommandOrDie("CSS.setStyleSheetText", {
41 styleSheetId: inlineStyleSheetId,
42 text: "border: 1px solid black;"
43 }, onSetStyleSheetBody);
46 function onSetStyleSheetBody(result)
48 InspectorTest.sendCommandOrDie("CSS.getStyleSheetText", { styleSheetId: inlineStyleSheetId }, onCheckStyleSheetBody);
51 function onCheckStyleSheetBody(result)
53 InspectorTest.log(result.text);
54 InspectorTest.completeTest();
58 </script>
59 </head>
60 <body onload="runTest()">
62 <div id="inliner" style="color: red;">
63 </div>
65 </body>
66 </html>