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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
10 #include "base/win/registry.h" | 10 #include "base/win/registry.h" |
11 #include "chrome/installer/gcapi/gcapi.h" | 11 #include "chrome/installer/gcapi/gcapi.h" |
12 #include "chrome/installer/gcapi/gcapi_omaha_experiment.h" | 12 #include "chrome/installer/gcapi/gcapi_omaha_experiment.h" |
13 #include "chrome/installer/gcapi/gcapi_reactivation.h" | 13 #include "chrome/installer/gcapi/gcapi_reactivation.h" |
14 #include "chrome/installer/gcapi/gcapi_test_registry_overrider.h" | 14 #include "chrome/installer/gcapi/gcapi_test_registry_overrider.h" |
15 #include "chrome/installer/util/google_update_constants.h" | 15 #include "chrome/installer/util/google_update_constants.h" |
16 #include "chrome/installer/util/google_update_experiment_util.h" | |
17 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
18 | 17 |
19 using base::Time; | 18 using base::Time; |
20 using base::TimeDelta; | 19 using base::TimeDelta; |
21 using base::win::RegKey; | 20 using base::win::RegKey; |
22 | 21 |
23 class GCAPIReactivationTest : public ::testing::Test { | 22 class GCAPIReactivationTest : public ::testing::Test { |
24 protected: | 23 protected: |
25 GCAPIReactivationTest() {} | 24 GCAPIReactivationTest() {} |
26 | 25 |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 EXPECT_TRUE(SetLastRunTime(HKEY_CURRENT_USER, | 200 EXPECT_TRUE(SetLastRunTime(HKEY_CURRENT_USER, |
202 hkcu_last_run.ToInternalValue())); | 201 hkcu_last_run.ToInternalValue())); |
203 | 202 |
204 EXPECT_TRUE(ReactivateChrome(L"GAGA", | 203 EXPECT_TRUE(ReactivateChrome(L"GAGA", |
205 GCAPI_INVOKED_STANDARD_SHELL, | 204 GCAPI_INVOKED_STANDARD_SHELL, |
206 &error)); | 205 &error)); |
207 EXPECT_EQ(L"GAGA", GetReactivationString(HKEY_CURRENT_USER)); | 206 EXPECT_EQ(L"GAGA", GetReactivationString(HKEY_CURRENT_USER)); |
208 | 207 |
209 EXPECT_TRUE(HasExperimentLabels(HKEY_CURRENT_USER)); | 208 EXPECT_TRUE(HasExperimentLabels(HKEY_CURRENT_USER)); |
210 } | 209 } |
OLD | NEW |