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

Side by Side Diff: chrome/installer/util/master_preferences_unittest.cc

Issue 194118: Add a new flag to the installer to prevent registering for a Google Update la... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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/installer/util/master_preferences.cc ('k') | chrome/installer/util/util_constants.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 // Unit tests for master preferences related methods. 5 // Unit tests for master preferences related methods.
6 6
7 #include "base/scoped_ptr.h" 7 #include "base/scoped_ptr.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "chrome/common/json_value_serializer.h" 9 #include "chrome/common/json_value_serializer.h"
10 #include "chrome/installer/util/master_preferences.h" 10 #include "chrome/installer/util/master_preferences.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 EXPECT_FALSE(installer_util::GetDistroBooleanPreference(prefs.get(), 133 EXPECT_FALSE(installer_util::GetDistroBooleanPreference(prefs.get(),
134 installer_util::master_preferences::kDistroImportBookmarksPref)); 134 installer_util::master_preferences::kDistroImportBookmarksPref));
135 EXPECT_FALSE(installer_util::GetDistroBooleanPreference(prefs.get(), 135 EXPECT_FALSE(installer_util::GetDistroBooleanPreference(prefs.get(),
136 installer_util::master_preferences::kDistroImportHomePagePref)); 136 installer_util::master_preferences::kDistroImportHomePagePref));
137 137
138 EXPECT_TRUE(installer_util::GetDistroBooleanPreference(prefs.get(), 138 EXPECT_TRUE(installer_util::GetDistroBooleanPreference(prefs.get(),
139 installer_util::master_preferences::kCreateAllShortcuts)); 139 installer_util::master_preferences::kCreateAllShortcuts));
140 EXPECT_TRUE(installer_util::GetDistroBooleanPreference(prefs.get(), 140 EXPECT_TRUE(installer_util::GetDistroBooleanPreference(prefs.get(),
141 installer_util::master_preferences::kDoNotLaunchChrome)); 141 installer_util::master_preferences::kDoNotLaunchChrome));
142 EXPECT_FALSE(installer_util::GetDistroBooleanPreference(prefs.get(), 142 EXPECT_FALSE(installer_util::GetDistroBooleanPreference(prefs.get(),
143 installer_util::master_preferences::kDoNotRegisterForUpdateLaunch));
144 EXPECT_FALSE(installer_util::GetDistroBooleanPreference(prefs.get(),
143 installer_util::master_preferences::kMakeChromeDefault)); 145 installer_util::master_preferences::kMakeChromeDefault));
144 EXPECT_FALSE(installer_util::GetDistroBooleanPreference(prefs.get(), 146 EXPECT_FALSE(installer_util::GetDistroBooleanPreference(prefs.get(),
145 installer_util::master_preferences::kMakeChromeDefaultForUser)); 147 installer_util::master_preferences::kMakeChromeDefaultForUser));
146 148
147 int icon_index = 0; 149 int icon_index = 0;
148 EXPECT_FALSE(installer_util::GetDistroIntegerPreference(prefs.get(), 150 EXPECT_FALSE(installer_util::GetDistroIntegerPreference(prefs.get(),
149 installer_util::master_preferences::kChromeShortcutIconIndex, 151 installer_util::master_preferences::kChromeShortcutIconIndex,
150 &icon_index)); 152 &icon_index));
151 EXPECT_EQ(icon_index, 0); 153 EXPECT_EQ(icon_index, 0);
152 int ping_delay = 90; 154 int ping_delay = 90;
(...skipping 24 matching lines...) Expand all
177 EXPECT_TRUE(prefs.get() != NULL); 179 EXPECT_TRUE(prefs.get() != NULL);
178 180
179 typedef std::vector<std::wstring> TabsVector; 181 typedef std::vector<std::wstring> TabsVector;
180 TabsVector tabs = installer_util::GetFirstRunTabs(prefs.get()); 182 TabsVector tabs = installer_util::GetFirstRunTabs(prefs.get());
181 ASSERT_EQ(3, tabs.size()); 183 ASSERT_EQ(3, tabs.size());
182 EXPECT_EQ(L"http://google.com/f1", tabs[0]); 184 EXPECT_EQ(L"http://google.com/f1", tabs[0]);
183 EXPECT_EQ(L"https://google.com/f2", tabs[1]); 185 EXPECT_EQ(L"https://google.com/f2", tabs[1]);
184 EXPECT_EQ(L"new_tab_page", tabs[2]); 186 EXPECT_EQ(L"new_tab_page", tabs[2]);
185 EXPECT_TRUE(file_util::Delete(prefs_file, false)); 187 EXPECT_TRUE(file_util::Delete(prefs_file, false));
186 } 188 }
OLDNEW
« no previous file with comments | « chrome/installer/util/master_preferences.cc ('k') | chrome/installer/util/util_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698