| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/browser/ui/ash/launcher/chrome_launcher_controller_impl.h" | 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 1821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1832 | 1832 |
| 1833 base::RunLoop().RunUntilIdle(); | 1833 base::RunLoop().RunUntilIdle(); |
| 1834 | 1834 |
| 1835 EXPECT_EQ(0, launcher_controller_->GetShelfIDForAppID(arc_app_id1)); | 1835 EXPECT_EQ(0, launcher_controller_->GetShelfIDForAppID(arc_app_id1)); |
| 1836 EXPECT_EQ(0, launcher_controller_->GetShelfIDForAppID(arc_app_id2)); | 1836 EXPECT_EQ(0, launcher_controller_->GetShelfIDForAppID(arc_app_id2)); |
| 1837 EXPECT_EQ(0, launcher_controller_->GetShelfIDForAppID(arc_app_id3)); | 1837 EXPECT_EQ(0, launcher_controller_->GetShelfIDForAppID(arc_app_id3)); |
| 1838 | 1838 |
| 1839 ASSERT_EQ(2U, arc_test_.app_instance()->launch_requests().size()); | 1839 ASSERT_EQ(2U, arc_test_.app_instance()->launch_requests().size()); |
| 1840 | 1840 |
| 1841 const arc::FakeAppInstance::Request* request1 = | 1841 const arc::FakeAppInstance::Request* request1 = |
| 1842 arc_test_.app_instance()->launch_requests()[0]; | 1842 arc_test_.app_instance()->launch_requests()[0].get(); |
| 1843 const arc::FakeAppInstance::Request* request2 = | 1843 const arc::FakeAppInstance::Request* request2 = |
| 1844 arc_test_.app_instance()->launch_requests()[1]; | 1844 arc_test_.app_instance()->launch_requests()[1].get(); |
| 1845 | 1845 |
| 1846 EXPECT_TRUE((request1->IsForApp(app2) && request2->IsForApp(app3)) || | 1846 EXPECT_TRUE((request1->IsForApp(app2) && request2->IsForApp(app3)) || |
| 1847 (request1->IsForApp(app3) && request2->IsForApp(app2))); | 1847 (request1->IsForApp(app3) && request2->IsForApp(app2))); |
| 1848 } | 1848 } |
| 1849 | 1849 |
| 1850 TEST_F(ChromeLauncherControllerImplMultiProfileWithArcTest, ArcMultiUser) { | 1850 TEST_F(ChromeLauncherControllerImplMultiProfileWithArcTest, ArcMultiUser) { |
| 1851 SendListOfArcApps(); | 1851 SendListOfArcApps(); |
| 1852 | 1852 |
| 1853 InitLauncherController(); | 1853 InitLauncherController(); |
| 1854 SetLauncherControllerHelper(new TestLauncherControllerHelper); | 1854 SetLauncherControllerHelper(new TestLauncherControllerHelper); |
| (...skipping 2052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3907 EXPECT_TRUE(launcher_controller_->GetArcDeferredLauncher()->HasApp(app_id)); | 3907 EXPECT_TRUE(launcher_controller_->GetArcDeferredLauncher()->HasApp(app_id)); |
| 3908 | 3908 |
| 3909 std::string window_app_id("org.chromium.arc.1"); | 3909 std::string window_app_id("org.chromium.arc.1"); |
| 3910 CreateArcWindow(window_app_id); | 3910 CreateArcWindow(window_app_id); |
| 3911 arc_test_.app_instance()->SendTaskCreated(1, | 3911 arc_test_.app_instance()->SendTaskCreated(1, |
| 3912 arc_test_.fake_default_apps()[0]); | 3912 arc_test_.fake_default_apps()[0]); |
| 3913 | 3913 |
| 3914 EXPECT_NE(0, launcher_controller_->GetShelfIDForAppID(app_id)); | 3914 EXPECT_NE(0, launcher_controller_->GetShelfIDForAppID(app_id)); |
| 3915 EXPECT_FALSE(launcher_controller_->GetArcDeferredLauncher()->HasApp(app_id)); | 3915 EXPECT_FALSE(launcher_controller_->GetArcDeferredLauncher()->HasApp(app_id)); |
| 3916 } | 3916 } |
| OLD | NEW |