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 "chrome/installer/setup/setup_util_unittest.h" | 5 #include "chrome/installer/setup/setup_util_unittest.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 | 403 |
404 namespace { | 404 namespace { |
405 | 405 |
406 class MigrateMultiToSingleTest : public testing::Test { | 406 class MigrateMultiToSingleTest : public testing::Test { |
407 protected: | 407 protected: |
408 virtual void SetUp() OVERRIDE { | 408 virtual void SetUp() OVERRIDE { |
409 registry_override_manager_.OverrideRegistry(kRootKey, | 409 registry_override_manager_.OverrideRegistry(kRootKey, |
410 L"MigrateMultiToSingleTest"); | 410 L"MigrateMultiToSingleTest"); |
411 } | 411 } |
412 | 412 |
| 413 virtual void TearDown() OVERRIDE { |
| 414 registry_override_manager_.RemoveAllOverrides(); |
| 415 } |
| 416 |
413 static const bool kSystemLevel = false; | 417 static const bool kSystemLevel = false; |
414 static const HKEY kRootKey; | 418 static const HKEY kRootKey; |
415 static const wchar_t kVersionString[]; | 419 static const wchar_t kVersionString[]; |
416 static const wchar_t kMultiChannel[]; | 420 static const wchar_t kMultiChannel[]; |
417 registry_util::RegistryOverrideManager registry_override_manager_; | 421 registry_util::RegistryOverrideManager registry_override_manager_; |
418 }; | 422 }; |
419 | 423 |
420 const bool MigrateMultiToSingleTest::kSystemLevel; | 424 const bool MigrateMultiToSingleTest::kSystemLevel; |
421 const HKEY MigrateMultiToSingleTest::kRootKey = | 425 const HKEY MigrateMultiToSingleTest::kRootKey = |
422 kSystemLevel ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER; | 426 kSystemLevel ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER; |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 BrowserDistribution::CHROME_FRAME)); | 480 BrowserDistribution::CHROME_FRAME)); |
477 EXPECT_TRUE(chrome_frame.GetUsageStats(&usagestats)); | 481 EXPECT_TRUE(chrome_frame.GetUsageStats(&usagestats)); |
478 EXPECT_EQ(1U, usagestats); | 482 EXPECT_EQ(1U, usagestats); |
479 EXPECT_EQ(L"2.0-dev", chrome_frame.channel().value()); | 483 EXPECT_EQ(L"2.0-dev", chrome_frame.channel().value()); |
480 | 484 |
481 // Confirm that the binaries' channel no longer contains GCF. | 485 // Confirm that the binaries' channel no longer contains GCF. |
482 ASSERT_TRUE(binaries.Initialize(kSystemLevel, | 486 ASSERT_TRUE(binaries.Initialize(kSystemLevel, |
483 BrowserDistribution::CHROME_BINARIES)); | 487 BrowserDistribution::CHROME_BINARIES)); |
484 EXPECT_EQ(L"2.0-dev-multi", binaries.channel().value()); | 488 EXPECT_EQ(L"2.0-dev-multi", binaries.channel().value()); |
485 } | 489 } |
OLD | NEW |