OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <link rel="stylesheet" href="resources/set-active-property-value.css"/> | 3 <link rel="stylesheet" href="resources/set-active-property-value.css"/> |
4 <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/inspecto
r-protocol-test.js"></script> |
5 <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/css-prot
ocol-test.js"></script> |
6 <script type="text/javascript" src="../../http/tests/inspector-protocol/dom-prot
ocol-test.js"></script> | 6 <script type="text/javascript" src="../../http/tests/inspector-protocol/dom-prot
ocol-test.js"></script> |
7 <script type="text/javascript"> | 7 <script type="text/javascript"> |
8 | 8 |
9 function test() | 9 function test() |
10 { | 10 { |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 function testChangeInlineImportantProperty(next) | 66 function testChangeInlineImportantProperty(next) |
67 { | 67 { |
68 updateProperty("margin-top", "101px", dumpUndoAndNext(next)); | 68 updateProperty("margin-top", "101px", dumpUndoAndNext(next)); |
69 }, | 69 }, |
70 | 70 |
71 function testChangeMissingProperty(next) | 71 function testChangeMissingProperty(next) |
72 { | 72 { |
73 updateProperty("margin-bottom", "101px", dumpUndoAndNext(next)); | 73 updateProperty("margin-bottom", "101px", dumpUndoAndNext(next)); |
74 }, | 74 }, |
75 | 75 |
76 function testChangeCSSOMEDProperty(next) | |
77 { | |
78 InspectorTest.evaluateInInspectedPage("document.styleSheets[0].cssRu
les[0].style.marginBottom = \"10px\"", onEvaluate); | |
79 | |
80 function onEvaluate() | |
81 { | |
82 updateProperty("margin-bottom", "101px", dumpUndoAndNext(next)); | |
83 } | |
84 }, | |
85 | |
86 function testAppendWithSeparator(next) | 76 function testAppendWithSeparator(next) |
87 { | 77 { |
88 | 78 |
89 InspectorTest.loadAndDumpInlineAndMatchingRules(documentNodeId, "#ap
pend-test", InspectorTest.requestNodeId.bind(null, documentNodeId, "#append-test
", modify)); | 79 InspectorTest.loadAndDumpInlineAndMatchingRules(documentNodeId, "#ap
pend-test", InspectorTest.requestNodeId.bind(null, documentNodeId, "#append-test
", modify)); |
90 | 80 |
91 function modify(nodeId) | 81 function modify(nodeId) |
92 { | 82 { |
93 InspectorTest.log("Resulting styles"); | 83 InspectorTest.log("Resulting styles"); |
94 InspectorTest.sendCommandOrDie("CSS.setEffectivePropertyValueFor
Node", {"nodeId" : nodeId, "propertyName" : "padding-right", "value" : "101px"},
dumpUndoAndNext(next, "#append-test")); | 84 InspectorTest.sendCommandOrDie("CSS.setEffectivePropertyValueFor
Node", {"nodeId" : nodeId, "propertyName" : "padding-right", "value" : "101px"},
dumpUndoAndNext(next, "#append-test")); |
95 } | 85 } |
96 } | 86 } |
97 ] | 87 ] |
98 } | 88 } |
99 | 89 |
100 </script> | 90 </script> |
101 </head> | 91 </head> |
102 <body onload="runTest();"> | 92 <body onload="runTest();"> |
103 <p>The test verifies functionality of protocol method CSS.setStyleText.</p> | 93 <p>The test verifies functionality of protocol method CSS.setStyleText.</p> |
104 <div id="inspected" style="padding-top: 55px; margin-top: 33px !important;"></di
v> | 94 <div id="inspected" style="padding-top: 55px; margin-top: 33px !important;"></di
v> |
105 <div id="append-test" style="padding-left: 10px"/> | 95 <div id="append-test" style="padding-left: 10px"/> |
106 </body> | 96 </body> |
107 </html> | 97 </html> |
OLD | NEW |