OLD | NEW |
(Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <link rel="stylesheet"> |
| 4 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto
r-protocol-test.js"></script> |
| 5 <script type="text/javascript" src="../../http/tests/inspector-protocol/css-prot
ocol-test.js"></script> |
| 6 <script type="text/javascript" src="../../http/tests/inspector-protocol/dom-prot
ocol-test.js"></script> |
| 7 <script type="text/javascript"> |
| 8 |
| 9 function loadWebFont() |
| 10 { |
| 11 var link = document.querySelector("link"); |
| 12 link.href = "./resources/ahem.css"; |
| 13 } |
| 14 |
| 15 function test() |
| 16 { |
| 17 InspectorTest.requestDocumentNodeId(onDocumentNodeId); |
| 18 |
| 19 function onDocumentNodeId(nodeId) |
| 20 { |
| 21 InspectorTest.eventHandler["CSS.fontsUpdated"] = fontsUpdated; |
| 22 InspectorTest.sendCommandOrDie("CSS.enable", {}, onCSSEnabled); |
| 23 } |
| 24 |
| 25 function onCSSEnabled() |
| 26 { |
| 27 InspectorTest.sendCommandOrDie("Runtime.evaluate", {expression: "loadWeb
Font()"}); |
| 28 } |
| 29 |
| 30 function fontsUpdated() |
| 31 { |
| 32 InspectorTest.log("SUCCESS: CSS.FontsUpdated event received."); |
| 33 InspectorTest.completeTest(); |
| 34 } |
| 35 } |
| 36 |
| 37 </script> |
| 38 </head> |
| 39 <body onload="runTest();"> |
| 40 <p>Verifies that CSS.fontsUpdated event is sent as the web font is loaded.</p> |
| 41 </body> |
| 42 </html> |
OLD | NEW |