Index: ash/test/ash_test_base.cc |
diff --git a/ash/test/ash_test_base.cc b/ash/test/ash_test_base.cc |
index 5e62df8ab677ee399a5bb03f579e72c64e93f9b3..2c22ca48476a739fcd36ce4335b4e56900e445e8 100644 |
--- a/ash/test/ash_test_base.cc |
+++ b/ash/test/ash_test_base.cc |
@@ -288,10 +288,27 @@ std::unique_ptr<aura::Window> AshTestBase::CreateTestWindow( |
ash_test_helper_->window_manager_app()->window_manager(); |
aura::Window* window = mus::CreateAndParentTopLevelWindow( |
window_manager, mus_window_type, &properties); |
+ window->set_id(shell_window_id); |
window->Show(); |
return base::WrapUnique<aura::Window>(window); |
} |
+std::unique_ptr<aura::Window> AshTestBase::CreateToplevelTestWindow( |
+ const gfx::Rect& bounds_in_screen, |
+ int shell_window_id) { |
+ if (AshTestHelper::config() == Config::MASH) { |
+ return CreateTestWindow(bounds_in_screen, ui::wm::WINDOW_TYPE_NORMAL, |
+ shell_window_id); |
+ } |
+ |
+ aura::test::TestWindowDelegate* delegate = |
+ aura::test::TestWindowDelegate::CreateSelfDestroyingDelegate(); |
+ return base::WrapUnique<aura::Window>( |
+ CreateTestWindowInShellWithDelegateAndType( |
+ delegate, ui::wm::WINDOW_TYPE_NORMAL, shell_window_id, |
+ bounds_in_screen)); |
+} |
+ |
aura::Window* AshTestBase::CreateTestWindowInShellWithId(int id) { |
return CreateTestWindowInShellWithDelegate(NULL, id, gfx::Rect()); |
} |