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

Side by Side Diff: chrome/browser/ui/app_list/arc/arc_app_unittest.cc

Issue 2807483002: [Merge M58] arg: Make shortcuts runnable in deferred mode. (Closed)
Patch Set: Created 3 years, 8 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
OLDNEW
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 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 } 722 }
723 723
724 TEST_P(ArcAppModelBuilderTest, LaunchShortcuts) { 724 TEST_P(ArcAppModelBuilderTest, LaunchShortcuts) {
725 // Disable attempts to dismiss app launcher view. 725 // Disable attempts to dismiss app launcher view.
726 ChromeAppListItem::OverrideAppListControllerDelegateForTesting(controller()); 726 ChromeAppListItem::OverrideAppListControllerDelegateForTesting(controller());
727 727
728 app_instance()->RefreshAppList(); 728 app_instance()->RefreshAppList();
729 app_instance()->SendInstallShortcuts(fake_shortcuts()); 729 app_instance()->SendInstallShortcuts(fake_shortcuts());
730 730
731 // Simulate item activate. 731 // Simulate item activate.
732 ASSERT_GE(fake_shortcuts().size(), 2U);
732 const arc::mojom::ShortcutInfo& app_first = fake_shortcuts()[0]; 733 const arc::mojom::ShortcutInfo& app_first = fake_shortcuts()[0];
733 const arc::mojom::ShortcutInfo& app_last = fake_shortcuts()[0]; 734 const arc::mojom::ShortcutInfo& app_last = fake_shortcuts()[1];
734 ArcAppItem* item_first = FindArcItem(ArcAppTest::GetAppId(app_first)); 735 ArcAppItem* item_first = FindArcItem(ArcAppTest::GetAppId(app_first));
735 ArcAppItem* item_last = FindArcItem(ArcAppTest::GetAppId(app_last)); 736 ArcAppItem* item_last = FindArcItem(ArcAppTest::GetAppId(app_last));
736 ASSERT_NE(nullptr, item_first); 737 ASSERT_NE(nullptr, item_first);
737 ASSERT_NE(nullptr, item_last); 738 ASSERT_NE(nullptr, item_last);
738 item_first->Activate(0); 739 item_first->Activate(0);
739 item_last->Activate(0); 740 item_last->Activate(0);
740 item_first->Activate(0); 741 item_first->Activate(0);
741 742
742 const std::vector<std::string>& launch_intents = 743 const std::vector<std::string>& launch_intents =
743 app_instance()->launch_intents(); 744 app_instance()->launch_intents();
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after
1500 ::testing::ValuesIn(kUnmanagedArcStates)); 1501 ::testing::ValuesIn(kUnmanagedArcStates));
1501 INSTANTIATE_TEST_CASE_P(, 1502 INSTANTIATE_TEST_CASE_P(,
1502 ArcDefaulAppForManagedUserTest, 1503 ArcDefaulAppForManagedUserTest,
1503 ::testing::ValuesIn(kManagedArcStates)); 1504 ::testing::ValuesIn(kManagedArcStates));
1504 INSTANTIATE_TEST_CASE_P(, 1505 INSTANTIATE_TEST_CASE_P(,
1505 ArcPlayStoreAppTest, 1506 ArcPlayStoreAppTest,
1506 ::testing::ValuesIn(kUnmanagedArcStates)); 1507 ::testing::ValuesIn(kUnmanagedArcStates));
1507 INSTANTIATE_TEST_CASE_P(, 1508 INSTANTIATE_TEST_CASE_P(,
1508 ArcAppModelBuilderRecreate, 1509 ArcAppModelBuilderRecreate,
1509 ::testing::ValuesIn(kUnmanagedArcStates)); 1510 ::testing::ValuesIn(kUnmanagedArcStates));
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698