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

Unified Diff: content/browser/web_contents/navigation_entry_impl_unittest.cc

Issue 11876045: [Search] Store and recall search terms using NavigationEntry to improve search term extraction (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: addressed comments Created 7 years, 11 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
Index: content/browser/web_contents/navigation_entry_impl_unittest.cc
diff --git a/content/browser/web_contents/navigation_entry_impl_unittest.cc b/content/browser/web_contents/navigation_entry_impl_unittest.cc
index 88c8e93ae20f2ec57890552689ee5b4cb64a382a..6adaf9a61debc2c320131464440e6b5055e1038a 100644
--- a/content/browser/web_contents/navigation_entry_impl_unittest.cc
+++ b/content/browser/web_contents/navigation_entry_impl_unittest.cc
@@ -213,4 +213,16 @@ TEST_F(NavigationEntryTest, NavigationEntryTimestamps) {
EXPECT_EQ(now, entry1_->GetTimestamp());
}
+// Test extra data stored in the navigation entry.
+TEST_F(NavigationEntryTest, NavigationEntryExtraData) {
+ string16 test_data = ASCIIToUTF16("my search terms");
+ string16 output;
+ entry1_->SetExtraData("search_terms", test_data);
+
+ EXPECT_FALSE(entry1_->GetExtraData("non_existent_key", &output));
+ EXPECT_EQ(output, ASCIIToUTF16(""));
+ EXPECT_TRUE(entry1_->GetExtraData("search_terms", &output));
+ EXPECT_EQ(output, test_data);
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698