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

Side by Side Diff: content/browser/renderer_host/input/touch_input_browsertest.cc

Issue 888793002: Make content_browsertests for Chrome on Android running with valid Views (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comments Created 5 years, 10 months 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
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 "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/run_loop.h" 7 #include "base/run_loop.h"
8 #include "content/browser/gpu/compositor_util.h" 8 #include "content/browser/gpu/compositor_util.h"
9 #include "content/browser/renderer_host/render_widget_host_impl.h" 9 #include "content/browser/renderer_host/render_widget_host_impl.h"
10 #include "content/browser/web_contents/web_contents_impl.h" 10 #include "content/browser/web_contents/web_contents_impl.h"
(...skipping 18 matching lines...) Expand all
29 base::RunLoop run_loop; 29 base::RunLoop run_loop;
30 base::MessageLoop::current()->PostDelayedTask( 30 base::MessageLoop::current()->PostDelayedTask(
31 FROM_HERE, 31 FROM_HERE,
32 run_loop.QuitClosure(), 32 run_loop.QuitClosure(),
33 base::TimeDelta::FromMilliseconds(10)); 33 base::TimeDelta::FromMilliseconds(10));
34 run_loop.Run(); 34 run_loop.Run();
35 } 35 }
36 36
37 const char kTouchEventDataURL[] = 37 const char kTouchEventDataURL[] =
38 "data:text/html;charset=utf-8," 38 "data:text/html;charset=utf-8,"
39 #if defined(OS_ANDROID)
40 "<head>"
41 "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">"
42 "</head>"
43 #endif
39 "<body onload='setup();'>" 44 "<body onload='setup();'>"
40 "<div id='first'></div><div id='second'></div><div id='third'></div>" 45 "<div id='first'></div><div id='second'></div><div id='third'></div>"
41 "<style>" 46 "<style>"
42 " #first {" 47 " #first {"
43 " position: absolute;" 48 " position: absolute;"
44 " width: 100px;" 49 " width: 100px;"
45 " height: 100px;" 50 " height: 100px;"
46 " top: 0px;" 51 " top: 0px;"
47 " left: 0px;" 52 " left: 0px;"
48 " background-color: green;" 53 " background-color: green;"
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 EXPECT_EQ(INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS, 249 EXPECT_EQ(INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS,
245 filter()->last_ack_state()); 250 filter()->last_ack_state());
246 251
247 touch.PressPoint(25, 125); 252 touch.PressPoint(25, 125);
248 GetWidgetHost()->ForwardTouchEventWithLatencyInfo(touch, ui::LatencyInfo()); 253 GetWidgetHost()->ForwardTouchEventWithLatencyInfo(touch, ui::LatencyInfo());
249 filter()->WaitForAck(WebInputEvent::TouchStart); 254 filter()->WaitForAck(WebInputEvent::TouchStart);
250 EXPECT_EQ(INPUT_EVENT_ACK_STATE_CONSUMED, filter()->last_ack_state()); 255 EXPECT_EQ(INPUT_EVENT_ACK_STATE_CONSUMED, filter()->last_ack_state());
251 } 256 }
252 257
253 } // namespace content 258 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698