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

Side by Side Diff: ash/root_window_controller_unittest.cc

Issue 11421006: Desktop aura: Break aura::Window::SetParent in two. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix ash_unittests Created 8 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/focus_cycler_unittest.cc ('k') | ash/shell_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/root_window_controller.h" 5 #include "ash/root_window_controller.h"
6 6
7 #include "ash/display/display_controller.h" 7 #include "ash/display/display_controller.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/shell_delegate.h" 9 #include "ash/shell_delegate.h"
10 #include "ash/shell_window_ids.h" 10 #include "ash/shell_window_ids.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 EXPECT_EQ("600,0 500x500", 140 EXPECT_EQ("600,0 500x500",
141 fullscreen->GetWindowBoundsInScreen().ToString()); 141 fullscreen->GetWindowBoundsInScreen().ToString());
142 EXPECT_EQ("0,0 500x500", 142 EXPECT_EQ("0,0 500x500",
143 fullscreen->GetNativeView()->GetBoundsInRootWindow().ToString()); 143 fullscreen->GetNativeView()->GetBoundsInRootWindow().ToString());
144 #endif 144 #endif
145 145
146 // Make sure a window that will delete itself when losing focus 146 // Make sure a window that will delete itself when losing focus
147 // will not crash. 147 // will not crash.
148 aura::WindowTracker tracker; 148 aura::WindowTracker tracker;
149 DeleteOnBlurDelegate delete_on_blur_delegate; 149 DeleteOnBlurDelegate delete_on_blur_delegate;
150 aura::Window* d2 = aura::test::CreateTestWindowWithDelegate( 150 aura::Window* d2 = CreateTestWindowInShellWithDelegate(
151 &delete_on_blur_delegate, 0, gfx::Rect(50, 50, 100, 100), NULL); 151 &delete_on_blur_delegate, 0, gfx::Rect(50, 50, 100, 100));
152 delete_on_blur_delegate.set_window(d2); 152 delete_on_blur_delegate.set_window(d2);
153 aura::client::GetFocusClient(root_windows[0])->FocusWindow(d2, NULL); 153 aura::client::GetFocusClient(root_windows[0])->FocusWindow(d2, NULL);
154 tracker.Add(d2); 154 tracker.Add(d2);
155 155
156 UpdateDisplay("600x600"); 156 UpdateDisplay("600x600");
157 157
158 // d2 must have been deleted. 158 // d2 must have been deleted.
159 EXPECT_FALSE(tracker.Contains(d2)); 159 EXPECT_FALSE(tracker.Contains(d2));
160 160
161 EXPECT_EQ(root_windows[0], normal->GetNativeView()->GetRootWindow()); 161 EXPECT_EQ(root_windows[0], normal->GetNativeView()->GetRootWindow());
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 views::Widget* session_modal_widget = 308 views::Widget* session_modal_widget =
309 CreateModalWidget(gfx::Rect(300, 10, 100, 100)); 309 CreateModalWidget(gfx::Rect(300, 10, 100, 100));
310 EXPECT_EQ(Shell::GetContainer(controller->root_window(), 310 EXPECT_EQ(Shell::GetContainer(controller->root_window(),
311 internal::kShellWindowId_SystemModalContainer)->layout_manager(), 311 internal::kShellWindowId_SystemModalContainer)->layout_manager(),
312 controller->GetSystemModalLayoutManager( 312 controller->GetSystemModalLayoutManager(
313 session_modal_widget->GetNativeView())); 313 session_modal_widget->GetNativeView()));
314 } 314 }
315 315
316 } // namespace test 316 } // namespace test
317 } // namespace ash 317 } // namespace ash
OLDNEW
« no previous file with comments | « ash/focus_cycler_unittest.cc ('k') | ash/shell_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698