Index: ash/wm/workspace/workspace_layout_manager_unittest.cc |
diff --git a/ash/wm/workspace/workspace_layout_manager_unittest.cc b/ash/wm/workspace/workspace_layout_manager_unittest.cc |
index 698717a3cebb51f0eee20cd6190e0f0888bd6450..e3ab46732d90ffeb963b8d1bcf967ebe42990438 100644 |
--- a/ash/wm/workspace/workspace_layout_manager_unittest.cc |
+++ b/ash/wm/workspace/workspace_layout_manager_unittest.cc |
@@ -10,6 +10,7 @@ |
#include "ash/wm/property_util.h" |
#include "ash/wm/shelf_layout_manager.h" |
#include "ash/wm/window_util.h" |
+#include "ui/aura/client/aura_constants.h" |
#include "ui/aura/root_window.h" |
#include "ui/aura/test/test_windows.h" |
#include "ui/aura/window.h" |
@@ -25,7 +26,14 @@ class WorkspaceLayoutManagerTest : public test::AshTestBase { |
virtual ~WorkspaceLayoutManagerTest() {} |
aura::Window* CreateTestWindow(const gfx::Rect& bounds) { |
- return aura::test::CreateTestWindowWithBounds(bounds, NULL); |
+ aura::Window* window = new aura::Window(NULL); |
sky
2012/11/21 23:35:59
Isn't this CreateTestWindowInShellWithBounds ? In
|
+ window->SetType(aura::client::WINDOW_TYPE_NORMAL); |
+ window->Init(ui::LAYER_TEXTURED); |
+ window->SetBounds(bounds); |
+ window->Show(); |
+ window->SetProperty(aura::client::kCanMaximizeKey, true); |
+ AddToRootWindow(window); |
+ return window; |
} |
private: |
@@ -92,7 +100,7 @@ TEST_F(WorkspaceLayoutManagerTest, DontClobberRestoreBounds) { |
// NOTE: for this test to exercise the failure the observer needs to be added |
// before the parent set. This mimics what BrowserFrameAura does. |
window->AddObserver(&window_observer); |
- window->SetParent(NULL); |
+ AddToRootWindow(window.get()); |
window->Show(); |
ash::wm::ActivateWindow(window.get()); |