OLD | NEW |
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 <algorithm> | 5 #include <algorithm> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "ash/ash_switches.h" | 8 #include "ash/ash_switches.h" |
9 #include "ash/aura/wm_window_aura.h" | 9 #include "ash/aura/wm_window_aura.h" |
10 #include "ash/common/accessibility_delegate.h" | 10 #include "ash/common/accessibility_delegate.h" |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 if (!window->layer()->GetTargetTransformRelativeTo(root->layer(), | 178 if (!window->layer()->GetTargetTransformRelativeTo(root->layer(), |
179 &transform)) { | 179 &transform)) { |
180 return gfx::RectF(); | 180 return gfx::RectF(); |
181 } | 181 } |
182 transform.TransformRect(&bounds); | 182 transform.TransformRect(&bounds); |
183 return bounds; | 183 return bounds; |
184 } | 184 } |
185 | 185 |
186 void ClickWindow(aura::Window* window) { | 186 void ClickWindow(aura::Window* window) { |
187 ui::test::EventGenerator event_generator(window->GetRootWindow(), window); | 187 ui::test::EventGenerator event_generator(window->GetRootWindow(), window); |
188 gfx::RectF target = GetTransformedBounds(window); | |
189 event_generator.ClickLeftButton(); | 188 event_generator.ClickLeftButton(); |
190 } | 189 } |
191 | 190 |
192 void SendKey(ui::KeyboardCode key) { | 191 void SendKey(ui::KeyboardCode key) { |
193 ui::test::EventGenerator event_generator(Shell::GetPrimaryRootWindow()); | 192 ui::test::EventGenerator event_generator(Shell::GetPrimaryRootWindow()); |
194 event_generator.PressKey(key, 0); | 193 event_generator.PressKey(key, 0); |
195 event_generator.ReleaseKey(key, 0); | 194 event_generator.ReleaseKey(key, 0); |
196 } | 195 } |
197 | 196 |
198 bool IsSelecting() { | 197 bool IsSelecting() { |
(...skipping 1530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1729 bounds.y()); | 1728 bounds.y()); |
1730 EXPECT_LE(transformed_rect.bottom(), bounds.bottom()); | 1729 EXPECT_LE(transformed_rect.bottom(), bounds.bottom()); |
1731 EXPECT_NEAR(transformed_rect.x() - bounds.x(), | 1730 EXPECT_NEAR(transformed_rect.x() - bounds.x(), |
1732 bounds.right() - transformed_rect.right(), 1); | 1731 bounds.right() - transformed_rect.right(), 1); |
1733 EXPECT_NEAR( | 1732 EXPECT_NEAR( |
1734 transformed_rect.y() + (int)(scale * inset) - header_height - bounds.y(), | 1733 transformed_rect.y() + (int)(scale * inset) - header_height - bounds.y(), |
1735 bounds.bottom() - transformed_rect.bottom(), 1); | 1734 bounds.bottom() - transformed_rect.bottom(), 1); |
1736 } | 1735 } |
1737 | 1736 |
1738 } // namespace ash | 1737 } // namespace ash |
OLD | NEW |