Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(694)

Unified Diff: ash/wm/workspace/workspace_layout_manager_unittest.cc

Issue 11421006: Desktop aura: Break aura::Window::SetParent in two. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: I think the content_unittests timeout on linux_aura is flake, but try to fix it anyway. Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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());

Powered by Google App Engine
This is Rietveld 408576698