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

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

Issue 7822009: Fix crash in CanFindIntranetURL() due to FixupUserInput() changing the AutocompleteInput's text_ ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' 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/history_url_provider.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/history_url_provider_unittest.cc
===================================================================
--- chrome/browser/autocomplete/history_url_provider_unittest.cc (revision 98899)
+++ chrome/browser/autocomplete/history_url_provider_unittest.cc (working copy)
@@ -540,3 +540,18 @@
test_cases[i].has_output ? 1 : 0);
}
}
+
+TEST_F(HistoryURLProviderTest, CrashDueToFixup) {
+ // This test passes if we don't crash. The results don't matter.
+ const char* const test_cases[] = {
+ "//c",
+ "\\@st"
+ };
+ for (size_t i = 0; i < arraysize(test_cases); ++i) {
+ AutocompleteInput input(ASCIIToUTF16(test_cases[i]), string16(), false,
+ false, true, AutocompleteInput::ALL_MATCHES);
+ autocomplete_->Start(input, false);
+ if (!autocomplete_->done())
+ MessageLoop::current()->Run();
+ }
+}
« no previous file with comments | « chrome/browser/autocomplete/history_url_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698