summaryrefslogtreecommitdiffstats
path: root/chrome/browser/google
diff options
context:
space:
mode:
authormirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-05 21:16:00 +0000
committermirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-05 21:16:00 +0000
commit77b6731e1d204a260b64d4c09c827bd2d600154e (patch)
treef99ed43c9b3b7f3f85ebc3a67c127d0e1de429e4 /chrome/browser/google
parent38316e10b63cd29621d6071b9eba957f329b1203 (diff)
downloadchromium_src-77b6731e1d204a260b64d4c09c827bd2d600154e.zip
chromium_src-77b6731e1d204a260b64d4c09c827bd2d600154e.tar.gz
chromium_src-77b6731e1d204a260b64d4c09c827bd2d600154e.tar.bz2
Change determination of when to show the first run search engine selection dialog based on brand codes.
Also, remove crufty old FirstRun::InSearchExperimentLocale. BUG=none TEST=new google_update_settings_unittest, and search engine selection shows only for brand codes beginning with EU or GG. Review URL: http://codereview.chromium.org/6677134 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80527 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/google')
-rw-r--r--chrome/browser/google/google_update_settings_unittest.cc19
1 files changed, 18 insertions, 1 deletions
diff --git a/chrome/browser/google/google_update_settings_unittest.cc b/chrome/browser/google/google_update_settings_unittest.cc
index 13a7e33..0f6564e 100644
--- a/chrome/browser/google/google_update_settings_unittest.cc
+++ b/chrome/browser/google/google_update_settings_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -32,4 +32,21 @@ TEST_F(GoogleUpdateTest, LastRunTime) {
EXPECT_EQ(0, GoogleUpdateSettings::GetLastRunTime());
}
+TEST_F(GoogleUpdateTest, ShouldShowSearchEngineDialog) {
+ // Test some brand codes to ensure that future changes to this method won't
+ // go unnoticed.
+ const wchar_t* false_brand1 = L"CHFO";
+ EXPECT_FALSE(GoogleUpdateSettings::IsOrganicFirstRun(
+ false_brand1));
+ const wchar_t* false_brand2 = L"CHMA";
+ EXPECT_FALSE(GoogleUpdateSettings::IsOrganicFirstRun(
+ false_brand2));
+ const wchar_t* good_brand1 = L"EUBA";
+ EXPECT_TRUE(GoogleUpdateSettings::IsOrganicFirstRun(
+ good_brand1));
+ const wchar_t* good_brand2 = L"GGRA";
+ EXPECT_TRUE(GoogleUpdateSettings::IsOrganicFirstRun(
+ good_brand2));
+}
+
#endif // defined(OS_WIN)