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

Unified Diff: chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc

Issue 306483003: Prepare for Unified Gesture Recognizer landing in Aura (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: All Gesture events should have timestamps. (UGR on) Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc b/chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc
index dd46f88f8f943c36b4875b672f52e223d20c04cf..9ab2ad83b472bdc6dde3e57c8a8437e6d5568a3a 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc
@@ -24,6 +24,7 @@
#include "ui/base/test/ui_controls.h"
#include "ui/base/ui_base_switches.h"
#include "ui/events/event_processor.h"
+#include "ui/events/event_utils.h"
#include "ui/views/controls/textfield/textfield_test_api.h"
class OmniboxViewViewsTest : public InProcessBrowserTest {
@@ -80,11 +81,17 @@ class OmniboxViewViewsTest : public InProcessBrowserTest {
ui::EventProcessor* dispatcher =
browser()->window()->GetNativeWindow()->GetHost()->event_processor();
- ui::TouchEvent press(ui::ET_TOUCH_PRESSED, press_location,
- 5, base::TimeDelta::FromMilliseconds(0));
+ ui::TouchEvent press(
+ ui::ET_TOUCH_PRESSED, press_location, 5, ui::EventTimeForNow());
jdduke (slow) 2014/05/30 14:56:27 Hmm, it's a bit odd using ui::EventTimeForNow() he
tdresser 2014/05/30 16:04:06 Definitely a mistake, thanks for catching it.
ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&press);
ASSERT_FALSE(details.dispatcher_destroyed);
+ if (press_location != release_location) {
+ ui::TouchEvent move(ui::ET_TOUCH_MOVED, release_location,
+ 5, base::TimeDelta::FromMilliseconds(10));
+ details = dispatcher->OnEventFromSource(&move);
+ }
+
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, release_location,
5, base::TimeDelta::FromMilliseconds(50));
details = dispatcher->OnEventFromSource(&release);
« no previous file with comments | « ash/shelf/shelf_layout_manager_unittest.cc ('k') | content/browser/web_contents/web_contents_view_aura_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698