| 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/install_worker.h" | 5 #include "chrome/installer/setup/install_worker.h" |
| 6 | 6 |
| 7 #include "base/win/registry.h" | 7 #include "base/win/registry.h" |
| 8 #include "base/version.h" | 8 #include "base/version.h" |
| 9 #include "chrome/common/chrome_constants.h" | 9 #include "chrome/common/chrome_constants.h" |
| 10 #include "chrome/installer/setup/setup_util.h" | 10 #include "chrome/installer/setup/setup_util.h" |
| (...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 StrictMock<MockWorkItemList> work_item_list; | 511 StrictMock<MockWorkItemList> work_item_list; |
| 512 | 512 |
| 513 EXPECT_CALL(work_item_list, | 513 EXPECT_CALL(work_item_list, |
| 514 AddDeleteRegKeyWorkItem(root_key_, StrEq(old_elevation_key))) | 514 AddDeleteRegKeyWorkItem(root_key_, StrEq(old_elevation_key))) |
| 515 .Times(1); | 515 .Times(1); |
| 516 | 516 |
| 517 AddDeleteOldIELowRightsPolicyWorkItems(*installer_state_.get(), | 517 AddDeleteOldIELowRightsPolicyWorkItems(*installer_state_.get(), |
| 518 &work_item_list); | 518 &work_item_list); |
| 519 } | 519 } |
| 520 | 520 |
| 521 TEST_P(OldIELowRightsTests, AddCopyIELowRightsPolicyWorkItems) { | |
| 522 StrictMock<MockWorkItemList> work_item_list; | |
| 523 | |
| 524 // The old elevation policy key should only be copied when there's no old | |
| 525 // value. | |
| 526 EXPECT_CALL(work_item_list, | |
| 527 AddCopyRegKeyWorkItem(root_key_, StrEq(elevation_key), | |
| 528 StrEq(old_elevation_key), | |
| 529 Eq(WorkItem::IF_NOT_PRESENT))).Times(1); | |
| 530 | |
| 531 AddCopyIELowRightsPolicyWorkItems(*installer_state_.get(), &work_item_list); | |
| 532 } | |
| 533 | |
| 534 INSTANTIATE_TEST_CASE_P(Variations, OldIELowRightsTests, | 521 INSTANTIATE_TEST_CASE_P(Variations, OldIELowRightsTests, |
| 535 Combine(Bool(), Bool())); | 522 Combine(Bool(), Bool())); |
| 536 | 523 |
| 537 TEST_F(InstallWorkerTest, GoogleUpdateWorkItemsTest) { | 524 TEST_F(InstallWorkerTest, GoogleUpdateWorkItemsTest) { |
| 538 const bool system_level = true; | 525 const bool system_level = true; |
| 539 const bool multi_install = true; | 526 const bool multi_install = true; |
| 540 MockWorkItemList work_item_list; | 527 MockWorkItemList work_item_list; |
| 541 | 528 |
| 542 scoped_ptr<MockInstallationState> installation_state( | 529 scoped_ptr<MockInstallationState> installation_state( |
| 543 BuildChromeInstallationState(system_level, false)); | 530 BuildChromeInstallationState(system_level, false)); |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 798 prod_type_list[i_type_check]); | 785 prod_type_list[i_type_check]); |
| 799 bool prod_expect = (mach_after & (1 << i_type_check)) != 0; | 786 bool prod_expect = (mach_after & (1 << i_type_check)) != 0; |
| 800 EXPECT_EQ(prod_expect, prod_res); | 787 EXPECT_EQ(prod_expect, prod_res); |
| 801 } | 788 } |
| 802 } | 789 } |
| 803 } | 790 } |
| 804 } | 791 } |
| 805 } | 792 } |
| 806 | 793 |
| 807 #endif // defined(GOOGLE_CHROME_BUILD) | 794 #endif // defined(GOOGLE_CHROME_BUILD) |
| OLD | NEW |