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

Unified Diff: third_party/WebKit/LayoutTests/inspector-protocol/css/css-fonts-updated-event.html

Issue 2198463003: DevTools: add CSS.FontsUpdated event to signify that WebFont has loaded. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 4 years, 5 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector-protocol/css/css-fonts-updated-event-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/inspector-protocol/css/css-fonts-updated-event.html
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-fonts-updated-event.html b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-fonts-updated-event.html
new file mode 100644
index 0000000000000000000000000000000000000000..3f16f67a13eb58203811208bcb5ae6e5ef824d28
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-fonts-updated-event.html
@@ -0,0 +1,42 @@
+<html>
+<head>
+<link rel="stylesheet">
+<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
+<script type="text/javascript" src="../../http/tests/inspector-protocol/css-protocol-test.js"></script>
+<script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script>
+<script type="text/javascript">
+
+function loadWebFont()
+{
+ var link = document.querySelector("link");
+ link.href = "./resources/ahem.css";
+}
+
+function test()
+{
+ InspectorTest.requestDocumentNodeId(onDocumentNodeId);
+
+ function onDocumentNodeId(nodeId)
+ {
+ InspectorTest.eventHandler["CSS.fontsUpdated"] = fontsUpdated;
+ InspectorTest.sendCommandOrDie("CSS.enable", {}, onCSSEnabled);
+ }
+
+ function onCSSEnabled()
+ {
+ InspectorTest.sendCommandOrDie("Runtime.evaluate", {expression: "loadWebFont()"});
+ }
+
+ function fontsUpdated()
+ {
+ InspectorTest.log("SUCCESS: CSS.FontsUpdated event received.");
+ InspectorTest.completeTest();
+ }
+}
+
+</script>
+</head>
+<body onload="runTest();">
+<p>Verifies that CSS.fontsUpdated event is sent as the web font is loaded.</p>
+</body>
+</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector-protocol/css/css-fonts-updated-event-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698