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 "ash/wm/system_gesture_event_filter.h" | 5 #include "ash/wm/system_gesture_event_filter.h" |
| 6 | 6 |
| 7 #include "ash/accelerators/accelerator_controller.h" | 7 #include "ash/accelerators/accelerator_controller.h" |
| 8 #include "ash/ash_switches.h" | 8 #include "ash/ash_switches.h" |
| 9 #include "ash/display/display_manager.h" | 9 #include "ash/display/display_manager.h" |
| 10 #include "ash/launcher/launcher.h" | 10 #include "ash/launcher/launcher.h" |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 212 CommandLine::ForCurrentProcess()->AppendSwitch( | 212 CommandLine::ForCurrentProcess()->AppendSwitch( |
| 213 ash::switches::kAshEnableAdvancedGestures); | 213 ash::switches::kAshEnableAdvancedGestures); |
| 214 CommandLine::ForCurrentProcess()->AppendSwitch( | 214 CommandLine::ForCurrentProcess()->AppendSwitch( |
| 215 ::switches::kEnableBezelTouch); | 215 ::switches::kEnableBezelTouch); |
| 216 test::AshTestBase::SetUp(); | 216 test::AshTestBase::SetUp(); |
| 217 // Enable brightness key. | 217 // Enable brightness key. |
| 218 Shell::GetInstance()->display_manager()-> | 218 Shell::GetInstance()->display_manager()-> |
| 219 SetFirstDisplayAsInternalDisplayForTest(); | 219 SetFirstDisplayAsInternalDisplayForTest(); |
| 220 } | 220 } |
| 221 | 221 |
| 222 virtual void TearDown() OVERRIDE { | |
| 223 Shell::GetInstance()->display_manager()->ResetInternalDisplayForTest(); | |
|
oshima
2013/02/12 17:38:51
ditto. should be in AshTestBase
ynovikov
2013/02/12 21:17:47
Done.
| |
| 224 test::AshTestBase::TearDown(); | |
| 225 } | |
| 226 | |
| 222 private: | 227 private: |
| 223 DISALLOW_COPY_AND_ASSIGN(SystemGestureEventFilterTest); | 228 DISALLOW_COPY_AND_ASSIGN(SystemGestureEventFilterTest); |
| 224 }; | 229 }; |
| 225 | 230 |
| 226 ui::GestureEvent* CreateGesture(ui::EventType type, | 231 ui::GestureEvent* CreateGesture(ui::EventType type, |
| 227 int x, | 232 int x, |
| 228 int y, | 233 int y, |
| 229 float delta_x, | 234 float delta_x, |
| 230 float delta_y, | 235 float delta_y, |
| 231 int touch_id) { | 236 int touch_id) { |
| (...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 779 | 784 |
| 780 bounds = toplevel->GetNativeWindow()->bounds(); | 785 bounds = toplevel->GetNativeWindow()->bounds(); |
| 781 // Swipe down. Nothing should happen. | 786 // Swipe down. Nothing should happen. |
| 782 generator.GestureMultiFingerScroll(kTouchPoints, points, 15, kSteps, 0, 150); | 787 generator.GestureMultiFingerScroll(kTouchPoints, points, 15, kSteps, 0, 150); |
| 783 EXPECT_EQ(bounds.ToString(), | 788 EXPECT_EQ(bounds.ToString(), |
| 784 toplevel->GetNativeWindow()->bounds().ToString()); | 789 toplevel->GetNativeWindow()->bounds().ToString()); |
| 785 } | 790 } |
| 786 | 791 |
| 787 } // namespace test | 792 } // namespace test |
| 788 } // namespace ash | 793 } // namespace ash |
| OLD | NEW |