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

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

Issue 444493005: MacViews: Remove aura dependency from omnibox_view_views_browsertest (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 46e29bd257eb2bb0ae66673085793af080cad93d..6e6d7abdb32867a6d1be8b531c94c6cfe631cff7 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc
@@ -18,8 +18,6 @@
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/interactive_test_utils.h"
#include "grit/generated_resources.h"
-#include "ui/aura/window.h"
-#include "ui/aura/window_tree_host.h"
#include "ui/base/clipboard/clipboard.h"
#include "ui/base/clipboard/scoped_clipboard_writer.h"
#include "ui/base/ime/text_input_focus_manager.h"
@@ -73,35 +71,22 @@ class OmniboxViewViewsTest : public InProcessBrowserTest {
void TapBrowserWindowCenter() {
gfx::Point center = BrowserView::GetBrowserViewForBrowser(
browser())->GetBoundsInScreen().CenterPoint();
- ui::test::EventGenerator generator(
- browser()->window()->GetNativeWindow()->GetRootWindow());
tapted 2014/08/05 13:52:13 note that events are always sent via the window ho
+ ui::test::EventGenerator generator(browser()->window()->GetNativeWindow());
generator.GestureTapAt(center);
}
// Touch down and release at the specified locations.
void Tap(const gfx::Point& press_location,
const gfx::Point& release_location) {
- ui::EventProcessor* dispatcher =
- browser()->window()->GetNativeWindow()->GetHost()->event_processor();
-
- base::TimeDelta timestamp = ui::EventTimeForNow();
- ui::TouchEvent press(
- ui::ET_TOUCH_PRESSED, press_location, 5, timestamp);
- ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&press);
- ASSERT_FALSE(details.dispatcher_destroyed);
tapted 2014/08/05 13:52:13 note there is a CHECK at EventGenerator::DoDispatc
-
- if (press_location != release_location) {
- timestamp += base::TimeDelta::FromMilliseconds(10);
- ui::TouchEvent move(
- ui::ET_TOUCH_MOVED, release_location, 5, timestamp);
- details = dispatcher->OnEventFromSource(&move);
+ ui::test::EventGenerator generator(browser()->window()->GetNativeWindow());
+ if (press_location == release_location) {
+ generator.GestureTapAt(press_location);
+ } else {
+ generator.GestureScrollSequence(press_location,
+ release_location,
+ base::TimeDelta::FromMilliseconds(10),
+ 1);
}
-
- timestamp += base::TimeDelta::FromMilliseconds(50);
- ui::TouchEvent release(
- ui::ET_TOUCH_RELEASED, release_location, 5, timestamp);
- details = dispatcher->OnEventFromSource(&release);
- ASSERT_FALSE(details.dispatcher_destroyed);
}
private:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698