| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/touch/touch_observer_hud.h" | 5 #include "ash/touch/touch_observer_hud.h" |
| 6 | 6 |
| 7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
| 8 #include "ash/display/display_manager.h" | 8 #include "ash/display/display_manager.h" |
| 9 #include "ash/root_window_controller.h" | 9 #include "ash/root_window_controller.h" |
| 10 #include "ash/screen_util.h" | 10 #include "ash/screen_util.h" |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 }; | 210 }; |
| 211 | 211 |
| 212 class TouchHudDebugTest : public TouchHudTestBase { | 212 class TouchHudDebugTest : public TouchHudTestBase { |
| 213 public: | 213 public: |
| 214 TouchHudDebugTest() {} | 214 TouchHudDebugTest() {} |
| 215 ~TouchHudDebugTest() override {} | 215 ~TouchHudDebugTest() override {} |
| 216 | 216 |
| 217 void SetUp() override { | 217 void SetUp() override { |
| 218 // Add ash-touch-hud flag to enable debug touch HUD. This flag should be set | 218 // Add ash-touch-hud flag to enable debug touch HUD. This flag should be set |
| 219 // before Ash environment is set up, i.e., before TouchHudTestBase::SetUp(). | 219 // before Ash environment is set up, i.e., before TouchHudTestBase::SetUp(). |
| 220 CommandLine::ForCurrentProcess()->AppendSwitch( | 220 base::CommandLine::ForCurrentProcess()->AppendSwitch( |
| 221 ash::switches::kAshTouchHud); | 221 ash::switches::kAshTouchHud); |
| 222 | 222 |
| 223 TouchHudTestBase::SetUp(); | 223 TouchHudTestBase::SetUp(); |
| 224 } | 224 } |
| 225 | 225 |
| 226 void CheckInternalDisplay() { | 226 void CheckInternalDisplay() { |
| 227 EXPECT_NE(static_cast<TouchObserverHUD*>(NULL), GetInternalTouchHudDebug()); | 227 EXPECT_NE(static_cast<TouchObserverHUD*>(NULL), GetInternalTouchHudDebug()); |
| 228 EXPECT_EQ(internal_display_id(), GetInternalTouchHudDebug()->display_id()); | 228 EXPECT_EQ(internal_display_id(), GetInternalTouchHudDebug()->display_id()); |
| 229 EXPECT_EQ(GetInternalRootWindow(), | 229 EXPECT_EQ(GetInternalRootWindow(), |
| 230 GetRootWindowForTouchHud(GetInternalTouchHudDebug())); | 230 GetRootWindowForTouchHud(GetInternalTouchHudDebug())); |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 | 585 |
| 586 SendTouchEventToInternalHud(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10), 1); | 586 SendTouchEventToInternalHud(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10), 1); |
| 587 EXPECT_EQ(1, GetInternalTouchPointsCount()); | 587 EXPECT_EQ(1, GetInternalTouchPointsCount()); |
| 588 | 588 |
| 589 // Disabling projection touch HUD shoud remove it without crashing. | 589 // Disabling projection touch HUD shoud remove it without crashing. |
| 590 DisableTouchHudProjection(); | 590 DisableTouchHudProjection(); |
| 591 EXPECT_EQ(NULL, GetInternalTouchHudProjection()); | 591 EXPECT_EQ(NULL, GetInternalTouchHudProjection()); |
| 592 } | 592 } |
| 593 | 593 |
| 594 } // namespace ash | 594 } // namespace ash |
| OLD | NEW |