| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 761 } | 761 } |
| 762 | 762 |
| 763 TEST_P(ArcAppModelBuilderTest, LaunchShortcuts) { | 763 TEST_P(ArcAppModelBuilderTest, LaunchShortcuts) { |
| 764 // Disable attempts to dismiss app launcher view. | 764 // Disable attempts to dismiss app launcher view. |
| 765 ChromeAppListItem::OverrideAppListControllerDelegateForTesting(controller()); | 765 ChromeAppListItem::OverrideAppListControllerDelegateForTesting(controller()); |
| 766 | 766 |
| 767 app_instance()->RefreshAppList(); | 767 app_instance()->RefreshAppList(); |
| 768 app_instance()->SendInstallShortcuts(fake_shortcuts()); | 768 app_instance()->SendInstallShortcuts(fake_shortcuts()); |
| 769 | 769 |
| 770 // Simulate item activate. | 770 // Simulate item activate. |
| 771 ASSERT_GE(fake_shortcuts().size(), 2U); |
| 771 const arc::mojom::ShortcutInfo& app_first = fake_shortcuts()[0]; | 772 const arc::mojom::ShortcutInfo& app_first = fake_shortcuts()[0]; |
| 772 const arc::mojom::ShortcutInfo& app_last = fake_shortcuts()[0]; | 773 const arc::mojom::ShortcutInfo& app_last = fake_shortcuts()[1]; |
| 773 ArcAppItem* item_first = FindArcItem(ArcAppTest::GetAppId(app_first)); | 774 ArcAppItem* item_first = FindArcItem(ArcAppTest::GetAppId(app_first)); |
| 774 ArcAppItem* item_last = FindArcItem(ArcAppTest::GetAppId(app_last)); | 775 ArcAppItem* item_last = FindArcItem(ArcAppTest::GetAppId(app_last)); |
| 775 ASSERT_NE(nullptr, item_first); | 776 ASSERT_NE(nullptr, item_first); |
| 776 ASSERT_NE(nullptr, item_last); | 777 ASSERT_NE(nullptr, item_last); |
| 777 item_first->Activate(0); | 778 item_first->Activate(0); |
| 778 item_last->Activate(0); | 779 item_last->Activate(0); |
| 779 item_first->Activate(0); | 780 item_first->Activate(0); |
| 780 | 781 |
| 781 const std::vector<std::string>& launch_intents = | 782 const std::vector<std::string>& launch_intents = |
| 782 app_instance()->launch_intents(); | 783 app_instance()->launch_intents(); |
| (...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1572 ::testing::ValuesIn(kUnmanagedArcStates)); | 1573 ::testing::ValuesIn(kUnmanagedArcStates)); |
| 1573 INSTANTIATE_TEST_CASE_P(, | 1574 INSTANTIATE_TEST_CASE_P(, |
| 1574 ArcDefaulAppForManagedUserTest, | 1575 ArcDefaulAppForManagedUserTest, |
| 1575 ::testing::ValuesIn(kManagedArcStates)); | 1576 ::testing::ValuesIn(kManagedArcStates)); |
| 1576 INSTANTIATE_TEST_CASE_P(, | 1577 INSTANTIATE_TEST_CASE_P(, |
| 1577 ArcPlayStoreAppTest, | 1578 ArcPlayStoreAppTest, |
| 1578 ::testing::ValuesIn(kUnmanagedArcStates)); | 1579 ::testing::ValuesIn(kUnmanagedArcStates)); |
| 1579 INSTANTIATE_TEST_CASE_P(, | 1580 INSTANTIATE_TEST_CASE_P(, |
| 1580 ArcAppModelBuilderRecreate, | 1581 ArcAppModelBuilderRecreate, |
| 1581 ::testing::ValuesIn(kUnmanagedArcStates)); | 1582 ::testing::ValuesIn(kUnmanagedArcStates)); |
| OLD | NEW |