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

Unified Diff: third_party/WebKit/LayoutTests/inspector-protocol/css/css-get-platform-fonts.html

Issue 2914663002: DevTools: require enabling CSS domain before running CSS.* commands. (Closed)
Patch Set: same Created 3 years, 7 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: third_party/WebKit/LayoutTests/inspector-protocol/css/css-get-platform-fonts.html
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-get-platform-fonts.html b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-get-platform-fonts.html
index 616c59419ca39a96d2793fa20c032603fca34065..bc8d88007d779c6397fd27fe80b8eb7f4fa50cf8 100644
--- a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-get-platform-fonts.html
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-get-platform-fonts.html
@@ -28,20 +28,13 @@ function test()
}
- function platformFontsForElementWithSelector(selector, callback)
+ async function platformFontsForElementWithSelector(selector, callback)
{
- InspectorTest.requestNodeId(documentNodeId, selector, onNodeId);
-
- function onNodeId(nodeId)
- {
- InspectorTest.sendCommandOrDie("CSS.getPlatformFontsForNode", { nodeId: nodeId }, onGotComputedFonts);
- }
-
- function onGotComputedFonts(response)
- {
- dumpComputedFonts(response);
- callback();
- }
+ var nodeId = await InspectorTest.requestNodeId(documentNodeId, selector);
+ await InspectorTest.sendCommandOrDie("CSS.enable", { });
+ var response = await InspectorTest.sendCommandOrDie("CSS.getPlatformFontsForNode", { nodeId: nodeId });
+ dumpComputedFonts(response);
+ callback();
}
function dumpComputedFonts(response)

Powered by Google App Engine
This is Rietveld 408576698