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

Side by Side Diff: chrome/browser/ui/omnibox/omnibox_view_browsertest.cc

Issue 10084020: Removing defunct code around PureViews. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge tests. Created 8 years, 8 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 | « no previous file | chrome/browser/ui/views/location_bar/location_bar_view.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) 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 <stdio.h> 5 #include <stdio.h>
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/string16.h" 8 #include "base/string16.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/time.h" 10 #include "base/time.h"
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 OmniboxViewTest() 153 OmniboxViewTest()
154 : location_bar_focus_view_id_(VIEW_ID_LOCATION_BAR) { 154 : location_bar_focus_view_id_(VIEW_ID_LOCATION_BAR) {
155 set_show_window(true); 155 set_show_window(true);
156 } 156 }
157 157
158 virtual void SetUpOnMainThread() { 158 virtual void SetUpOnMainThread() {
159 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); 159 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser()));
160 ASSERT_NO_FATAL_FAILURE(SetupComponents()); 160 ASSERT_NO_FATAL_FAILURE(SetupComponents());
161 browser()->FocusLocationBar(); 161 browser()->FocusLocationBar();
162 // Use Textfield's view id on pure views. See crbug.com/71144. 162 // Use Textfield's view id on pure views. See crbug.com/71144.
163 #if defined(TOOLKIT_VIEWS) 163 #if defined(USE_AURA)
164 if (views::Widget::IsPureViews()) 164 location_bar_focus_view_id_ = VIEW_ID_OMNIBOX;
165 location_bar_focus_view_id_ = VIEW_ID_OMNIBOX;
166 #endif 165 #endif
167 ASSERT_TRUE(ui_test_utils::IsViewFocused(browser(), 166 ASSERT_TRUE(ui_test_utils::IsViewFocused(browser(),
168 location_bar_focus_view_id_)); 167 location_bar_focus_view_id_));
169 } 168 }
170 169
171 static void GetOmniboxViewForBrowser( 170 static void GetOmniboxViewForBrowser(
172 const Browser* browser, 171 const Browser* browser,
173 OmniboxView** omnibox_view) { 172 OmniboxView** omnibox_view) {
174 BrowserWindow* window = browser->window(); 173 BrowserWindow* window = browser->window();
175 ASSERT_TRUE(window); 174 ASSERT_TRUE(window);
(...skipping 1298 matching lines...) Expand 10 before | Expand all | Expand 10 after
1474 1473
1475 // Paste text. 1474 // Paste text.
1476 ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_V, ui::EF_CONTROL_DOWN)); 1475 ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_V, ui::EF_CONTROL_DOWN));
1477 ASSERT_NO_FATAL_FAILURE(WaitForAutocompleteControllerDone()); 1476 ASSERT_NO_FATAL_FAILURE(WaitForAutocompleteControllerDone());
1478 ASSERT_TRUE(popup_model->IsOpen()); 1477 ASSERT_TRUE(popup_model->IsOpen());
1479 1478
1480 // Inline autocomplete shouldn't be triggered. 1479 // Inline autocomplete shouldn't be triggered.
1481 ASSERT_EQ(ASCIIToUTF16("abc"), omnibox_view->GetText()); 1480 ASSERT_EQ(ASCIIToUTF16("abc"), omnibox_view->GetText());
1482 } 1481 }
1483 #endif 1482 #endif
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/location_bar/location_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698