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

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: const 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 0e8fa33f6cbcb6e7ab0aca93b88ffbd21c9ad68e..7970a82d295ec9e6b8190f0dd43f67d2507bc9ce 100644
--- a/content/browser/web_contents/navigation_entry_impl_unittest.cc
+++ b/content/browser/web_contents/navigation_entry_impl_unittest.cc
@@ -217,4 +217,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);
sreeram 2013/01/30 21:41:39 Swap the EXPECT_EQ arguments (here and on line 227
Mathieu 2013/01/30 21:55:12 Done. Sorry I missed this.
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698