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

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

Issue 2739703003: Last sets of tests that can move to common_unittests (Closed)
Patch Set: comments Created 3 years, 9 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
« no previous file with comments | « ash/wm/window_manager_unittest.cc ('k') | ash/wm/window_state_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 "ui/wm/core/window_modality_controller.h" 5 #include "ui/wm/core/window_modality_controller.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/test/ash_test_base.h" 8 #include "ash/test/ash_test_base.h"
9 #include "ash/test/child_modal_window.h" 9 #include "ash/test/child_modal_window.h"
10 #include "ash/wm/window_util.h" 10 #include "ash/wm/window_util.h"
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 aura::Window* parent = widget->GetNativeView(); 466 aura::Window* parent = widget->GetNativeView();
467 EXPECT_TRUE(wm::IsActiveWindow(parent)); 467 EXPECT_TRUE(wm::IsActiveWindow(parent));
468 468
469 aura::Window* modal_parent = delegate->GetModalParent(); 469 aura::Window* modal_parent = delegate->GetModalParent();
470 EXPECT_NE(static_cast<aura::Window*>(NULL), modal_parent); 470 EXPECT_NE(static_cast<aura::Window*>(NULL), modal_parent);
471 EXPECT_NE(parent, modal_parent); 471 EXPECT_NE(parent, modal_parent);
472 EXPECT_FALSE(wm::IsActiveWindow(modal_parent)); 472 EXPECT_FALSE(wm::IsActiveWindow(modal_parent));
473 473
474 delegate->ShowChild(); 474 delegate->ShowChild();
475 aura::Window* child = delegate->GetChild(); 475 aura::Window* child = delegate->GetChild();
476 EXPECT_NE(static_cast<aura::Window*>(NULL), child); 476 EXPECT_NE(nullptr, child);
477 477
478 EXPECT_TRUE(wm::IsActiveWindow(child)); 478 EXPECT_TRUE(wm::IsActiveWindow(child));
479 EXPECT_FALSE(wm::IsActiveWindow(modal_parent)); 479 EXPECT_FALSE(wm::IsActiveWindow(modal_parent));
480 EXPECT_FALSE(wm::IsActiveWindow(parent)); 480 EXPECT_FALSE(wm::IsActiveWindow(parent));
481 481
482 EXPECT_TRUE(child->HasFocus()); 482 EXPECT_TRUE(child->HasFocus());
483 EXPECT_FALSE(modal_parent->HasFocus()); 483 EXPECT_FALSE(modal_parent->HasFocus());
484 EXPECT_FALSE(parent->HasFocus()); 484 EXPECT_FALSE(parent->HasFocus());
485 485
486 wm::ActivateWindow(modal_parent); 486 wm::ActivateWindow(modal_parent);
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 EXPECT_TRUE(wm::IsActiveWindow(w4.get())); 642 EXPECT_TRUE(wm::IsActiveWindow(w4.get()));
643 643
644 wm::ActivateWindow(w3.get()); 644 wm::ActivateWindow(w3.get());
645 EXPECT_TRUE(wm::IsActiveWindow(w4.get())); 645 EXPECT_TRUE(wm::IsActiveWindow(w4.get()));
646 646
647 wm::ActivateWindow(w4.get()); 647 wm::ActivateWindow(w4.get());
648 EXPECT_TRUE(wm::IsActiveWindow(w4.get())); 648 EXPECT_TRUE(wm::IsActiveWindow(w4.get()));
649 } 649 }
650 650
651 } // namespace ash 651 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/window_manager_unittest.cc ('k') | ash/wm/window_state_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698