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

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

Issue 22903030: DevTools: CSS.getPlatformFontsForNode to return a cssFamilyName as well (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fixed description 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
« no previous file with comments | « no previous file | LayoutTests/inspector-protocol/css-get-platform-fonts-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script type="text/javascript" src="../http/tests/inspector-protocol/resources/p rotocol-test.js"></script> 3 <script type="text/javascript" src="../http/tests/inspector-protocol/resources/p rotocol-test.js"></script>
4 <script type="text/javascript"> 4 <script type="text/javascript">
5 5
6 function test() 6 function test()
7 { 7 {
8 function sendCommand(command, properties, callback) { 8 function sendCommand(command, properties, callback) {
9 InspectorTest.sendCommand(command, properties || {}, commandCallback); 9 InspectorTest.sendCommand(command, properties || {}, commandCallback);
10 function commandCallback(msg) 10 function commandCallback(msg)
(...skipping 14 matching lines...) Expand all
25 sendCommand("DOM.querySelector", { "nodeId": root.nodeId , "selector": " #fancy" }, onGotNode); 25 sendCommand("DOM.querySelector", { "nodeId": root.nodeId , "selector": " #fancy" }, onGotNode);
26 } 26 }
27 27
28 function onGotNode(node) 28 function onGotNode(node)
29 { 29 {
30 sendCommand("CSS.getPlatformFontsForNode", { "nodeId": node.nodeId }, on GotComputedFonts); 30 sendCommand("CSS.getPlatformFontsForNode", { "nodeId": node.nodeId }, on GotComputedFonts);
31 } 31 }
32 32
33 function onGotComputedFonts(response) 33 function onGotComputedFonts(response)
34 { 34 {
35 var cssFamilyName = response.cssFamilyName;
36 InspectorTest.log("cssFamilyName: " + cssFamilyName);
35 var fonts = response.fonts; 37 var fonts = response.fonts;
36 fonts.sort(function(a, b) { 38 fonts.sort(function(a, b) {
37 return b.glyphCount - a.glyphCount; 39 return b.glyphCount - a.glyphCount;
38 }); 40 });
39 for (var i = 0; i < fonts.length; ++i) 41 for (var i = 0; i < fonts.length; ++i)
40 fonts[i].familyName = "<Some-family-name-" + i + ">"; 42 fonts[i].familyName = "<Some-family-name-" + i + ">";
41 InspectorTest.log(JSON.stringify(fonts)); 43 InspectorTest.log(JSON.stringify(fonts));
42 InspectorTest.completeTest(); 44 InspectorTest.completeTest();
43 } 45 }
44 }; 46 };
(...skipping 23 matching lines...) Expand all
68 <body> 70 <body>
69 71
70 <div id="fancy"> 72 <div id="fancy">
71 First line. 73 First line.
72 <br> 74 <br>
73 Second line. 75 Second line.
74 </div> 76 </div>
75 77
76 </body> 78 </body>
77 </html> 79 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/inspector-protocol/css-get-platform-fonts-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698