Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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); |
|
sky
2017/03/07 20:56:10
I changed this single line as this test was failin
msw
2017/03/07 21:36:01
Acknowledged.
| |
| 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 Loading... | |
| 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 |
| OLD | NEW |