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

Side by Side Diff: ash/wm/overview/window_selector_unittest.cc

Issue 115153002: wm: public window_types. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/launcher/launcher.h" 5 #include "ash/launcher/launcher.h"
6 #include "ash/root_window_controller.h" 6 #include "ash/root_window_controller.h"
7 #include "ash/screen_ash.h" 7 #include "ash/screen_ash.h"
8 #include "ash/shelf/shelf_widget.h" 8 #include "ash/shelf/shelf_widget.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/test/ash_test_base.h" 10 #include "ash/test/ash_test_base.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 aura::Window* CreateNonActivatableWindow(const gfx::Rect& bounds) { 119 aura::Window* CreateNonActivatableWindow(const gfx::Rect& bounds) {
120 aura::Window* window = CreateWindow(bounds); 120 aura::Window* window = CreateWindow(bounds);
121 aura::client::SetActivationDelegate(window, 121 aura::client::SetActivationDelegate(window,
122 &non_activatable_activation_delegate_); 122 &non_activatable_activation_delegate_);
123 EXPECT_FALSE(ash::wm::CanActivateWindow(window)); 123 EXPECT_FALSE(ash::wm::CanActivateWindow(window));
124 return window; 124 return window;
125 } 125 }
126 126
127 aura::Window* CreatePanelWindow(const gfx::Rect& bounds) { 127 aura::Window* CreatePanelWindow(const gfx::Rect& bounds) {
128 aura::Window* window = CreateTestWindowInShellWithDelegateAndType( 128 aura::Window* window = CreateTestWindowInShellWithDelegateAndType(
129 NULL, aura::client::WINDOW_TYPE_PANEL, 0, bounds); 129 NULL, ui::wm::WINDOW_TYPE_PANEL, 0, bounds);
130 test::TestShelfDelegate::instance()->AddLauncherItem(window); 130 test::TestShelfDelegate::instance()->AddLauncherItem(window);
131 shelf_view_test()->RunMessageLoopUntilAnimationsDone(); 131 shelf_view_test()->RunMessageLoopUntilAnimationsDone();
132 return window; 132 return window;
133 } 133 }
134 134
135 bool WindowsOverlapping(aura::Window* window1, aura::Window* window2) { 135 bool WindowsOverlapping(aura::Window* window1, aura::Window* window2) {
136 gfx::RectF window1_bounds = GetTransformedTargetBounds(window1); 136 gfx::RectF window1_bounds = GetTransformedTargetBounds(window1);
137 gfx::RectF window2_bounds = GetTransformedTargetBounds(window2); 137 gfx::RectF window2_bounds = GetTransformedTargetBounds(window2);
138 return window1_bounds.Intersects(window2_bounds); 138 return window1_bounds.Intersects(window2_bounds);
139 } 139 }
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after
941 ToEnclosingRect(GetTransformedTargetBounds(window1.get())); 941 ToEnclosingRect(GetTransformedTargetBounds(window1.get()));
942 EXPECT_EQ(overview_bounds.x(), new_overview_bounds.x()); 942 EXPECT_EQ(overview_bounds.x(), new_overview_bounds.x());
943 EXPECT_EQ(overview_bounds.y(), new_overview_bounds.y()); 943 EXPECT_EQ(overview_bounds.y(), new_overview_bounds.y());
944 EXPECT_EQ(overview_bounds.width(), new_overview_bounds.width()); 944 EXPECT_EQ(overview_bounds.width(), new_overview_bounds.width());
945 EXPECT_EQ(overview_bounds.height(), new_overview_bounds.height()); 945 EXPECT_EQ(overview_bounds.height(), new_overview_bounds.height());
946 StopCycling(); 946 StopCycling();
947 } 947 }
948 948
949 } // namespace internal 949 } // namespace internal
950 } // namespace ash 950 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698