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

Side by Side Diff: chrome/browser/extensions/api/font_settings/font_settings_apitest.cc

Issue 1658793002: Update chrome for new prefs location. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
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 Extension API browser tests. 5 // Font Settings Extension API browser tests.
6 6
7 #include "base/prefs/pref_service.h"
8 #include "chrome/browser/extensions/extension_apitest.h" 7 #include "chrome/browser/extensions/extension_apitest.h"
9 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
11 #include "chrome/common/chrome_switches.h" 10 #include "chrome/common/chrome_switches.h"
12 #include "chrome/common/pref_names.h" 11 #include "chrome/common/pref_names.h"
12 #include "components/prefs/pref_service.h"
13 13
14 // Test of extension API on a standard profile. 14 // Test of extension API on a standard profile.
15 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, FontSettings) { 15 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, FontSettings) {
16 PrefService* prefs = browser()->profile()->GetPrefs(); 16 PrefService* prefs = browser()->profile()->GetPrefs();
17 prefs->SetString(prefs::kWebKitStandardFontFamilyKorean, "Tahoma"); 17 prefs->SetString(prefs::kWebKitStandardFontFamilyKorean, "Tahoma");
18 prefs->SetString(prefs::kWebKitSansSerifFontFamily, "Arial"); 18 prefs->SetString(prefs::kWebKitSansSerifFontFamily, "Arial");
19 prefs->SetInteger(prefs::kWebKitDefaultFontSize, 16); 19 prefs->SetInteger(prefs::kWebKitDefaultFontSize, 16);
20 prefs->SetInteger(prefs::kWebKitDefaultFixedFontSize, 14); 20 prefs->SetInteger(prefs::kWebKitDefaultFixedFontSize, 14);
21 prefs->SetInteger(prefs::kWebKitMinimumFontSize, 8); 21 prefs->SetInteger(prefs::kWebKitMinimumFontSize, 8);
22 22
23 EXPECT_TRUE(RunExtensionTest("font_settings/standard")) << message_; 23 EXPECT_TRUE(RunExtensionTest("font_settings/standard")) << message_;
24 } 24 }
25 25
26 // Test of extension API in incognito split mode. 26 // Test of extension API in incognito split mode.
27 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, FontSettingsIncognito) { 27 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, FontSettingsIncognito) {
28 PrefService* prefs = browser()->profile()->GetPrefs(); 28 PrefService* prefs = browser()->profile()->GetPrefs();
29 prefs->SetString(prefs::kWebKitStandardFontFamilyKorean, "Tahoma"); 29 prefs->SetString(prefs::kWebKitStandardFontFamilyKorean, "Tahoma");
30 prefs->SetString(prefs::kWebKitSansSerifFontFamily, "Arial"); 30 prefs->SetString(prefs::kWebKitSansSerifFontFamily, "Arial");
31 prefs->SetInteger(prefs::kWebKitDefaultFontSize, 16); 31 prefs->SetInteger(prefs::kWebKitDefaultFontSize, 16);
32 32
33 int flags = ExtensionApiTest::kFlagEnableIncognito | 33 int flags = ExtensionApiTest::kFlagEnableIncognito |
34 ExtensionApiTest::kFlagUseIncognito; 34 ExtensionApiTest::kFlagUseIncognito;
35 EXPECT_TRUE(RunExtensionSubtest("font_settings/incognito", 35 EXPECT_TRUE(RunExtensionSubtest("font_settings/incognito",
36 "launch.html", 36 "launch.html",
37 flags)); 37 flags));
38 } 38 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/font_settings/font_settings_api.cc ('k') | chrome/browser/extensions/api/history/history_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698