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

Side by Side Diff: chrome/test/data/extensions/api_test/font_settings/test.js

Issue 9853013: Expose more font size prefs to the Font Settings Extension API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: "true" to true Created 8 years, 8 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 | « chrome/common/extensions/docs/samples.json ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Font settings API test 5 // Font settings API test
6 // Run with browser_tests --gtest_filter=ExtensionApiTest.FontSettings 6 // Run with browser_tests --gtest_filter=ExtensionApiTest.FontSettings
7 7
8 var fs = chrome.experimental.fontSettings; 8 var fs = chrome.experimental.fontSettings;
9 9
10 function expect(expected, message) { 10 function expect(expected, message) {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 chrome.test.assertEq('string', typeof(value[0].localizedName), message); 57 chrome.test.assertEq('string', typeof(value[0].localizedName), message);
58 })); 58 }));
59 }, 59 },
60 60
61 function setDefaultFontSize() { 61 function setDefaultFontSize() {
62 fs.setDefaultFontSize({ 62 fs.setDefaultFontSize({
63 pixelSize: 22 63 pixelSize: 22
64 }, chrome.test.callbackPass()); 64 }, chrome.test.callbackPass());
65 }, 65 },
66 66
67 function setDefaultFixedFontSize() {
68 fs.setDefaultFixedFontSize({
69 pixelSize: 42
70 }, chrome.test.callbackPass());
71 },
72
73 function setMinimumFontSize() {
74 fs.setMinimumFontSize({
75 pixelSize: 7
76 }, chrome.test.callbackPass());
77 },
78
67 function getDefaultFontSize() { 79 function getDefaultFontSize() {
68 var expected = 22; 80 var expected = 22;
69 var message = 'Setting for default font size should be ' + expected; 81 var message = 'Setting for default font size should be ' + expected;
70 fs.getDefaultFontSize({}, expect({pixelSize: expected}, message)); 82 fs.getDefaultFontSize({}, expect({pixelSize: expected}, message));
83 },
84
85 function getDefaultFontSizeOmitDetails() {
86 var expected = 22;
87 var message = 'Setting for default font size should be ' + expected;
88 fs.getDefaultFontSize(expect({pixelSize: expected}, message));
89 },
90
91 function getDefaultFixedFontSize() {
92 var expected = 42;
93 var message = 'Setting for default fixed font size should be ' + expected;
94 fs.getDefaultFixedFontSize({}, expect({pixelSize: expected}, message));
95 },
96
97 function getMinimumFontSize() {
98 var expected = 7;
99 var message = 'Setting for minimum font size should be ' + expected;
100 fs.getMinimumFontSize({}, expect({pixelSize: expected}, message));
71 } 101 }
72 ]); 102 ]);
OLDNEW
« no previous file with comments | « chrome/common/extensions/docs/samples.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698