Index: athena/content/app_activity_unittest.cc |
diff --git a/athena/content/app_activity_unittest.cc b/athena/content/app_activity_unittest.cc |
index 6c287950fc5c19ce4d2cea3f2a6c23ada026ad52..e0ad6408b51a607d402ea7deca8e605a6e763871 100644 |
--- a/athena/content/app_activity_unittest.cc |
+++ b/athena/content/app_activity_unittest.cc |
@@ -76,7 +76,9 @@ class TestAppActivity : public AppActivity { |
virtual base::string16 GetTitle() const OVERRIDE { return title_; } |
virtual bool UsesFrame() const OVERRIDE { return true; } |
virtual views::View* GetContentsView() OVERRIDE { return view_; } |
- virtual void CreateOverviewModeImage() OVERRIDE {} |
+ virtual gfx::ImageSkia GetOverviewModeImage() OVERRIDE { |
+ return gfx::ImageSkia(); |
+ } |
private: |
// If known the registry which holds all activities for the associated app. |
@@ -277,12 +279,14 @@ TEST_F(AppActivityTest, TestUnloadFollowedByClose) { |
// Calling Unload now should not do anything since at least one activity in |
// the registry is still visible. |
app_activity_registry->Unload(); |
+ RunAllPendingInMessageLoop(); |
EXPECT_EQ(0, test_extensions_delegate()->unload_called()); |
// After setting our activity to unloaded however the application should get |
// unloaded as requested. |
app_activity->SetCurrentState(Activity::ACTIVITY_UNLOADED); |
app_activity_registry->Unload(); |
+ RunAllPendingInMessageLoop(); |
EXPECT_EQ(1, test_extensions_delegate()->unload_called()); |
// Check that our created application is gone, and instead a proxy got |
@@ -324,6 +328,7 @@ TEST_F(AppActivityTest, TestUnloadProxyLocation) { |
app_activity2a->SetCurrentState(Activity::ACTIVITY_UNLOADED); |
app_activity2b->SetCurrentState(Activity::ACTIVITY_UNLOADED); |
app_activity2a->app_activity_registry()->Unload(); |
+ RunAllPendingInMessageLoop(); |
EXPECT_EQ(0, app_activity_registry->NumberOfActivities()); |
Activity* activity_proxy = app_activity_registry->unloaded_activity_proxy(); |
RunAllPendingInMessageLoop(); |
@@ -361,12 +366,15 @@ TEST_F(AppActivityTest, TestMultipleActivityUnloadLock) { |
// After setting all activities to UNLOADED the application should unload. |
app_activity1->SetCurrentState(Activity::ACTIVITY_UNLOADED); |
app_activity1->app_activity_registry()->Unload(); |
+ RunAllPendingInMessageLoop(); |
EXPECT_EQ(0, test_extensions_delegate()->unload_called()); |
app_activity2->SetCurrentState(Activity::ACTIVITY_UNLOADED); |
app_activity2->app_activity_registry()->Unload(); |
+ RunAllPendingInMessageLoop(); |
EXPECT_EQ(0, test_extensions_delegate()->unload_called()); |
app_activity3->SetCurrentState(Activity::ACTIVITY_UNLOADED); |
app_activity3->app_activity_registry()->Unload(); |
+ RunAllPendingInMessageLoop(); |
EXPECT_EQ(1, test_extensions_delegate()->unload_called()); |
// Now there should only be the proxy activity left. |
@@ -405,6 +413,7 @@ TEST_F(AppActivityTest, TestUnloadWithReload) { |
// Unload the activity. |
app_activity->SetCurrentState(Activity::ACTIVITY_UNLOADED); |
app_activity_registry->Unload(); |
+ RunAllPendingInMessageLoop(); |
EXPECT_EQ(1, test_extensions_delegate()->unload_called()); |
// Try to activate the activity again. This will force the application to |