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

Unified Diff: chrome/browser/extensions/api/omnibox/omnibox_unittest.cc

Issue 14592004: Merge 199135 "Fix mismatched parameter expectations between chro..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1500/src/
Patch Set: Created 7 years, 7 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/extensions/api/omnibox/omnibox_api.cc ('k') | chrome/common/extensions/api/omnibox.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/omnibox/omnibox_unittest.cc
===================================================================
--- chrome/browser/extensions/api/omnibox/omnibox_unittest.cc (revision 199613)
+++ chrome/browser/extensions/api/omnibox/omnibox_unittest.cc (working copy)
@@ -13,6 +13,7 @@
namespace omnibox = api::omnibox;
namespace SendSuggestions = omnibox::SendSuggestions;
+namespace SetDefaultSuggestion = omnibox::SetDefaultSuggestion;
namespace {
@@ -232,4 +233,43 @@
*params->suggest_results[0]));
}
+// 0123456789
+// uuuuu
+// + mmmmm
+// + mmm
+// + ddd
+// + ddd
+// = 77777nnnnn
+TEST(ExtensionOmniboxTest, DefaultSuggestResult) {
+ // Default suggestions should not have a content parameter.
+ scoped_ptr<ListValue> list = ListBuilder()
+ .Append(DictionaryBuilder()
+ .Set("description", "description")
+ .Set("descriptionStyles", ListBuilder()
+ .Append(DictionaryBuilder()
+ .Set("type", "url")
+ .Set("offset", 0)
+ .Set("length", 5))
+ .Append(DictionaryBuilder()
+ .Set("type", "match")
+ .Set("offset", 0)
+ .Set("length", 5))
+ .Append(DictionaryBuilder()
+ .Set("type", "match")
+ .Set("offset", 0)
+ .Set("length", 3))
+ .Append(DictionaryBuilder()
+ .Set("type", "dim")
+ .Set("offset", 2)
+ .Set("length", 3))
+ .Append(DictionaryBuilder()
+ .Set("type", "dim")
+ .Set("offset", 0)
+ .Set("length", 3)))).Build();
+
+ scoped_ptr<SetDefaultSuggestion::Params> params(
+ SetDefaultSuggestion::Params::Create(*list));
+ EXPECT_TRUE(params);
+}
+
} // namespace extensions
« no previous file with comments | « chrome/browser/extensions/api/omnibox/omnibox_api.cc ('k') | chrome/common/extensions/api/omnibox.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698