| 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>
|
|
|