diff options
author | mohsen@chromium.org <mohsen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-11 01:05:29 +0000 |
---|---|---|
committer | mohsen@chromium.org <mohsen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-11 01:05:29 +0000 |
commit | a45de6cef2423ba700fda4c5207d9f392ef2a851 (patch) | |
tree | be728402d5a1d885e88752ba6866864142d478be /content | |
parent | 4f3dc3140ef052a45d6212c1ce507d4726cb7bc4 (diff) | |
download | chromium_src-a45de6cef2423ba700fda4c5207d9f392ef2a851.zip chromium_src-a45de6cef2423ba700fda4c5207d9f392ef2a851.tar.gz chromium_src-a45de6cef2423ba700fda4c5207d9f392ef2a851.tar.bz2 |
CHECK to only receive touch/gesture events in touch selection tests
Added a CHECK in touch selection tests to make sure that we only receive
touch or gesture events. Currently, some touch selection tests are flaky
because sometimes they receive unexpected mouse events that end touch
selection in the middle of the test. This CHECK will give us stack trace
to investigate the situation.
BUG=235991,276870
Review URL: https://codereview.chromium.org/26275005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228072 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/browser/web_contents/touch_editable_impl_aura_browsertest.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/content/browser/web_contents/touch_editable_impl_aura_browsertest.cc b/content/browser/web_contents/touch_editable_impl_aura_browsertest.cc index 2cc1e99..59e4ddb 100644 --- a/content/browser/web_contents/touch_editable_impl_aura_browsertest.cc +++ b/content/browser/web_contents/touch_editable_impl_aura_browsertest.cc @@ -74,6 +74,12 @@ class TestTouchEditableImplAura : public TouchEditableImplAura { virtual bool HandleInputEvent(const ui::Event* event) OVERRIDE { LOG(INFO) << "TestTouchEditableImplAura::HandleInputEvent(" << event->type() << ")"; + // In tests we should only receive touch or gesture events. In rare cases + // we receive events that are not touch or gesture that make tests flaky. + // The following CHECK will generate the stack trace which might be helpful + // in identifying source of those unexpected events. + // TODO(mohsen): Remove CHECK after resolving the flakiness. + CHECK(event->IsTouchEvent() || event->IsGestureEvent()); return TouchEditableImplAura::HandleInputEvent(event); } |