| Index: chrome/browser/extensions/api/omnibox/omnibox_unittest.cc
|
| diff --git a/chrome/browser/extensions/api/omnibox/omnibox_unittest.cc b/chrome/browser/extensions/api/omnibox/omnibox_unittest.cc
|
| index c6e9f9a6da6daed87ed60f734ff8ef9ca07f988d..20a05b56d701affad6f56312cf341286d3012532 100644
|
| --- a/chrome/browser/extensions/api/omnibox/omnibox_unittest.cc
|
| +++ b/chrome/browser/extensions/api/omnibox/omnibox_unittest.cc
|
| @@ -48,21 +48,25 @@ TEST(ExtensionOmniboxTest, DescriptionStylesSimple) {
|
| scoped_ptr<base::ListValue> list =
|
| ListBuilder()
|
| .Append(42)
|
| - .Append(std::move(ListBuilder().Append(std::move(
|
| - DictionaryBuilder()
|
| - .Set("content", "content")
|
| - .Set("description", "description")
|
| - .Set("descriptionStyles",
|
| - std::move(
|
| - ListBuilder()
|
| - .Append(std::move(DictionaryBuilder()
|
| - .Set("type", "match")
|
| - .Set("offset", 1)
|
| - .Set("length", 4)))
|
| - .Append(std::move(DictionaryBuilder()
|
| - .Set("type", "dim")
|
| - .Set("offset", 6)
|
| - .Set("length", 3)))))))))
|
| + .Append(ListBuilder()
|
| + .Append(DictionaryBuilder()
|
| + .Set("content", "content")
|
| + .Set("description", "description")
|
| + .Set("descriptionStyles",
|
| + ListBuilder()
|
| + .Append(DictionaryBuilder()
|
| + .Set("type", "match")
|
| + .Set("offset", 1)
|
| + .Set("length", 4)
|
| + .Build())
|
| + .Append(DictionaryBuilder()
|
| + .Set("type", "dim")
|
| + .Set("offset", 6)
|
| + .Set("length", 3)
|
| + .Build())
|
| + .Build())
|
| + .Build())
|
| + .Build())
|
| .Build();
|
|
|
| ACMatchClassifications styles_expected;
|
| @@ -83,21 +87,25 @@ TEST(ExtensionOmniboxTest, DescriptionStylesSimple) {
|
| scoped_ptr<base::ListValue> swap_list =
|
| ListBuilder()
|
| .Append(42)
|
| - .Append(std::move(ListBuilder().Append(std::move(
|
| - DictionaryBuilder()
|
| - .Set("content", "content")
|
| - .Set("description", "description")
|
| - .Set("descriptionStyles",
|
| - std::move(
|
| - ListBuilder()
|
| - .Append(std::move(DictionaryBuilder()
|
| - .Set("type", "dim")
|
| - .Set("offset", 6)
|
| - .Set("length", 3)))
|
| - .Append(std::move(DictionaryBuilder()
|
| - .Set("type", "match")
|
| - .Set("offset", 1)
|
| - .Set("length", 4)))))))))
|
| + .Append(ListBuilder()
|
| + .Append(DictionaryBuilder()
|
| + .Set("content", "content")
|
| + .Set("description", "description")
|
| + .Set("descriptionStyles",
|
| + ListBuilder()
|
| + .Append(DictionaryBuilder()
|
| + .Set("type", "dim")
|
| + .Set("offset", 6)
|
| + .Set("length", 3)
|
| + .Build())
|
| + .Append(DictionaryBuilder()
|
| + .Set("type", "match")
|
| + .Set("offset", 1)
|
| + .Set("length", 4)
|
| + .Build())
|
| + .Build())
|
| + .Build())
|
| + .Build())
|
| .Build();
|
|
|
| scoped_ptr<SendSuggestions::Params> swapped_params(
|
| @@ -119,33 +127,40 @@ TEST(ExtensionOmniboxTest, DescriptionStylesCombine) {
|
| scoped_ptr<base::ListValue> list =
|
| ListBuilder()
|
| .Append(42)
|
| - .Append(std::move(ListBuilder().Append(std::move(
|
| - DictionaryBuilder()
|
| - .Set("content", "content")
|
| - .Set("description", "description")
|
| - .Set("descriptionStyles",
|
| - std::move(
|
| - ListBuilder()
|
| - .Append(std::move(DictionaryBuilder()
|
| - .Set("type", "url")
|
| - .Set("offset", 0)
|
| - .Set("length", 5)))
|
| - .Append(std::move(DictionaryBuilder()
|
| - .Set("type", "dim")
|
| - .Set("offset", 9)
|
| - .Set("length", 2)))
|
| - .Append(std::move(DictionaryBuilder()
|
| - .Set("type", "match")
|
| - .Set("offset", 9)
|
| - .Set("length", 2)))
|
| - .Append(std::move(DictionaryBuilder()
|
| - .Set("type", "match")
|
| - .Set("offset", 0)
|
| - .Set("length", 4)))
|
| - .Append(std::move(DictionaryBuilder()
|
| - .Set("type", "dim")
|
| - .Set("offset", 1)
|
| - .Set("length", 2)))))))))
|
| + .Append(ListBuilder()
|
| + .Append(DictionaryBuilder()
|
| + .Set("content", "content")
|
| + .Set("description", "description")
|
| + .Set("descriptionStyles",
|
| + ListBuilder()
|
| + .Append(DictionaryBuilder()
|
| + .Set("type", "url")
|
| + .Set("offset", 0)
|
| + .Set("length", 5)
|
| + .Build())
|
| + .Append(DictionaryBuilder()
|
| + .Set("type", "dim")
|
| + .Set("offset", 9)
|
| + .Set("length", 2)
|
| + .Build())
|
| + .Append(DictionaryBuilder()
|
| + .Set("type", "match")
|
| + .Set("offset", 9)
|
| + .Set("length", 2)
|
| + .Build())
|
| + .Append(DictionaryBuilder()
|
| + .Set("type", "match")
|
| + .Set("offset", 0)
|
| + .Set("length", 4)
|
| + .Build())
|
| + .Append(DictionaryBuilder()
|
| + .Set("type", "dim")
|
| + .Set("offset", 1)
|
| + .Set("length", 2)
|
| + .Build())
|
| + .Build())
|
| + .Build())
|
| + .Build())
|
| .Build();
|
|
|
| ACMatchClassifications styles_expected;
|
| @@ -168,33 +183,40 @@ TEST(ExtensionOmniboxTest, DescriptionStylesCombine) {
|
| scoped_ptr<base::ListValue> moved_list =
|
| ListBuilder()
|
| .Append(42)
|
| - .Append(std::move(ListBuilder().Append(std::move(
|
| - DictionaryBuilder()
|
| - .Set("content", "content")
|
| - .Set("description", "description")
|
| - .Set("descriptionStyles",
|
| - std::move(
|
| - ListBuilder()
|
| - .Append(std::move(DictionaryBuilder()
|
| - .Set("type", "url")
|
| - .Set("offset", 0)
|
| - .Set("length", 5)))
|
| - .Append(std::move(DictionaryBuilder()
|
| - .Set("type", "match")
|
| - .Set("offset", 0)
|
| - .Set("length", 4)))
|
| - .Append(std::move(DictionaryBuilder()
|
| - .Set("type", "dim")
|
| - .Set("offset", 9)
|
| - .Set("length", 2)))
|
| - .Append(std::move(DictionaryBuilder()
|
| - .Set("type", "match")
|
| - .Set("offset", 9)
|
| - .Set("length", 2)))
|
| - .Append(std::move(DictionaryBuilder()
|
| - .Set("type", "dim")
|
| - .Set("offset", 1)
|
| - .Set("length", 2)))))))))
|
| + .Append(ListBuilder()
|
| + .Append(DictionaryBuilder()
|
| + .Set("content", "content")
|
| + .Set("description", "description")
|
| + .Set("descriptionStyles",
|
| + ListBuilder()
|
| + .Append(DictionaryBuilder()
|
| + .Set("type", "url")
|
| + .Set("offset", 0)
|
| + .Set("length", 5)
|
| + .Build())
|
| + .Append(DictionaryBuilder()
|
| + .Set("type", "match")
|
| + .Set("offset", 0)
|
| + .Set("length", 4)
|
| + .Build())
|
| + .Append(DictionaryBuilder()
|
| + .Set("type", "dim")
|
| + .Set("offset", 9)
|
| + .Set("length", 2)
|
| + .Build())
|
| + .Append(DictionaryBuilder()
|
| + .Set("type", "match")
|
| + .Set("offset", 9)
|
| + .Set("length", 2)
|
| + .Build())
|
| + .Append(DictionaryBuilder()
|
| + .Set("type", "dim")
|
| + .Set("offset", 1)
|
| + .Set("length", 2)
|
| + .Build())
|
| + .Build())
|
| + .Build())
|
| + .Build())
|
| .Build();
|
|
|
| scoped_ptr<SendSuggestions::Params> moved_params(
|
| @@ -216,33 +238,40 @@ TEST(ExtensionOmniboxTest, DescriptionStylesCombine2) {
|
| scoped_ptr<base::ListValue> list =
|
| ListBuilder()
|
| .Append(42)
|
| - .Append(std::move(ListBuilder().Append(std::move(
|
| - DictionaryBuilder()
|
| - .Set("content", "content")
|
| - .Set("description", "description")
|
| - .Set("descriptionStyles",
|
| - std::move(
|
| - ListBuilder()
|
| - .Append(std::move(DictionaryBuilder()
|
| - .Set("type", "url")
|
| - .Set("offset", 0)
|
| - .Set("length", 5)))
|
| - .Append(std::move(DictionaryBuilder()
|
| - .Set("type", "match")
|
| - .Set("offset", 0)
|
| - .Set("length", 5)))
|
| - .Append(std::move(DictionaryBuilder()
|
| - .Set("type", "match")
|
| - .Set("offset", 0)
|
| - .Set("length", 3)))
|
| - .Append(std::move(DictionaryBuilder()
|
| - .Set("type", "dim")
|
| - .Set("offset", 2)
|
| - .Set("length", 3)))
|
| - .Append(std::move(DictionaryBuilder()
|
| - .Set("type", "dim")
|
| - .Set("offset", 0)
|
| - .Set("length", 3)))))))))
|
| + .Append(ListBuilder()
|
| + .Append(DictionaryBuilder()
|
| + .Set("content", "content")
|
| + .Set("description", "description")
|
| + .Set("descriptionStyles",
|
| + ListBuilder()
|
| + .Append(DictionaryBuilder()
|
| + .Set("type", "url")
|
| + .Set("offset", 0)
|
| + .Set("length", 5)
|
| + .Build())
|
| + .Append(DictionaryBuilder()
|
| + .Set("type", "match")
|
| + .Set("offset", 0)
|
| + .Set("length", 5)
|
| + .Build())
|
| + .Append(DictionaryBuilder()
|
| + .Set("type", "match")
|
| + .Set("offset", 0)
|
| + .Set("length", 3)
|
| + .Build())
|
| + .Append(DictionaryBuilder()
|
| + .Set("type", "dim")
|
| + .Set("offset", 2)
|
| + .Set("length", 3)
|
| + .Build())
|
| + .Append(DictionaryBuilder()
|
| + .Set("type", "dim")
|
| + .Set("offset", 0)
|
| + .Set("length", 3)
|
| + .Build())
|
| + .Build())
|
| + .Build())
|
| + .Build())
|
| .Build();
|
|
|
| ACMatchClassifications styles_expected;
|
| @@ -268,34 +297,37 @@ TEST(ExtensionOmniboxTest, DefaultSuggestResult) {
|
| // Default suggestions should not have a content parameter.
|
| scoped_ptr<base::ListValue> list =
|
| ListBuilder()
|
| - .Append(std::move(
|
| - DictionaryBuilder()
|
| - .Set("description", "description")
|
| - .Set(
|
| - "descriptionStyles",
|
| - std::move(
|
| - ListBuilder()
|
| - .Append(std::move(
|
| - DictionaryBuilder()
|
| - .Set("type", "url")
|
| - .Set("offset", 0)
|
| - .Set("length", 5)))
|
| - .Append(std::move(DictionaryBuilder()
|
| - .Set("type", "match")
|
| - .Set("offset", 0)
|
| - .Set("length", 5)))
|
| - .Append(std::move(DictionaryBuilder()
|
| - .Set("type", "match")
|
| - .Set("offset", 0)
|
| - .Set("length", 3)))
|
| - .Append(std::move(DictionaryBuilder()
|
| - .Set("type", "dim")
|
| - .Set("offset", 2)
|
| - .Set("length", 3)))
|
| - .Append(std::move(DictionaryBuilder()
|
| - .Set("type", "dim")
|
| - .Set("offset", 0)
|
| - .Set("length", 3)))))))
|
| + .Append(DictionaryBuilder()
|
| + .Set("description", "description")
|
| + .Set("descriptionStyles",
|
| + ListBuilder()
|
| + .Append(DictionaryBuilder()
|
| + .Set("type", "url")
|
| + .Set("offset", 0)
|
| + .Set("length", 5)
|
| + .Build())
|
| + .Append(DictionaryBuilder()
|
| + .Set("type", "match")
|
| + .Set("offset", 0)
|
| + .Set("length", 5)
|
| + .Build())
|
| + .Append(DictionaryBuilder()
|
| + .Set("type", "match")
|
| + .Set("offset", 0)
|
| + .Set("length", 3)
|
| + .Build())
|
| + .Append(DictionaryBuilder()
|
| + .Set("type", "dim")
|
| + .Set("offset", 2)
|
| + .Set("length", 3)
|
| + .Build())
|
| + .Append(DictionaryBuilder()
|
| + .Set("type", "dim")
|
| + .Set("offset", 0)
|
| + .Set("length", 3)
|
| + .Build())
|
| + .Build())
|
| + .Build())
|
| .Build();
|
|
|
| scoped_ptr<SetDefaultSuggestion::Params> params(
|
|
|