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

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

Issue 8497050: Correctly score intranet URLs with typed_counts of 0 as UNVISITED_INTRANET if they are on known h... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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 108344)
+++ chrome/browser/autocomplete/history_url_provider_unittest.cc (working copy)
@@ -108,10 +108,12 @@
{"http://intra/two", "Intranet two", 1, 1},
{"http://intra/three", "Intranet three", 2, 2},
{"http://moo/bar", "Intranet moo", 1, 1},
+ {"http://typedhost/typedpath", "Intranet typed", 1, 1},
+ {"http://typedhost/untypedpath", "Intranet untyped", 1, 0},
- {"http://x.com/one", "Intranet", 2, 2},
- {"http://x.com/two", "Intranet two", 1, 1},
- {"http://x.com/three", "Intranet three", 2, 2},
+ {"http://x.com/one", "Internet", 2, 2},
+ {"http://x.com/two", "Internet two", 1, 1},
+ {"http://x.com/three", "Internet three", 2, 2},
};
class HistoryURLProviderTest : public testing::Test,
@@ -642,6 +644,13 @@
ASSERT_NO_FATAL_FAILURE(RunTest(ASCIIToUTF16("intra/x"), string16(), false,
expected6, arraysize(expected6)));
EXPECT_EQ(1400, matches_[0].relevance);
+
+ const std::string expected7[] = {
+ "http://typedhost/untypedpath",
+ };
+ ASSERT_NO_FATAL_FAILURE(RunTest(ASCIIToUTF16("typedhost/untypedpath"),
+ string16(), false, expected7, arraysize(expected7)));
+ EXPECT_EQ(1400, matches_[0].relevance);
}
TEST_F(HistoryURLProviderTest, CrashDueToFixup) {
« 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