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