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

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

Issue 6339005: Fix a bug introduced by RegKey change and corresponding unit test.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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
« no previous file with comments | « no previous file | chrome/installer/util/google_update_settings.cc » ('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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/installer/util/google_update_settings.h" 5 #include "chrome/installer/util/google_update_settings.h"
6 #include "testing/gtest/include/gtest/gtest.h" 6 #include "testing/gtest/include/gtest/gtest.h"
7 #include "testing/platform_test.h" 7 #include "testing/platform_test.h"
8 8
9 class GoogleUpdateTest : public PlatformTest { 9 class GoogleUpdateTest : public PlatformTest {
10 }; 10 };
11 11
12 // bug: http://crbug.com/70092 12 TEST_F(GoogleUpdateTest, StatsConsent) {
13 TEST_F(GoogleUpdateTest, DISABLED_StatsConstent) {
14 // Stats are off by default. 13 // Stats are off by default.
15 EXPECT_FALSE(GoogleUpdateSettings::GetCollectStatsConsent()); 14 EXPECT_FALSE(GoogleUpdateSettings::GetCollectStatsConsent());
16 // Stats reporting is ON. 15 // Stats reporting is ON.
17 EXPECT_TRUE(GoogleUpdateSettings::SetCollectStatsConsent(true)); 16 EXPECT_TRUE(GoogleUpdateSettings::SetCollectStatsConsent(true));
18 EXPECT_TRUE(GoogleUpdateSettings::GetCollectStatsConsent()); 17 EXPECT_TRUE(GoogleUpdateSettings::GetCollectStatsConsent());
19 // Stats reporting is OFF. 18 // Stats reporting is OFF.
20 EXPECT_TRUE(GoogleUpdateSettings::SetCollectStatsConsent(false)); 19 EXPECT_TRUE(GoogleUpdateSettings::SetCollectStatsConsent(false));
21 EXPECT_FALSE(GoogleUpdateSettings::GetCollectStatsConsent()); 20 EXPECT_FALSE(GoogleUpdateSettings::GetCollectStatsConsent());
22 } 21 }
23 22
24 #if defined(OS_WIN) 23 #if defined(OS_WIN)
25 24
26 TEST_F(GoogleUpdateTest, LastRunTime) { 25 TEST_F(GoogleUpdateTest, LastRunTime) {
27 // Querying the value that does not exists should fail. 26 // Querying the value that does not exists should fail.
28 EXPECT_TRUE(GoogleUpdateSettings::RemoveLastRunTime()); 27 EXPECT_TRUE(GoogleUpdateSettings::RemoveLastRunTime());
29 EXPECT_EQ(-1, GoogleUpdateSettings::GetLastRunTime()); 28 EXPECT_EQ(-1, GoogleUpdateSettings::GetLastRunTime());
30 // Setting and querying the last update time in fast sequence 29 // Setting and querying the last update time in fast sequence
31 // should give 0 days. 30 // should give 0 days.
32 EXPECT_TRUE(GoogleUpdateSettings::SetLastRunTime()); 31 EXPECT_TRUE(GoogleUpdateSettings::SetLastRunTime());
33 EXPECT_EQ(0, GoogleUpdateSettings::GetLastRunTime()); 32 EXPECT_EQ(0, GoogleUpdateSettings::GetLastRunTime());
34 } 33 }
35 34
36 #endif // defined(OS_WIN) 35 #endif // defined(OS_WIN)
OLDNEW
« no previous file with comments | « no previous file | chrome/installer/util/google_update_settings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698