Index: third_party/WebKit/LayoutTests/inspector-protocol/layout-fonts/resources/layout-font-test.js |
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/layout-fonts/resources/layout-font-test.js b/third_party/WebKit/LayoutTests/inspector-protocol/layout-fonts/resources/layout-font-test.js |
index f3efc867dbe447c503b6f2714929208aa9567414..996ca6b445380c5afe4ec10923c24807d16d32cb 100644 |
--- a/third_party/WebKit/LayoutTests/inspector-protocol/layout-fonts/resources/layout-font-test.js |
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/layout-fonts/resources/layout-font-test.js |
@@ -57,20 +57,13 @@ |
} |
- function platformFontsForElementWithSelector(selector) |
+ async function platformFontsForElementWithSelector(selector) |
{ |
- InspectorTest.requestNodeId(documentNodeId, selector, onNodeId); |
- |
- function onNodeId(nodeId) |
- { |
- InspectorTest.sendCommandOrDie("CSS.getPlatformFontsForNode", { nodeId: nodeId }, onGotComputedFonts); |
- } |
- |
- function onGotComputedFonts(response) |
- { |
- collectResults(response); |
- testNextPageElement(); |
- } |
+ var nodeId = await InspectorTest.requestNodeId(documentNodeId, selector); |
+ await InspectorTest.sendCommandOrDie("CSS.enable", {}); |
+ var response = await InspectorTest.sendCommandOrDie("CSS.getPlatformFontsForNode", { nodeId: nodeId }); |
+ collectResults(response); |
+ testNextPageElement(); |
} |
function collectResults(response) |