OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |