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

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

Issue 1098843004: Omnibox - Do Not Allow HTTP/HTTPS Equivalence if User Explicitly Entered A Scheme (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix browsertests compile error (sigh) Created 5 years, 5 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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(AutocompleteInput(), matches); 314 results.AppendMatches(AutocompleteInput(), matches);
315 results.SortAndCull( 315 results.SortAndCull(
316 AutocompleteInput(), 316 AutocompleteInput(),
317 std::string(),
317 TemplateURLServiceFactory::GetForProfile(browser()->profile())); 318 TemplateURLServiceFactory::GetForProfile(browser()->profile()));
318 319
319 // The omnibox popup should open with suggestions displayed. 320 // The omnibox popup should open with suggestions displayed.
320 omnibox_view->model()->popup_model()->OnResultChanged(); 321 omnibox_view->model()->popup_model()->OnResultChanged();
321 EXPECT_TRUE(omnibox_view->model()->popup_model()->IsOpen()); 322 EXPECT_TRUE(omnibox_view->model()->popup_model()->IsOpen());
322 323
323 // The omnibox text should be selected. 324 // The omnibox text should be selected.
324 EXPECT_TRUE(omnibox_view->IsSelectAll()); 325 EXPECT_TRUE(omnibox_view->IsSelectAll());
325 326
326 // Simulate a mouse click before dragging the mouse. 327 // Simulate a mouse click before dragging the mouse.
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 IN_PROC_BROWSER_TEST_F(OmniboxViewViewsTest, FocusedTextInputClient) { 379 IN_PROC_BROWSER_TEST_F(OmniboxViewViewsTest, FocusedTextInputClient) {
379 chrome::FocusLocationBar(browser()); 380 chrome::FocusLocationBar(browser());
380 OmniboxView* view = NULL; 381 OmniboxView* view = NULL;
381 ASSERT_NO_FATAL_FAILURE(GetOmniboxViewForBrowser(browser(), &view)); 382 ASSERT_NO_FATAL_FAILURE(GetOmniboxViewForBrowser(browser(), &view));
382 OmniboxViewViews* omnibox_view_views = static_cast<OmniboxViewViews*>(view); 383 OmniboxViewViews* omnibox_view_views = static_cast<OmniboxViewViews*>(view);
383 views::InputMethod* input_method = 384 views::InputMethod* input_method =
384 omnibox_view_views->GetWidget()->GetInputMethod(); 385 omnibox_view_views->GetWidget()->GetInputMethod();
385 EXPECT_EQ(omnibox_view_views->GetTextInputClient(), 386 EXPECT_EQ(omnibox_view_views->GetTextInputClient(),
386 input_method->GetTextInputClient()); 387 input_method->GetTextInputClient());
387 } 388 }
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/search_provider_unittest.cc ('k') | components/omnibox/autocomplete_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698