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

Side by Side Diff: chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc

Issue 188223002: Clean up WindowEventDispatcher some more. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « ash/wm/overview/window_overview.cc ('k') | mojo/examples/aura_demo/window_tree_host_mojo.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "chrome/browser/ui/views/omnibox/omnibox_view_views.h" 5 #include "chrome/browser/ui/views/omnibox/omnibox_view_views.h"
6 6
7 #include "chrome/browser/ui/browser.h" 7 #include "chrome/browser/ui/browser.h"
8 #include "chrome/browser/ui/browser_commands.h" 8 #include "chrome/browser/ui/browser_commands.h"
9 #include "chrome/browser/ui/browser_window.h" 9 #include "chrome/browser/ui/browser_window.h"
10 #include "chrome/browser/ui/omnibox/location_bar.h" 10 #include "chrome/browser/ui/omnibox/location_bar.h"
11 #include "chrome/browser/ui/omnibox/omnibox_popup_model.h" 11 #include "chrome/browser/ui/omnibox/omnibox_popup_model.h"
12 #include "chrome/browser/ui/view_ids.h" 12 #include "chrome/browser/ui/view_ids.h"
13 #include "chrome/browser/ui/views/frame/browser_view.h" 13 #include "chrome/browser/ui/views/frame/browser_view.h"
14 #include "chrome/test/base/in_process_browser_test.h" 14 #include "chrome/test/base/in_process_browser_test.h"
15 #include "chrome/test/base/interactive_test_utils.h" 15 #include "chrome/test/base/interactive_test_utils.h"
16 #include "grit/generated_resources.h" 16 #include "grit/generated_resources.h"
17 #include "ui/base/clipboard/clipboard.h" 17 #include "ui/base/clipboard/clipboard.h"
18 #include "ui/base/clipboard/scoped_clipboard_writer.h" 18 #include "ui/base/clipboard/scoped_clipboard_writer.h"
19 #include "ui/base/test/ui_controls.h" 19 #include "ui/base/test/ui_controls.h"
20 20
21 #if defined(USE_AURA) 21 #if defined(USE_AURA)
22 #include "ui/aura/test/event_generator.h" 22 #include "ui/aura/test/event_generator.h"
23 #include "ui/aura/window.h" 23 #include "ui/aura/window.h"
24 #include "ui/aura/window_event_dispatcher.h" 24 #include "ui/aura/window_event_dispatcher.h"
25 #include "ui/aura/window_tree_host_delegate.h"
26 #endif // defined(USE_AURA) 25 #endif // defined(USE_AURA)
27 26
28 class OmniboxViewViewsTest : public InProcessBrowserTest { 27 class OmniboxViewViewsTest : public InProcessBrowserTest {
29 protected: 28 protected:
30 OmniboxViewViewsTest() {} 29 OmniboxViewViewsTest() {}
31 30
32 static void GetOmniboxViewForBrowser(const Browser* browser, 31 static void GetOmniboxViewForBrowser(const Browser* browser,
33 OmniboxView** omnibox_view) { 32 OmniboxView** omnibox_view) {
34 BrowserWindow* window = browser->window(); 33 BrowserWindow* window = browser->window();
35 ASSERT_TRUE(window); 34 ASSERT_TRUE(window);
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 // not there was text under the tap, which appears to be flaky. 214 // not there was text under the tap, which appears to be flaky.
216 215
217 // Take the focus away and tap in the omnibox again, but drag a bit before 216 // Take the focus away and tap in the omnibox again, but drag a bit before
218 // releasing. We should focus the omnibox but not select all of its text. 217 // releasing. We should focus the omnibox but not select all of its text.
219 ASSERT_NO_FATAL_FAILURE(TapBrowserWindowCenter()); 218 ASSERT_NO_FATAL_FAILURE(TapBrowserWindowCenter());
220 ASSERT_NO_FATAL_FAILURE(Tap(tap_location, tap2_location)); 219 ASSERT_NO_FATAL_FAILURE(Tap(tap_location, tap2_location));
221 EXPECT_TRUE(ui_test_utils::IsViewFocused(browser(), VIEW_ID_OMNIBOX)); 220 EXPECT_TRUE(ui_test_utils::IsViewFocused(browser(), VIEW_ID_OMNIBOX));
222 EXPECT_FALSE(omnibox_view->IsSelectAll()); 221 EXPECT_FALSE(omnibox_view->IsSelectAll());
223 } 222 }
224 #endif // defined(USE_AURA) 223 #endif // defined(USE_AURA)
OLDNEW
« no previous file with comments | « ash/wm/overview/window_overview.cc ('k') | mojo/examples/aura_demo/window_tree_host_mojo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698