Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(218)

Unified Diff: LayoutTests/inspector-protocol/css/css-set-inline-styleSheetText.html

Issue 172593003: DevTools: [CSS] Add CSS.editRangeInStyleSheetText() to the protocol (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix glitch Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/inspector-protocol/css/css-set-inline-styleSheetText.html
diff --git a/LayoutTests/inspector-protocol/css/css-set-inline-styleSheetText.html b/LayoutTests/inspector-protocol/css/css-set-inline-styleSheetText.html
index eca5feabf7b1876b2c45de46a458d3bb3f68b9a7..77f4d40c5c57114dbaa4e7410ffadae2ba5aa6cd 100644
--- a/LayoutTests/inspector-protocol/css/css-set-inline-styleSheetText.html
+++ b/LayoutTests/inspector-protocol/css/css-set-inline-styleSheetText.html
@@ -6,30 +6,18 @@
function test()
{
var inlineStyleSheetId;
- function sendCommand(command, properties, callback) {
- InspectorTest.sendCommand(command, properties || {}, commandCallback);
- function commandCallback(msg)
- {
- if (msg.error) {
- InspectorTest.log(msg.error.message);
- InspectorTest.completeTest();
- return;
- }
- callback(msg.result);
- }
- }
- InspectorTest.sendCommand("CSS.enable", {}, cssWasEnabled);
+ InspectorTest.sendCommandOrDie("CSS.enable", {}, cssWasEnabled);
function cssWasEnabled()
{
- sendCommand("DOM.getDocument", {}, onGotDocument);
+ InspectorTest.sendCommandOrDie("DOM.getDocument", {}, onGotDocument);
}
function onGotDocument(result)
{
var root = result.root;
- sendCommand("DOM.querySelector", {
+ InspectorTest.sendCommandOrDie("DOM.querySelector", {
nodeId: root.nodeId,
selector: "#inliner"
}, onGotNode);
@@ -37,19 +25,19 @@ function test()
function onGotNode(node)
{
- sendCommand("CSS.getInlineStylesForNode", { nodeId: node.nodeId }, onGotInlineStyles);
+ InspectorTest.sendCommandOrDie("CSS.getInlineStylesForNode", { nodeId: node.nodeId }, onGotInlineStyles);
}
function onGotInlineStyles(result)
{
inlineStyleSheetId = result.inlineStyle.styleId.styleSheetId;
- sendCommand("CSS.getStyleSheetText", { styleSheetId: inlineStyleSheetId }, onReceiveStyleSheetText);
+ InspectorTest.sendCommandOrDie("CSS.getStyleSheetText", { styleSheetId: inlineStyleSheetId }, onReceiveStyleSheetText);
}
function onReceiveStyleSheetText(result)
{
InspectorTest.log(result.text);
- sendCommand("CSS.setStyleSheetText", {
+ InspectorTest.sendCommandOrDie("CSS.setStyleSheetText", {
styleSheetId: inlineStyleSheetId,
text: "border: 1px solid black;"
}, onSetStyleSheetBody);
@@ -57,7 +45,7 @@ function test()
function onSetStyleSheetBody(result)
{
- sendCommand("CSS.getStyleSheetText", { styleSheetId: inlineStyleSheetId }, onCheckStyleSheetBody);
+ InspectorTest.sendCommandOrDie("CSS.getStyleSheetText", { styleSheetId: inlineStyleSheetId }, onCheckStyleSheetBody);
}
function onCheckStyleSheetBody(result)

Powered by Google App Engine
This is Rietveld 408576698