| 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 1950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1961 EXPECT_NE(0, launcher_controller_->GetShelfIDForAppID(arc_app_id1)); | 1961 EXPECT_NE(0, launcher_controller_->GetShelfIDForAppID(arc_app_id1)); |
| 1962 arc_test_.app_instance()->SendTaskDestroyed(1); | 1962 arc_test_.app_instance()->SendTaskDestroyed(1); |
| 1963 EXPECT_EQ(0, launcher_controller_->GetShelfIDForAppID(arc_app_id1)); | 1963 EXPECT_EQ(0, launcher_controller_->GetShelfIDForAppID(arc_app_id1)); |
| 1964 arc_window->Close(); | 1964 arc_window->Close(); |
| 1965 base::RunLoop().RunUntilIdle(); | 1965 base::RunLoop().RunUntilIdle(); |
| 1966 EXPECT_EQ(0, launcher_controller_->GetShelfIDForAppID(arc_app_id1)); | 1966 EXPECT_EQ(0, launcher_controller_->GetShelfIDForAppID(arc_app_id1)); |
| 1967 | 1967 |
| 1968 // Arc window created after and closed before mojom notification. | 1968 // Arc window created after and closed before mojom notification. |
| 1969 std::string window_app_id2("org.chromium.arc.2"); | 1969 std::string window_app_id2("org.chromium.arc.2"); |
| 1970 arc_test_.app_instance()->SendTaskCreated(2, arc_test_.fake_apps()[1]); | 1970 arc_test_.app_instance()->SendTaskCreated(2, arc_test_.fake_apps()[1]); |
| 1971 EXPECT_EQ(0, launcher_controller_->GetShelfIDForAppID(arc_app_id2)); | 1971 EXPECT_NE(0, launcher_controller_->GetShelfIDForAppID(arc_app_id2)); |
| 1972 arc_window = CreateArcWindow(window_app_id2); | 1972 arc_window = CreateArcWindow(window_app_id2); |
| 1973 ASSERT_TRUE(arc_window); | 1973 ASSERT_TRUE(arc_window); |
| 1974 EXPECT_NE(0, launcher_controller_->GetShelfIDForAppID(arc_app_id2)); | 1974 EXPECT_NE(0, launcher_controller_->GetShelfIDForAppID(arc_app_id2)); |
| 1975 arc_window->Close(); | 1975 arc_window->Close(); |
| 1976 base::RunLoop().RunUntilIdle(); | 1976 base::RunLoop().RunUntilIdle(); |
| 1977 // Closing window does not close shelf item. It is closed on task destroy. | 1977 // Closing window does not close shelf item. It is closed on task destroy. |
| 1978 EXPECT_NE(0, launcher_controller_->GetShelfIDForAppID(arc_app_id2)); | 1978 EXPECT_NE(0, launcher_controller_->GetShelfIDForAppID(arc_app_id2)); |
| 1979 arc_test_.app_instance()->SendTaskDestroyed(2); | 1979 arc_test_.app_instance()->SendTaskDestroyed(2); |
| 1980 EXPECT_EQ(0, launcher_controller_->GetShelfIDForAppID(arc_app_id2)); | 1980 EXPECT_EQ(0, launcher_controller_->GetShelfIDForAppID(arc_app_id2)); |
| 1981 } | 1981 } |
| (...skipping 1977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3959 app_service_->GetPinPosition(extension_misc::kChromeAppId))); | 3959 app_service_->GetPinPosition(extension_misc::kChromeAppId))); |
| 3960 EXPECT_TRUE( | 3960 EXPECT_TRUE( |
| 3961 position_1.Equals(app_service_->GetPinPosition(extension1_->id()))); | 3961 position_1.Equals(app_service_->GetPinPosition(extension1_->id()))); |
| 3962 EXPECT_TRUE( | 3962 EXPECT_TRUE( |
| 3963 position_1.Equals(app_service_->GetPinPosition(extension1_->id()))); | 3963 position_1.Equals(app_service_->GetPinPosition(extension1_->id()))); |
| 3964 EXPECT_TRUE( | 3964 EXPECT_TRUE( |
| 3965 position_2.Equals(app_service_->GetPinPosition(extension2_->id()))); | 3965 position_2.Equals(app_service_->GetPinPosition(extension2_->id()))); |
| 3966 EXPECT_TRUE( | 3966 EXPECT_TRUE( |
| 3967 position_3.Equals(app_service_->GetPinPosition(extension3_->id()))); | 3967 position_3.Equals(app_service_->GetPinPosition(extension3_->id()))); |
| 3968 } | 3968 } |
| OLD | NEW |