Index: third_party/WebKit/LayoutTests/inspector-protocol/css/css-set-inline-styleSheetText.html |
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-set-inline-styleSheetText.html b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-set-inline-styleSheetText.html |
index 44e89207153209f5c0de654b3977cfd83f33b094..9667efb4ade6f78ad2db38d0550b0f978b5e96bb 100644 |
--- a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-set-inline-styleSheetText.html |
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-set-inline-styleSheetText.html |
@@ -9,47 +9,29 @@ |
InspectorTest.sendCommand("CSS.enable", {}, cssWasEnabled); |
- function cssWasEnabled() |
+ async function cssWasEnabled() |
{ |
- InspectorTest.sendCommandOrDie("DOM.getDocument", {}, onGotDocument); |
- } |
- |
- function onGotDocument(result) |
- { |
+ var result = await InspectorTest.sendCommandOrDie("DOM.getDocument", {}); |
var root = result.root; |
- InspectorTest.sendCommandOrDie("DOM.querySelector", { |
+ var node = await InspectorTest.sendCommandOrDie("DOM.querySelector", { |
nodeId: root.nodeId, |
selector: "#inliner" |
- }, onGotNode); |
- } |
+ }); |
- function onGotNode(node) |
- { |
- InspectorTest.sendCommandOrDie("CSS.getInlineStylesForNode", { nodeId: node.nodeId }, onGotInlineStyles); |
- } |
+ await InspectorTest.sendCommandOrDie("CSS.enable", { }); |
- function onGotInlineStyles(result) |
- { |
+ result = await InspectorTest.sendCommandOrDie("CSS.getInlineStylesForNode", { nodeId: node.nodeId }); |
inlineStyleSheetId = result.inlineStyle.styleSheetId; |
- InspectorTest.sendCommandOrDie("CSS.getStyleSheetText", { styleSheetId: inlineStyleSheetId }, onReceiveStyleSheetText); |
- } |
- function onReceiveStyleSheetText(result) |
- { |
+ result = await InspectorTest.sendCommandOrDie("CSS.getStyleSheetText", { styleSheetId: inlineStyleSheetId }); |
InspectorTest.log(result.text); |
- InspectorTest.sendCommandOrDie("CSS.setStyleSheetText", { |
+ |
+ result = await InspectorTest.sendCommandOrDie("CSS.setStyleSheetText", { |
styleSheetId: inlineStyleSheetId, |
text: "border: 1px solid black;" |
- }, onSetStyleSheetBody); |
- } |
+ }); |
- function onSetStyleSheetBody(result) |
- { |
- InspectorTest.sendCommandOrDie("CSS.getStyleSheetText", { styleSheetId: inlineStyleSheetId }, onCheckStyleSheetBody); |
- } |
- |
- function onCheckStyleSheetBody(result) |
- { |
+ result = await InspectorTest.sendCommandOrDie("CSS.getStyleSheetText", { styleSheetId: inlineStyleSheetId }); |
InspectorTest.log(result.text); |
InspectorTest.completeTest(); |
} |