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

Side by Side Diff: ash/extended_desktop_unittest.cc

Issue 10960015: aura: Start converting event-filters into event-handlers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge Created 8 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 | « no previous file | ash/shell.h » ('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/display/display_controller.h" 5 #include "ash/display/display_controller.h"
6 #include "ash/display/multi_display_manager.h" 6 #include "ash/display/multi_display_manager.h"
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/system/tray/system_tray.h" 8 #include "ash/system/tray/system_tray.h"
9 #include "ash/test/ash_test_base.h" 9 #include "ash/test/ash_test_base.h"
10 #include "ash/wm/coordinate_conversion.h" 10 #include "ash/wm/coordinate_conversion.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 root_windows[0]->GetFocusManager()->GetFocusedWindow()); 133 root_windows[0]->GetFocusManager()->GetFocusedWindow());
134 EXPECT_TRUE(wm::IsActiveWindow(widget_on_2nd->GetNativeView())); 134 EXPECT_TRUE(wm::IsActiveWindow(widget_on_2nd->GetNativeView()));
135 } 135 }
136 136
137 TEST_F(ExtendedDesktopTest, SystemModal) { 137 TEST_F(ExtendedDesktopTest, SystemModal) {
138 UpdateDisplay("1000x600,600x400"); 138 UpdateDisplay("1000x600,600x400");
139 Shell::RootWindowList root_windows = Shell::GetAllRootWindows(); 139 Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
140 140
141 views::Widget* widget_on_1st = CreateTestWidget(gfx::Rect(10, 10, 100, 100)); 141 views::Widget* widget_on_1st = CreateTestWidget(gfx::Rect(10, 10, 100, 100));
142 EXPECT_TRUE(wm::IsActiveWindow(widget_on_1st->GetNativeView())); 142 EXPECT_TRUE(wm::IsActiveWindow(widget_on_1st->GetNativeView()));
143 EXPECT_EQ(root_windows[0], widget_on_1st->GetNativeView()->GetRootWindow());
143 EXPECT_EQ(root_windows[0], Shell::GetActiveRootWindow()); 144 EXPECT_EQ(root_windows[0], Shell::GetActiveRootWindow());
144 145
145 // Open system modal. Make sure it's on 2nd root window and active. 146 // Open system modal. Make sure it's on 2nd root window and active.
146 views::Widget* modal_widget = views::Widget::CreateWindowWithBounds( 147 views::Widget* modal_widget = views::Widget::CreateWindowWithBounds(
147 new ModalWidgetDelegate(), gfx::Rect(1200, 100, 100, 100)); 148 new ModalWidgetDelegate(), gfx::Rect(1200, 100, 100, 100));
148 modal_widget->Show(); 149 modal_widget->Show();
149 EXPECT_TRUE(wm::IsActiveWindow(modal_widget->GetNativeView())); 150 EXPECT_TRUE(wm::IsActiveWindow(modal_widget->GetNativeView()));
150 EXPECT_EQ(root_windows[1], modal_widget->GetNativeView()->GetRootWindow()); 151 EXPECT_EQ(root_windows[1], modal_widget->GetNativeView()->GetRootWindow());
151 EXPECT_EQ(root_windows[1], Shell::GetActiveRootWindow()); 152 EXPECT_EQ(root_windows[1], Shell::GetActiveRootWindow());
152 153
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 EXPECT_EQ(root_windows[1], w1->GetNativeView()->GetRootWindow()); 594 EXPECT_EQ(root_windows[1], w1->GetNativeView()->GetRootWindow());
594 595
595 // The widget should now move to the 1st root window without the property. 596 // The widget should now move to the 1st root window without the property.
596 w1->GetNativeView()->ClearProperty(internal::kStayInSameRootWindowKey); 597 w1->GetNativeView()->ClearProperty(internal::kStayInSameRootWindowKey);
597 w1->SetBounds(gfx::Rect(10, 10, 50, 50)); 598 w1->SetBounds(gfx::Rect(10, 10, 50, 50));
598 EXPECT_EQ(root_windows[0], w1->GetNativeView()->GetRootWindow()); 599 EXPECT_EQ(root_windows[0], w1->GetNativeView()->GetRootWindow());
599 } 600 }
600 601
601 } // namespace internal 602 } // namespace internal
602 } // namespace ash 603 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698