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

Unified Diff: chrome/browser/autocomplete/autocomplete_edit_unittest.cc

Issue 7806001: Makes copying text in the omnibox always use permanent text is the (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add another test Created 9 years, 4 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 | « chrome/browser/autocomplete/autocomplete_edit.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/autocomplete_edit_unittest.cc
diff --git a/chrome/browser/autocomplete/autocomplete_edit_unittest.cc b/chrome/browser/autocomplete/autocomplete_edit_unittest.cc
index 18171a616af7b7613f472717fdbe03b30eac3de0..95f40f38a3b97f762b47c08a66b6f3062192a937 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_unittest.cc
+++ b/chrome/browser/autocomplete/autocomplete_edit_unittest.cc
@@ -134,11 +134,19 @@ TEST(AutocompleteEditTest, AdjustTextForCopy) {
// Tests that we don't get double http if the user manually inserts http.
{ "a.de/", 0, false, "http://a.de/", "http://a.de/", true, "http://a.de/" },
+
+ // Makes sure intranet urls get 'http://' prefixed to them.
+ { "b/foo", 0, true, "b/foo", "http://b/foo", true, "http://b/foo" },
+
+ // Verifies a search term 'foo' doesn't end up with http.
+ { "www.google.com/search?", 0, false, "foo", "foo", false, "" },
};
TestingOmniboxView view;
TestingAutocompleteEditController controller;
TestingProfile profile;
AutocompleteEditModel model(&view, &controller, &profile);
+ profile.CreateAutocompleteClassifier();
+ profile.CreateTemplateURLService();
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(input); ++i) {
model.UpdatePermanentText(ASCIIToUTF16(input[i].perm_text));
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_edit.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698