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

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

Issue 2799813003: arc: Make shortcuts runnable in deferred mode. (Closed)
Patch Set: remove not-needed check 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 750 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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));
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698