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

Side by Side Diff: chrome/browser/ui/prefs/prefs_tab_helper_browsertest.cc

Issue 671653002: Standardize usage of virtual/override/final in chrome/browser/ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 #include "base/files/file_util.h" 5 #include "base/files/file_util.h"
6 #include "base/path_service.h" 6 #include "base/path_service.h"
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/common/chrome_constants.h" 10 #include "chrome/common/chrome_constants.h"
11 #include "chrome/common/chrome_paths.h" 11 #include "chrome/common/chrome_paths.h"
12 #include "chrome/common/pref_names.h" 12 #include "chrome/common/pref_names.h"
13 #include "chrome/test/base/in_process_browser_test.h" 13 #include "chrome/test/base/in_process_browser_test.h"
14 #include "chrome/test/base/testing_profile.h" 14 #include "chrome/test/base/testing_profile.h"
15 15
16 class PrefsTabHelperBrowserTest : public InProcessBrowserTest { 16 class PrefsTabHelperBrowserTest : public InProcessBrowserTest {
17 protected: 17 protected:
18 virtual base::FilePath GetPreferencesFilePath() { 18 virtual base::FilePath GetPreferencesFilePath() {
19 base::FilePath test_data_directory; 19 base::FilePath test_data_directory;
20 PathService::Get(chrome::DIR_TEST_DATA, &test_data_directory); 20 PathService::Get(chrome::DIR_TEST_DATA, &test_data_directory);
21 return test_data_directory 21 return test_data_directory
22 .AppendASCII("profiles") 22 .AppendASCII("profiles")
23 .AppendASCII("web_prefs") 23 .AppendASCII("web_prefs")
24 .AppendASCII("Default") 24 .AppendASCII("Default")
25 .Append(chrome::kPreferencesFilename); 25 .Append(chrome::kPreferencesFilename);
26 } 26 }
27 27
28 virtual bool SetUpUserDataDirectory() override { 28 bool SetUpUserDataDirectory() override {
29 base::FilePath user_data_directory; 29 base::FilePath user_data_directory;
30 PathService::Get(chrome::DIR_USER_DATA, &user_data_directory); 30 PathService::Get(chrome::DIR_USER_DATA, &user_data_directory);
31 base::FilePath default_profile = 31 base::FilePath default_profile =
32 user_data_directory.AppendASCII(TestingProfile::kTestUserProfileDir); 32 user_data_directory.AppendASCII(TestingProfile::kTestUserProfileDir);
33 if (!base::CreateDirectory(default_profile)) { 33 if (!base::CreateDirectory(default_profile)) {
34 LOG(ERROR) << "Can't create " << default_profile.MaybeAsASCII(); 34 LOG(ERROR) << "Can't create " << default_profile.MaybeAsASCII();
35 return false; 35 return false;
36 } 36 }
37 base::FilePath pref_file = GetPreferencesFilePath(); 37 base::FilePath pref_file = GetPreferencesFilePath();
38 if (!base::PathExists(pref_file)) { 38 if (!base::PathExists(pref_file)) {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 EXPECT_EQ("windows-1251", prefs->GetString(prefs::kDefaultCharset)); 72 EXPECT_EQ("windows-1251", prefs->GetString(prefs::kDefaultCharset));
73 EXPECT_EQ(16, prefs->GetInteger(prefs::kWebKitDefaultFontSize)); 73 EXPECT_EQ(16, prefs->GetInteger(prefs::kWebKitDefaultFontSize));
74 EXPECT_EQ("Nanum Gothic", 74 EXPECT_EQ("Nanum Gothic",
75 prefs->GetString(prefs::kWebKitStandardFontFamilyKorean)); 75 prefs->GetString(prefs::kWebKitStandardFontFamilyKorean));
76 EXPECT_EQ("Tinos", prefs->GetString(prefs::kWebKitStandardFontFamily)); 76 EXPECT_EQ("Tinos", prefs->GetString(prefs::kWebKitStandardFontFamily));
77 EXPECT_EQ("DejaVu Sans", prefs->GetString(prefs::kWebKitSansSerifFontFamily)); 77 EXPECT_EQ("DejaVu Sans", prefs->GetString(prefs::kWebKitSansSerifFontFamily));
78 }; 78 };
79 79
80 80
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698