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

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

Issue 2266083002: Avoid DCHECK failure for chrome:// URLs in autocomplete suggestions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: changes for pkasting@ Created 4 years, 3 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 | components/omnibox/browser/autocomplete_controller.cc » ('j') | 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 da82d6d426886fb46d9b068ee05acfc403b94bc3..0104caf7203af25437e4c393ea78661d9537daf8 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc
@@ -22,6 +22,7 @@
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/interactive_test_utils.h"
#include "components/omnibox/browser/omnibox_popup_model.h"
+#include "components/omnibox/browser/test_scheme_classifier.h"
#include "ui/base/clipboard/clipboard.h"
#include "ui/base/clipboard/scoped_clipboard_writer.h"
#include "ui/base/ime/input_method.h"
@@ -317,10 +318,13 @@ IN_PROC_BROWSER_TEST_F(OmniboxViewViewsTest, CloseOmniboxPopupOnTextDrag) {
matches.push_back(match);
match.destination_url = GURL("http://autocomplete-result2/");
matches.push_back(match);
- results.AppendMatches(AutocompleteInput(), matches);
+ const AutocompleteInput input(
+ base::ASCIIToUTF16("a"), base::string16::npos, std::string(), GURL(),
+ metrics::OmniboxEventProto::INVALID_SPEC, false, false, true, true, false,
+ TestSchemeClassifier());
+ results.AppendMatches(input, matches);
results.SortAndCull(
- AutocompleteInput(),
- TemplateURLServiceFactory::GetForProfile(browser()->profile()));
+ input, TemplateURLServiceFactory::GetForProfile(browser()->profile()));
// The omnibox popup should open with suggestions displayed.
omnibox_view->model()->popup_model()->OnResultChanged();
« no previous file with comments | « no previous file | components/omnibox/browser/autocomplete_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698