summaryrefslogtreecommitdiffstats
path: root/chrome/browser/google_update_settings_posix_unittest.cc
diff options
context:
space:
mode:
authorjeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-19 02:29:36 +0000
committerjeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-19 02:29:36 +0000
commit38335efa75be7ea8fc99caf73789c85092e06d80 (patch)
tree48a59b30a420d2a29f677beff349cf727c755ca4 /chrome/browser/google_update_settings_posix_unittest.cc
parente52146dac4696c7ef277dbd386415026ada77199 (diff)
downloadchromium_src-38335efa75be7ea8fc99caf73789c85092e06d80.zip
chromium_src-38335efa75be7ea8fc99caf73789c85092e06d80.tar.gz
chromium_src-38335efa75be7ea8fc99caf73789c85092e06d80.tar.bz2
Make Mac first run store sentinel in Profile directory.
* Added code to migrate from previous defaults-based first run. * Renamed linux_guid -> posix_guid. BUG=19260 TEST=Open current official release and go through first run UI, then open a release compiled with this patch. First run UI should not be displayed again. TEST=First Run UI should only be displayed once on first run and not anew on each launch. Review URL: http://codereview.chromium.org/173020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23686 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/google_update_settings_posix_unittest.cc')
-rw-r--r--chrome/browser/google_update_settings_posix_unittest.cc23
1 files changed, 23 insertions, 0 deletions
diff --git a/chrome/browser/google_update_settings_posix_unittest.cc b/chrome/browser/google_update_settings_posix_unittest.cc
new file mode 100644
index 0000000..35f956a
--- /dev/null
+++ b/chrome/browser/google_update_settings_posix_unittest.cc
@@ -0,0 +1,23 @@
+// Copyright (c) 2009 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.
+
+#include "chrome/installer/util/google_update_settings.h"
+#include "testing/gtest/include/gtest/gtest.h"
+#include "testing/platform_test.h"
+
+class GoogleUpdateTest : public PlatformTest {
+};
+
+TEST_F(GoogleUpdateTest, StatsConstent) {
+ // Stats are off by default.
+ EXPECT_FALSE(GoogleUpdateSettings::GetCollectStatsConsent());
+
+ // Stats reporting is ON.
+ EXPECT_TRUE(GoogleUpdateSettings::SetCollectStatsConsent(true));
+ EXPECT_TRUE(GoogleUpdateSettings::GetCollectStatsConsent());
+
+ // Stats reporting is OFF.
+ EXPECT_TRUE(GoogleUpdateSettings::SetCollectStatsConsent(false));
+ EXPECT_FALSE(GoogleUpdateSettings::GetCollectStatsConsent());
+}