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

Side by Side Diff: content/browser/web_contents/touch_editable_impl_aura_browsertest.cc

Issue 84653006: Make tap gesture ignore its ack disposition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused method. Created 6 years, 11 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 (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 "content/browser/web_contents/touch_editable_impl_aura.h" 5 #include "content/browser/web_contents/touch_editable_impl_aura.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/test/test_timeouts.h" 10 #include "base/test/test_timeouts.h"
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 aura::test::EventGenerator generator(content->GetRootWindow(), content); 321 aura::test::EventGenerator generator(content->GetRootWindow(), content);
322 gfx::Rect bounds = content->GetBoundsInRootWindow(); 322 gfx::Rect bounds = content->GetBoundsInRootWindow();
323 EXPECT_EQ(touch_editable->rwhva_, rwhva); 323 EXPECT_EQ(touch_editable->rwhva_, rwhva);
324 324
325 ExecuteSyncJSFunction(view_host, "focus_textfield()"); 325 ExecuteSyncJSFunction(view_host, "focus_textfield()");
326 touch_editable->WaitForSelectionChangeCallback(); 326 touch_editable->WaitForSelectionChangeCallback();
327 327
328 // Tap textfield 328 // Tap textfield
329 touch_editable->Reset(); 329 touch_editable->Reset();
330 generator.GestureTapAt(gfx::Point(bounds.x() + 50, bounds.y() + 40)); 330 generator.GestureTapAt(gfx::Point(bounds.x() + 50, bounds.y() + 40));
331 // Tap Down and Tap acks are sent synchronously.
331 touch_editable->WaitForSelectionChangeCallback(); 332 touch_editable->WaitForSelectionChangeCallback();
332 // No Tap Down Ack is coming, it's async.
333 touch_editable->Reset(); 333 touch_editable->Reset();
334 touch_editable->WaitForGestureAck(); // Wait for Tap Ack.
335 334
336 // Check if cursor handle is showing. 335 // Check if cursor handle is showing.
337 ui::TouchSelectionController* controller = 336 ui::TouchSelectionController* controller =
338 touch_editable->touch_selection_controller_.get(); 337 touch_editable->touch_selection_controller_.get();
339 EXPECT_NE(ui::TEXT_INPUT_TYPE_NONE, touch_editable->text_input_type_); 338 EXPECT_NE(ui::TEXT_INPUT_TYPE_NONE, touch_editable->text_input_type_);
340 EXPECT_TRUE(controller); 339 EXPECT_TRUE(controller);
341 340
342 scoped_ptr<base::Value> value = 341 scoped_ptr<base::Value> value =
343 content::ExecuteScriptAndGetValue(view_host, "get_cursor_position()"); 342 content::ExecuteScriptAndGetValue(view_host, "get_cursor_position()");
344 int cursor_pos = -1; 343 int cursor_pos = -1;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 TouchSelectionOnLongPressTest) { 379 TouchSelectionOnLongPressTest) {
381 TestTouchSelectionOnLongPress(); 380 TestTouchSelectionOnLongPress();
382 } 381 }
383 382
384 IN_PROC_BROWSER_TEST_F(TouchEditableImplAuraTest, 383 IN_PROC_BROWSER_TEST_F(TouchEditableImplAuraTest,
385 TouchCursorInTextfieldTest) { 384 TouchCursorInTextfieldTest) {
386 TestTouchCursorInTextfield(); 385 TestTouchCursorInTextfield();
387 } 386 }
388 387
389 } // namespace content 388 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/input/input_router_impl_unittest.cc ('k') | content/common/input/web_input_event_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698