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

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

Issue 1155673002: Omnibox - Add About Flag to Reverse Title and URLs in the Dropdown (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix mac and add command line flag to histograms.xml Created 5 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 unified diff | Download patch
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 "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/search_engines/template_url_service_factory.h" 8 #include "chrome/browser/search_engines/template_url_service_factory.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/browser_commands.h" 10 #include "chrome/browser/ui/browser_commands.h"
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 AutocompleteResult& results = autocomplete_controller->result_; 304 AutocompleteResult& results = autocomplete_controller->result_;
305 ACMatches matches; 305 ACMatches matches;
306 AutocompleteMatch match; 306 AutocompleteMatch match;
307 match.destination_url = GURL("http://autocomplete-result/"); 307 match.destination_url = GURL("http://autocomplete-result/");
308 match.allowed_to_be_default_match = true; 308 match.allowed_to_be_default_match = true;
309 match.type = AutocompleteMatchType::HISTORY_TITLE; 309 match.type = AutocompleteMatchType::HISTORY_TITLE;
310 match.relevance = 500; 310 match.relevance = 500;
311 matches.push_back(match); 311 matches.push_back(match);
312 match.destination_url = GURL("http://autocomplete-result2/"); 312 match.destination_url = GURL("http://autocomplete-result2/");
313 matches.push_back(match); 313 matches.push_back(match);
314 results.AppendMatches(matches); 314 results.AppendMatches(AutocompleteInput(), matches);
315 results.SortAndCull( 315 results.SortAndCull(
316 AutocompleteInput(), 316 AutocompleteInput(),
317 TemplateURLServiceFactory::GetForProfile(browser()->profile())); 317 TemplateURLServiceFactory::GetForProfile(browser()->profile()));
318 318
319 // The omnibox popup should open with suggestions displayed. 319 // The omnibox popup should open with suggestions displayed.
320 omnibox_view->model()->popup_model()->OnResultChanged(); 320 omnibox_view->model()->popup_model()->OnResultChanged();
321 EXPECT_TRUE(omnibox_view->model()->popup_model()->IsOpen()); 321 EXPECT_TRUE(omnibox_view->model()->popup_model()->IsOpen());
322 322
323 // The omnibox text should be selected. 323 // The omnibox text should be selected.
324 EXPECT_TRUE(omnibox_view->IsSelectAll()); 324 EXPECT_TRUE(omnibox_view->IsSelectAll());
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 // TextInputFocusManager completes. 384 // TextInputFocusManager completes.
385 chrome::FocusLocationBar(browser()); 385 chrome::FocusLocationBar(browser());
386 OmniboxView* view = NULL; 386 OmniboxView* view = NULL;
387 ASSERT_NO_FATAL_FAILURE(GetOmniboxViewForBrowser(browser(), &view)); 387 ASSERT_NO_FATAL_FAILURE(GetOmniboxViewForBrowser(browser(), &view));
388 OmniboxViewViews* omnibox_view_views = static_cast<OmniboxViewViews*>(view); 388 OmniboxViewViews* omnibox_view_views = static_cast<OmniboxViewViews*>(view);
389 ui::TextInputFocusManager* text_input_focus_manager = 389 ui::TextInputFocusManager* text_input_focus_manager =
390 ui::TextInputFocusManager::GetInstance(); 390 ui::TextInputFocusManager::GetInstance();
391 EXPECT_EQ(omnibox_view_views->GetTextInputClient(), 391 EXPECT_EQ(omnibox_view_views->GetTextInputClient(),
392 text_input_focus_manager->GetFocusedTextInputClient()); 392 text_input_focus_manager->GetFocusedTextInputClient());
393 } 393 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/omnibox/omnibox_edit_model.cc ('k') | components/omnibox/autocomplete_match.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698