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

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

Issue 9285002: Remove the first-run search engine dialog/ballot. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync and merge. Created 8 years, 11 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) 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 "chrome/browser/google/google_util.h" 5 #include "chrome/browser/google/google_util.h"
6 #include "chrome/installer/util/google_update_settings.h" 6 #include "chrome/installer/util/google_update_settings.h"
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 #include "testing/platform_test.h" 8 #include "testing/platform_test.h"
9 9
10 class GoogleUpdateTest : public PlatformTest { 10 class GoogleUpdateTest : public PlatformTest {
11 }; 11 };
(...skipping 16 matching lines...) Expand all
28 EXPECT_TRUE(GoogleUpdateSettings::RemoveLastRunTime()); 28 EXPECT_TRUE(GoogleUpdateSettings::RemoveLastRunTime());
29 EXPECT_EQ(-1, GoogleUpdateSettings::GetLastRunTime()); 29 EXPECT_EQ(-1, GoogleUpdateSettings::GetLastRunTime());
30 // Setting and querying the last update time in fast sequence 30 // Setting and querying the last update time in fast sequence
31 // should give 0 days. 31 // should give 0 days.
32 EXPECT_TRUE(GoogleUpdateSettings::SetLastRunTime()); 32 EXPECT_TRUE(GoogleUpdateSettings::SetLastRunTime());
33 EXPECT_EQ(0, GoogleUpdateSettings::GetLastRunTime()); 33 EXPECT_EQ(0, GoogleUpdateSettings::GetLastRunTime());
34 } 34 }
35 35
36 #endif // defined(OS_WIN) 36 #endif // defined(OS_WIN)
37 37
38 TEST_F(GoogleUpdateTest, ShouldShowSearchEngineDialog) { 38 TEST_F(GoogleUpdateTest, IsOrganicFirstRunBrandCodes) {
39 // Test some brand codes to ensure that future changes to this method won't 39 // Test some brand codes to ensure that future changes to this method won't
40 // go unnoticed. 40 // go unnoticed.
41 EXPECT_FALSE(google_util::IsOrganicFirstRun("CHFO")); 41 EXPECT_FALSE(google_util::IsOrganicFirstRun("CHFO"));
42 EXPECT_FALSE(google_util::IsOrganicFirstRun("CHMA")); 42 EXPECT_FALSE(google_util::IsOrganicFirstRun("CHMA"));
43 EXPECT_TRUE(google_util::IsOrganicFirstRun("EUBA")); 43 EXPECT_TRUE(google_util::IsOrganicFirstRun("EUBA"));
44 EXPECT_TRUE(google_util::IsOrganicFirstRun("GGRA")); 44 EXPECT_TRUE(google_util::IsOrganicFirstRun("GGRA"));
45 45
46 #if defined(OS_MACOSX) 46 #if defined(OS_MACOSX)
47 // An empty brand string on Mac is used for channels other than stable, 47 // An empty brand string on Mac is used for channels other than stable,
48 // which are always organic. 48 // which are always organic.
49 EXPECT_TRUE(google_util::IsOrganicFirstRun("")); 49 EXPECT_TRUE(google_util::IsOrganicFirstRun(""));
50 #endif 50 #endif
51 } 51 }
OLDNEW
« no previous file with comments | « chrome/browser/first_run/first_run_win.cc ('k') | chrome/browser/search_engines/template_url_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698