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

Side by Side Diff: chrome/browser/google/google_update_settings_unittest.cc

Issue 316963002: Move branding information out of google_util (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix for Windows Created 6 years, 6 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
« no previous file with comments | « chrome/browser/google/google_brand_chromeos.cc ('k') | chrome/browser/google/google_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/compiler_specific.h" 6 #include "base/compiler_specific.h"
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/test/scoped_path_override.h" 8 #include "base/test/scoped_path_override.h"
9 #include "chrome/browser/google/google_util.h" 9 #include "chrome/browser/google/google_brand.h"
10 #include "chrome/common/chrome_paths.h" 10 #include "chrome/common/chrome_paths.h"
11 #include "chrome/installer/util/google_update_settings.h" 11 #include "chrome/installer/util/google_update_settings.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 #include "testing/platform_test.h" 13 #include "testing/platform_test.h"
14 14
15 class GoogleUpdateTest : public PlatformTest { 15 class GoogleUpdateTest : public PlatformTest {
16 protected: 16 protected:
17 GoogleUpdateTest() : user_data_dir_override_(chrome::DIR_USER_DATA) {} 17 GoogleUpdateTest() : user_data_dir_override_(chrome::DIR_USER_DATA) {}
18 virtual ~GoogleUpdateTest() {} 18 virtual ~GoogleUpdateTest() {}
19 19
(...skipping 24 matching lines...) Expand all
44 // should give 0 days. 44 // should give 0 days.
45 EXPECT_TRUE(GoogleUpdateSettings::SetLastRunTime()); 45 EXPECT_TRUE(GoogleUpdateSettings::SetLastRunTime());
46 EXPECT_EQ(0, GoogleUpdateSettings::GetLastRunTime()); 46 EXPECT_EQ(0, GoogleUpdateSettings::GetLastRunTime());
47 } 47 }
48 48
49 #endif // defined(OS_WIN) 49 #endif // defined(OS_WIN)
50 50
51 TEST_F(GoogleUpdateTest, IsOrganicFirstRunBrandCodes) { 51 TEST_F(GoogleUpdateTest, IsOrganicFirstRunBrandCodes) {
52 // Test some brand codes to ensure that future changes to this method won't 52 // Test some brand codes to ensure that future changes to this method won't
53 // go unnoticed. 53 // go unnoticed.
54 EXPECT_FALSE(google_util::IsOrganicFirstRun("CHFO")); 54 EXPECT_FALSE(google_brand::IsOrganicFirstRun("CHFO"));
55 EXPECT_FALSE(google_util::IsOrganicFirstRun("CHMA")); 55 EXPECT_FALSE(google_brand::IsOrganicFirstRun("CHMA"));
56 EXPECT_TRUE(google_util::IsOrganicFirstRun("EUBA")); 56 EXPECT_TRUE(google_brand::IsOrganicFirstRun("EUBA"));
57 EXPECT_TRUE(google_util::IsOrganicFirstRun("GGRA")); 57 EXPECT_TRUE(google_brand::IsOrganicFirstRun("GGRA"));
58 58
59 #if defined(OS_MACOSX) 59 #if defined(OS_MACOSX)
60 // An empty brand string on Mac is used for channels other than stable, 60 // An empty brand string on Mac is used for channels other than stable,
61 // which are always organic. 61 // which are always organic.
62 EXPECT_TRUE(google_util::IsOrganicFirstRun("")); 62 EXPECT_TRUE(google_brand::IsOrganicFirstRun(""));
63 #endif 63 #endif
64 } 64 }
OLDNEW
« no previous file with comments | « chrome/browser/google/google_brand_chromeos.cc ('k') | chrome/browser/google/google_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698