| OLD | NEW |
| 1 function initialize_cssTest() | 1 function initialize_cssTest() |
| 2 { | 2 { |
| 3 | 3 |
| 4 InspectorTest.dumpStyleSheetText = function(styleSheetId, callback) | 4 InspectorTest.dumpStyleSheetText = function(styleSheetId, callback) |
| 5 { | 5 { |
| 6 InspectorTest.sendCommandOrDie("CSS.getStyleSheetText", { styleSheetId: styl
eSheetId }, onStyleSheetText); | 6 InspectorTest.sendCommandOrDie("CSS.getStyleSheetText", { styleSheetId: styl
eSheetId }, onStyleSheetText); |
| 7 function onStyleSheetText(result) | 7 function onStyleSheetText(result) |
| 8 { | 8 { |
| 9 InspectorTest.log("==== Style sheet text ===="); | 9 InspectorTest.log("==== Style sheet text ===="); |
| 10 InspectorTest.log(result.text); | 10 InspectorTest.log(result.text); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 InspectorTest.dumpStyleSheetText(styleSheetId, callback); | 26 InspectorTest.dumpStyleSheetText(styleSheetId, callback); |
| 27 } | 27 } |
| 28 | 28 |
| 29 function onResponse(message) | 29 function onResponse(message) |
| 30 { | 30 { |
| 31 if (!message.error) { | 31 if (!message.error) { |
| 32 InspectorTest.log("ERROR: protocol method call did not return expect
ed error. Instead, the following message was received: " + JSON.stringify(messag
e)); | 32 InspectorTest.log("ERROR: protocol method call did not return expect
ed error. Instead, the following message was received: " + JSON.stringify(messag
e)); |
| 33 InspectorTest.completeTest(); | 33 InspectorTest.completeTest(); |
| 34 return; | 34 return; |
| 35 } | 35 } |
| 36 InspectorTest.log("Expected protocol error: " + message.error.message); | 36 InspectorTest.log("Expected protocol error: " + message.error.message +
(message.error.data ? " (" + message.error.data + ")" : "")); |
| 37 callback(); | 37 callback(); |
| 38 } | 38 } |
| 39 } | 39 } |
| 40 | 40 |
| 41 InspectorTest.setPropertyText = modifyStyleSheet.bind(null, "CSS.setPropertyText
", true); | 41 InspectorTest.setPropertyText = modifyStyleSheet.bind(null, "CSS.setPropertyText
", true); |
| 42 InspectorTest.setRuleSelector = modifyStyleSheet.bind(null, "CSS.setRuleSelector
", true); | 42 InspectorTest.setRuleSelector = modifyStyleSheet.bind(null, "CSS.setRuleSelector
", true); |
| 43 InspectorTest.setMediaText = modifyStyleSheet.bind(null, "CSS.setMediaText", tru
e); | 43 InspectorTest.setMediaText = modifyStyleSheet.bind(null, "CSS.setMediaText", tru
e); |
| 44 InspectorTest.addRule = modifyStyleSheet.bind(null, "CSS.addRule", true); | 44 InspectorTest.addRule = modifyStyleSheet.bind(null, "CSS.addRule", true); |
| 45 InspectorTest.setStyleTexts = function(styleSheetId, expectError, edits, callbac
k) | 45 InspectorTest.setStyleTexts = function(styleSheetId, expectError, edits, callbac
k) |
| 46 { | 46 { |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 { | 194 { |
| 195 if (!omitLog) | 195 if (!omitLog) |
| 196 InspectorTest.log("Dumping inline style: "); | 196 InspectorTest.log("Dumping inline style: "); |
| 197 InspectorTest.log("{"); | 197 InspectorTest.log("{"); |
| 198 InspectorTest.dumpStyle(result.inlineStyle, 0); | 198 InspectorTest.dumpStyle(result.inlineStyle, 0); |
| 199 InspectorTest.log("}"); | 199 InspectorTest.log("}"); |
| 200 InspectorTest.loadAndDumpMatchingRulesForNode(nodeId, callback, omitLog) | 200 InspectorTest.loadAndDumpMatchingRulesForNode(nodeId, callback, omitLog) |
| 201 } | 201 } |
| 202 } | 202 } |
| 203 } | 203 } |
| OLD | NEW |