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

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

Issue 1181213007: DevTools: introduce CSS.setStyleText, we'll migrate setPropertyText to it later. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: win fixed Created 5 years, 6 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 f6adbcff1dea1584c9a6f7a5194e61e798d72ca9..44e89207153209f5c0de654b3977cfd83f33b094 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);
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.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