| OLD | NEW |
| 1 /// Copyright 2014 The Chromium Authors. All rights reserved. | 1 /// Copyright 2014 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 "athena/activity/public/activity_factory.h" | 5 #include "athena/activity/public/activity_factory.h" |
| 6 #include "athena/activity/public/activity_manager.h" | 6 #include "athena/activity/public/activity_manager.h" |
| 7 #include "athena/content/app_activity.h" | 7 #include "athena/content/app_activity.h" |
| 8 #include "athena/content/app_activity_registry.h" | 8 #include "athena/content/app_activity_registry.h" |
| 9 #include "athena/content/public/app_registry.h" | 9 #include "athena/content/public/app_registry.h" |
| 10 #include "athena/extensions/public/extensions_delegate.h" | 10 #include "athena/extensions/public/extensions_delegate.h" |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 // Close the proxy object and make sure that nothing bad happens. | 303 // Close the proxy object and make sure that nothing bad happens. |
| 304 DeleteActivity(activity_proxy); | 304 DeleteActivity(activity_proxy); |
| 305 | 305 |
| 306 EXPECT_EQ(0, AppRegistry::Get()->NumberOfApplications()); | 306 EXPECT_EQ(0, AppRegistry::Get()->NumberOfApplications()); |
| 307 EXPECT_EQ(1, test_extensions_delegate()->unload_called()); | 307 EXPECT_EQ(1, test_extensions_delegate()->unload_called()); |
| 308 EXPECT_EQ(0, test_extensions_delegate()->restart_called()); | 308 EXPECT_EQ(0, test_extensions_delegate()->restart_called()); |
| 309 } | 309 } |
| 310 | 310 |
| 311 // Test that when unloading an app while multiple apps / activities are present, | 311 // Test that when unloading an app while multiple apps / activities are present, |
| 312 // the proxy gets created in the correct location. | 312 // the proxy gets created in the correct location. |
| 313 TEST_F(AppActivityTest, TestUnloadProxyLocation) { | 313 // Flaky: http://crbug.com/416843. |
| 314 TEST_F(AppActivityTest, DISABLED_TestUnloadProxyLocation) { |
| 314 // Set up some activities for some applications. | 315 // Set up some activities for some applications. |
| 315 TestAppActivity* app_activity1a = CreateAppActivity(kDummyApp1); | 316 TestAppActivity* app_activity1a = CreateAppActivity(kDummyApp1); |
| 316 TestAppActivity* app_activity2a = CreateAppActivity(kDummyApp2); | 317 TestAppActivity* app_activity2a = CreateAppActivity(kDummyApp2); |
| 317 TestAppActivity* app_activity2b = CreateAppActivity(kDummyApp2); | 318 TestAppActivity* app_activity2b = CreateAppActivity(kDummyApp2); |
| 318 TestAppActivity* app_activity1b = CreateAppActivity(kDummyApp1); | 319 TestAppActivity* app_activity1b = CreateAppActivity(kDummyApp1); |
| 319 EXPECT_EQ(3, GetActivityPosition(app_activity1b)); | 320 EXPECT_EQ(3, GetActivityPosition(app_activity1b)); |
| 320 EXPECT_EQ(2, GetActivityPosition(app_activity2b)); | 321 EXPECT_EQ(2, GetActivityPosition(app_activity2b)); |
| 321 EXPECT_EQ(1, GetActivityPosition(app_activity2a)); | 322 EXPECT_EQ(1, GetActivityPosition(app_activity2a)); |
| 322 EXPECT_EQ(0, GetActivityPosition(app_activity1a)); | 323 EXPECT_EQ(0, GetActivityPosition(app_activity1a)); |
| 323 | 324 |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 // However - the restart in this test framework does not really restart and | 420 // However - the restart in this test framework does not really restart and |
| 420 // all objects should be still there.. | 421 // all objects should be still there.. |
| 421 EXPECT_EQ(1, AppRegistry::Get()->NumberOfApplications()); | 422 EXPECT_EQ(1, AppRegistry::Get()->NumberOfApplications()); |
| 422 EXPECT_TRUE(app_activity_registry->unloaded_activity_proxy()); | 423 EXPECT_TRUE(app_activity_registry->unloaded_activity_proxy()); |
| 423 Activity::Delete(app_activity_registry->unloaded_activity_proxy()); | 424 Activity::Delete(app_activity_registry->unloaded_activity_proxy()); |
| 424 EXPECT_EQ(0, AppRegistry::Get()->NumberOfApplications()); | 425 EXPECT_EQ(0, AppRegistry::Get()->NumberOfApplications()); |
| 425 } | 426 } |
| 426 | 427 |
| 427 } // namespace test | 428 } // namespace test |
| 428 } // namespace athena | 429 } // namespace athena |
| OLD | NEW |