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

Side by Side Diff: ash/wm/system_modal_container_layout_manager_unittest.cc

Issue 23483041: [Cleanup] Remove mac code from aura/ash/views (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 months 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/wm/base_layout_manager_unittest.cc ('k') | ash/wm/toplevel_window_event_handler.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/wm/system_modal_container_layout_manager.h" 5 #include "ash/wm/system_modal_container_layout_manager.h"
6 6
7 #include "ash/root_window_controller.h" 7 #include "ash/root_window_controller.h"
8 #include "ash/session_state_delegate.h" 8 #include "ash/session_state_delegate.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/shell_window_ids.h" 10 #include "ash/shell_window_ids.h"
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 aura::test::EventGenerator e2(Shell::GetPrimaryRootWindow(), t1.get()); 243 aura::test::EventGenerator e2(Shell::GetPrimaryRootWindow(), t1.get());
244 e2.ClickLeftButton(); 244 e2.ClickLeftButton();
245 EXPECT_TRUE(wm::IsActiveWindow(t2)); 245 EXPECT_TRUE(wm::IsActiveWindow(t2));
246 246
247 // Both transients should be destroyed with parent. 247 // Both transients should be destroyed with parent.
248 t1.reset(); 248 t1.reset();
249 EXPECT_TRUE(do1.destroyed()); 249 EXPECT_TRUE(do1.destroyed());
250 EXPECT_TRUE(do2.destroyed()); 250 EXPECT_TRUE(do2.destroyed());
251 } 251 }
252 252
253 // Fails on Mac only. Needs to be implemented. http://crbug.com/111279.
254 #if defined(OS_MACOSX)
255 #define MAYBE_CanActivateAfterEndModalSession \
256 DISABLED_CanActivateAfterEndModalSession
257 #else
258 #define MAYBE_CanActivateAfterEndModalSession CanActivateAfterEndModalSession
259 #endif
260 // Tests that we can activate an unrelated window after a modal window is closed 253 // Tests that we can activate an unrelated window after a modal window is closed
261 // for a window. 254 // for a window.
262 TEST_F(SystemModalContainerLayoutManagerTest, 255 TEST_F(SystemModalContainerLayoutManagerTest, CanActivateAfterEndModalSession) {
263 MAYBE_CanActivateAfterEndModalSession) {
264 scoped_ptr<aura::Window> unrelated(OpenToplevelTestWindow(false)); 256 scoped_ptr<aura::Window> unrelated(OpenToplevelTestWindow(false));
265 unrelated->SetBounds(gfx::Rect(100, 100, 50, 50)); 257 unrelated->SetBounds(gfx::Rect(100, 100, 50, 50));
266 scoped_ptr<aura::Window> parent(OpenToplevelTestWindow(false)); 258 scoped_ptr<aura::Window> parent(OpenToplevelTestWindow(false));
267 // parent should be active. 259 // parent should be active.
268 EXPECT_TRUE(wm::IsActiveWindow(parent.get())); 260 EXPECT_TRUE(wm::IsActiveWindow(parent.get()));
269 261
270 scoped_ptr<aura::Window> transient( 262 scoped_ptr<aura::Window> transient(
271 OpenTestWindowWithParent(parent.get(), true)); 263 OpenTestWindowWithParent(parent.get(), true));
272 // t1 should now be active. 264 // t1 should now be active.
273 EXPECT_TRUE(wm::IsActiveWindow(transient.get())); 265 EXPECT_TRUE(wm::IsActiveWindow(transient.get()));
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 486
495 // No more modal screen. 487 // No more modal screen.
496 modal1->Hide(); 488 modal1->Hide();
497 TestWindow::CloseTestWindow(modal1.release()); 489 TestWindow::CloseTestWindow(modal1.release());
498 EXPECT_FALSE(AllRootWindowsHaveModalBackgrounds()); 490 EXPECT_FALSE(AllRootWindowsHaveModalBackgrounds());
499 EXPECT_TRUE(wm::IsActiveWindow(normal.get())); 491 EXPECT_TRUE(wm::IsActiveWindow(normal.get()));
500 } 492 }
501 493
502 } // namespace test 494 } // namespace test
503 } // namespace ash 495 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/base_layout_manager_unittest.cc ('k') | ash/wm/toplevel_window_event_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698