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

Unified Diff: chrome/common/extensions/api/common_extension_api_unittest.cc

Issue 1739183003: Make extensions::DictionaryBuilder and extensions::ListValue unmovable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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: chrome/common/extensions/api/common_extension_api_unittest.cc
diff --git a/chrome/common/extensions/api/common_extension_api_unittest.cc b/chrome/common/extensions/api/common_extension_api_unittest.cc
index b3ec6afae9f580352be8b9b1a20c939f2d019605..1747e22e0da99c5ebb9abdff071cac9b09661591 100644
--- a/chrome/common/extensions/api/common_extension_api_unittest.cc
+++ b/chrome/common/extensions/api/common_extension_api_unittest.cc
@@ -205,23 +205,29 @@ TEST(ExtensionAPITest, APIFeatures) {
TEST(ExtensionAPITest, IsAnyFeatureAvailableToContext) {
scoped_refptr<const Extension> app =
ExtensionBuilder()
- .SetManifest(std::move(
+ .SetManifest(
DictionaryBuilder()
.Set("name", "app")
- .Set("app", std::move(DictionaryBuilder().Set(
- "background",
- std::move(DictionaryBuilder().Set(
- "scripts", std::move(ListBuilder().Append(
- "background.js")))))))
+ .Set("app",
+ DictionaryBuilder()
+ .Set("background",
+ DictionaryBuilder()
+ .Set("scripts", ListBuilder()
+ .Append("background.js")
+ .Build())
+ .Build())
+ .Build())
.Set("version", "1")
- .Set("manifest_version", 2)))
+ .Set("manifest_version", 2)
+ .Build())
.Build();
scoped_refptr<const Extension> extension =
ExtensionBuilder()
- .SetManifest(std::move(DictionaryBuilder()
- .Set("name", "extension")
- .Set("version", "1")
- .Set("manifest_version", 2)))
+ .SetManifest(DictionaryBuilder()
+ .Set("name", "extension")
+ .Set("version", "1")
+ .Set("manifest_version", 2)
+ .Build())
.Build();
struct {
@@ -832,8 +838,9 @@ TEST(ExtensionAPITest, ManifestKeys) {
scoped_refptr<Extension> extension =
BuildExtension(ExtensionBuilder())
- .MergeManifest(
- DictionaryBuilder().Set("browser_action", DictionaryBuilder()))
+ .MergeManifest(DictionaryBuilder()
+ .Set("browser_action", DictionaryBuilder().Build())
+ .Build())
.Build();
EXPECT_TRUE(extension_api->IsAvailable("browserAction",

Powered by Google App Engine
This is Rietveld 408576698