Index: ash/test/ash_test_base.cc |
diff --git a/ash/test/ash_test_base.cc b/ash/test/ash_test_base.cc |
index 2f4867551e4001f22894872dc0e75322ba0f1b1f..cedb895f26774bcddc8f114cfe8cf9f65244f03e 100644 |
--- a/ash/test/ash_test_base.cc |
+++ b/ash/test/ash_test_base.cc |
@@ -98,6 +98,14 @@ void AshTestBase::UpdateDisplay(const std::string& display_specs) { |
display_manager_test_api.UpdateDisplay(display_specs); |
} |
+aura::RootWindow* AshTestBase::CurrentContext() { |
+ aura::RootWindow* root_window = Shell::GetActiveRootWindow(); |
+ if (!root_window) |
+ root_window = Shell::GetPrimaryRootWindow(); |
+ DCHECK(root_window); |
+ return root_window; |
+} |
+ |
aura::Window* AshTestBase::CreateTestWindowInShellWithId(int id) { |
return CreateTestWindowInShellWithDelegate(NULL, id, gfx::Rect()); |
} |