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

Side by Side Diff: LayoutTests/inspector-protocol/dom-get-platform-fonts.html

Issue 22923010: DevTools: Add CSS.getPlatformFontsForNode in protocol.json (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script type="text/javascript" src="../http/tests/inspector-protocol/resources/p rotocol-test.js"></script>
4 <script type="text/javascript">
5
6 function test()
7 {
8 function sendCommand(command, properties, callback) {
9 InspectorTest.sendCommand(command, properties || {}, commandCallback);
10 function commandCallback(msg)
11 {
12 if (msg.error) {
13 InspectorTest.log(msg.error.message);
14 InspectorTest.completeTest();
15 return;
16 }
17 callback(msg.result);
18 }
19 }
20 sendCommand("DOM.getDocument", {}, onGotDocument);
21
22 function onGotDocument(result)
23 {
24 var root = result.root;
25 sendCommand("DOM.querySelector", { "nodeId": root.nodeId , "selector": " #fancy" }, onGotNode);
26 }
27
28 function onGotNode(node)
29 {
30 sendCommand("DOM.getPlatformFontsForNode", { "nodeId": node.nodeId }, on GotComputedFonts);
31 }
32
33 function onGotComputedFonts(renderTexts)
34 {
35 InspectorTest.log(JSON.stringify(renderTexts));
36 InspectorTest.completeTest();
37 }
38
39 };
40
41 window.addEventListener("DOMContentLoaded", function () {
42 runTest();
43 }, false);
44
45 </script>
46 <style>
47 #fancy {
48 font-family: 'Arial';
49 background-color: gray;
50 }
51 #fancy:first-letter {
52 font-family: 'Times New Roman';
53 font-size: 400%;
54 background-color: blue;
55 }
56
57 #fancy:first-line {
58 font-family: 'Courier New';
59 background-color: yellow;
60 }
61 </style>
62 </head>
63 <body>
64
65 <div id="fancy">
66 First line.
67 <br>
68 Second line.
69 </div>
70
71 </body>
72 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698