Add new certificateProvider extension API.
[chromium-blink-merge.git] / chrome / browser / extensions / api / font_settings / font_settings_apitest.cc
blob64733a82d99cd516139e76bdbe6a6b2742136209
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
3 // found in the LICENSE file.
5 // Font Settings Extension API browser tests.
7 #include "base/prefs/pref_service.h"
8 #include "chrome/browser/extensions/extension_apitest.h"
9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/ui/browser.h"
11 #include "chrome/common/chrome_switches.h"
12 #include "chrome/common/pref_names.h"
14 // Test of extension API on a standard profile.
15 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, FontSettings) {
16 PrefService* prefs = browser()->profile()->GetPrefs();
17 prefs->SetString(prefs::kWebKitStandardFontFamilyKorean, "Tahoma");
18 prefs->SetString(prefs::kWebKitSansSerifFontFamily, "Arial");
19 prefs->SetInteger(prefs::kWebKitDefaultFontSize, 16);
20 prefs->SetInteger(prefs::kWebKitDefaultFixedFontSize, 14);
21 prefs->SetInteger(prefs::kWebKitMinimumFontSize, 8);
23 EXPECT_TRUE(RunExtensionTest("font_settings/standard")) << message_;
26 // Test of extension API in incognito split mode.
27 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, FontSettingsIncognito) {
28 PrefService* prefs = browser()->profile()->GetPrefs();
29 prefs->SetString(prefs::kWebKitStandardFontFamilyKorean, "Tahoma");
30 prefs->SetString(prefs::kWebKitSansSerifFontFamily, "Arial");
31 prefs->SetInteger(prefs::kWebKitDefaultFontSize, 16);
33 int flags = ExtensionApiTest::kFlagEnableIncognito |
34 ExtensionApiTest::kFlagUseIncognito;
35 EXPECT_TRUE(RunExtensionSubtest("font_settings/incognito",
36 "launch.html",
37 flags));