| 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 "base/auto_reset.h" | 5 #include "base/auto_reset.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "base/location.h" | 7 #include "base/location.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 NavigateToURL(shell(), data_url); | 109 NavigateToURL(shell(), data_url); |
| 110 | 110 |
| 111 RenderWidgetHostImpl* host = GetWidgetHost(); | 111 RenderWidgetHostImpl* host = GetWidgetHost(); |
| 112 host->GetView()->SetSize(gfx::Size(400, 400)); | 112 host->GetView()->SetSize(gfx::Size(400, 400)); |
| 113 | 113 |
| 114 // The page is loaded in the renderer, wait for a new frame to arrive. | 114 // The page is loaded in the renderer, wait for a new frame to arrive. |
| 115 while (!host->ScheduleComposite()) | 115 while (!host->ScheduleComposite()) |
| 116 GiveItSomeTime(); | 116 GiveItSomeTime(); |
| 117 } | 117 } |
| 118 | 118 |
| 119 void SetUpCommandLine(base::CommandLine* cmd) override { | |
| 120 cmd->AppendSwitchASCII(switches::kTouchEvents, | |
| 121 switches::kTouchEventsEnabled); | |
| 122 } | |
| 123 }; | 119 }; |
| 124 | 120 |
| 125 #if defined(OS_MACOSX) | 121 #if defined(OS_MACOSX) |
| 126 // TODO(ccameron): Failing on mac: crbug.com/346363 | 122 // TODO(ccameron): Failing on mac: crbug.com/346363 |
| 127 #define MAYBE_TouchNoHandler DISABLED_TouchNoHandler | 123 #define MAYBE_TouchNoHandler DISABLED_TouchNoHandler |
| 128 #else | 124 #else |
| 129 #define MAYBE_TouchNoHandler TouchNoHandler | 125 #define MAYBE_TouchNoHandler TouchNoHandler |
| 130 #endif | 126 #endif |
| 131 IN_PROC_BROWSER_TEST_F(TouchInputBrowserTest, MAYBE_TouchNoHandler) { | 127 IN_PROC_BROWSER_TEST_F(TouchInputBrowserTest, MAYBE_TouchNoHandler) { |
| 132 LoadURL(); | 128 LoadURL(); |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 GetWidgetHost()->ForwardTouchEventWithLatencyInfo(touch, ui::LatencyInfo()); | 210 GetWidgetHost()->ForwardTouchEventWithLatencyInfo(touch, ui::LatencyInfo()); |
| 215 EXPECT_EQ(INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS, filter->WaitForAck()); | 211 EXPECT_EQ(INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS, filter->WaitForAck()); |
| 216 | 212 |
| 217 touch.PressPoint(25, 125); | 213 touch.PressPoint(25, 125); |
| 218 filter = AddFilter(WebInputEvent::TouchStart); | 214 filter = AddFilter(WebInputEvent::TouchStart); |
| 219 GetWidgetHost()->ForwardTouchEventWithLatencyInfo(touch, ui::LatencyInfo()); | 215 GetWidgetHost()->ForwardTouchEventWithLatencyInfo(touch, ui::LatencyInfo()); |
| 220 EXPECT_EQ(INPUT_EVENT_ACK_STATE_CONSUMED, filter->WaitForAck()); | 216 EXPECT_EQ(INPUT_EVENT_ACK_STATE_CONSUMED, filter->WaitForAck()); |
| 221 } | 217 } |
| 222 | 218 |
| 223 } // namespace content | 219 } // namespace content |
| OLD | NEW |