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

Side by Side Diff: chrome/browser/first_run/first_run_unittest.cc

Issue 18286004: Move PathExists to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/compiler_specific.h" 6 #include "base/compiler_specific.h"
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/test/scoped_path_override.h" 9 #include "base/test/scoped_path_override.h"
10 #include "chrome/browser/first_run/first_run.h" 10 #include "chrome/browser/first_run/first_run.h"
(...skipping 16 matching lines...) Expand all
27 base::FilePath sentinel_path_; 27 base::FilePath sentinel_path_;
28 28
29 private: 29 private:
30 base::ScopedPathOverride user_data_dir_override_; 30 base::ScopedPathOverride user_data_dir_override_;
31 31
32 DISALLOW_COPY_AND_ASSIGN(FirstRunTest); 32 DISALLOW_COPY_AND_ASSIGN(FirstRunTest);
33 }; 33 };
34 34
35 TEST_F(FirstRunTest, RemoveSentinel) { 35 TEST_F(FirstRunTest, RemoveSentinel) {
36 EXPECT_TRUE(CreateSentinel()); 36 EXPECT_TRUE(CreateSentinel());
37 EXPECT_TRUE(file_util::PathExists(sentinel_path_)); 37 EXPECT_TRUE(base::PathExists(sentinel_path_));
38 38
39 EXPECT_TRUE(RemoveSentinel()); 39 EXPECT_TRUE(RemoveSentinel());
40 EXPECT_FALSE(file_util::PathExists(sentinel_path_)); 40 EXPECT_FALSE(base::PathExists(sentinel_path_));
41 } 41 }
42 42
43 TEST_F(FirstRunTest, SetupMasterPrefsFromInstallPrefs_VariationsSeed) { 43 TEST_F(FirstRunTest, SetupMasterPrefsFromInstallPrefs_VariationsSeed) {
44 installer::MasterPreferences install_prefs("{ \"variations_seed\":\"xyz\" }"); 44 installer::MasterPreferences install_prefs("{ \"variations_seed\":\"xyz\" }");
45 45
46 MasterPrefs out_prefs; 46 MasterPrefs out_prefs;
47 internal::SetupMasterPrefsFromInstallPrefs(install_prefs, &out_prefs); 47 internal::SetupMasterPrefsFromInstallPrefs(install_prefs, &out_prefs);
48 EXPECT_EQ("xyz", out_prefs.variations_seed); 48 EXPECT_EQ("xyz", out_prefs.variations_seed);
49 } 49 }
50 50
51 TEST_F(FirstRunTest, SetupMasterPrefsFromInstallPrefs_NoVariationsSeed) { 51 TEST_F(FirstRunTest, SetupMasterPrefsFromInstallPrefs_NoVariationsSeed) {
52 installer::MasterPreferences install_prefs("{ }"); 52 installer::MasterPreferences install_prefs("{ }");
53 53
54 MasterPrefs out_prefs; 54 MasterPrefs out_prefs;
55 internal::SetupMasterPrefsFromInstallPrefs(install_prefs, &out_prefs); 55 internal::SetupMasterPrefsFromInstallPrefs(install_prefs, &out_prefs);
56 EXPECT_TRUE(out_prefs.variations_seed.empty()); 56 EXPECT_TRUE(out_prefs.variations_seed.empty());
57 } 57 }
58 58
59 } // namespace first_run 59 } // namespace first_run
OLDNEW
« no previous file with comments | « chrome/browser/first_run/first_run_internal_win.cc ('k') | chrome/browser/first_run/upgrade_util_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698