summaryrefslogtreecommitdiffstats
path: root/chrome/browser/policy/managed_bookmarks_policy_handler_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/policy/managed_bookmarks_policy_handler_unittest.cc')
-rw-r--r--chrome/browser/policy/managed_bookmarks_policy_handler_unittest.cc69
1 files changed, 37 insertions, 32 deletions
diff --git a/chrome/browser/policy/managed_bookmarks_policy_handler_unittest.cc b/chrome/browser/policy/managed_bookmarks_policy_handler_unittest.cc
index 1105262..f3d238c 100644
--- a/chrome/browser/policy/managed_bookmarks_policy_handler_unittest.cc
+++ b/chrome/browser/policy/managed_bookmarks_policy_handler_unittest.cc
@@ -80,40 +80,45 @@ TEST_F(ManagedBookmarksPolicyHandlerTest, ApplyPolicySettings) {
scoped_ptr<base::Value> expected(
extensions::ListBuilder()
- .Append(extensions::DictionaryBuilder()
- .Set("name", "Google")
- .Set("url", "http://google.com/"))
- .Append(extensions::DictionaryBuilder()
- .Set("name", "Empty Folder")
- .Set("children", extensions::ListBuilder()))
- .Append(
+ .Append(std::move(extensions::DictionaryBuilder()
+ .Set("name", "Google")
+ .Set("url", "http://google.com/")))
+ .Append(std::move(extensions::DictionaryBuilder()
+ .Set("name", "Empty Folder")
+ .Set("children", extensions::ListBuilder())))
+ .Append(std::move(
extensions::DictionaryBuilder()
.Set("name", "Big Folder")
.Set(
"children",
std::move(
extensions::ListBuilder()
- .Append(extensions::DictionaryBuilder()
- .Set("name", "Youtube")
- .Set("url", "http://youtube.com/"))
- .Append(extensions::DictionaryBuilder()
- .Set("name", "Chromium")
- .Set("url", "http://chromium.org/"))
- .Append(
+ .Append(std::move(
+ extensions::DictionaryBuilder()
+ .Set("name", "Youtube")
+ .Set("url", "http://youtube.com/")))
+ .Append(std::move(
+ extensions::DictionaryBuilder()
+ .Set("name", "Chromium")
+ .Set("url", "http://chromium.org/")))
+ .Append(std::move(
extensions::DictionaryBuilder()
.Set("name", "More Stuff")
- .Set("children",
- std::move(
- extensions::ListBuilder().Append(
- extensions::
- DictionaryBuilder()
- .Set("name", "Bugs")
- .Set("url",
- "http://"
- "crbug.com/")
- .Pass())))
- .Pass())))
- .Pass())
+ .Set(
+ "children",
+ std::move(
+ extensions::ListBuilder().Append(
+ std::move(
+ extensions::
+ DictionaryBuilder()
+ .Set("name",
+ "Bugs")
+ .Set(
+ "url",
+ "http://"
+ "crbug."
+ "com"
+ "/")))))))))))
.Build());
EXPECT_TRUE(pref_value->Equals(expected.get()));
}
@@ -163,9 +168,9 @@ TEST_F(ManagedBookmarksPolicyHandlerTest, UnknownKeys) {
scoped_ptr<base::Value> expected(
extensions::ListBuilder()
- .Append(extensions::DictionaryBuilder()
- .Set("name", "Google")
- .Set("url", "http://google.com/"))
+ .Append(std::move(extensions::DictionaryBuilder()
+ .Set("name", "Google")
+ .Set("url", "http://google.com/")))
.Build());
EXPECT_TRUE(pref_value->Equals(expected.get()));
}
@@ -206,9 +211,9 @@ TEST_F(ManagedBookmarksPolicyHandlerTest, BadBookmark) {
scoped_ptr<base::Value> expected(
extensions::ListBuilder()
- .Append(extensions::DictionaryBuilder()
- .Set("name", "Google")
- .Set("url", "http://google.com/"))
+ .Append(std::move(extensions::DictionaryBuilder()
+ .Set("name", "Google")
+ .Set("url", "http://google.com/")))
.Build());
EXPECT_TRUE(pref_value->Equals(expected.get()));
}