diff options
Diffstat (limited to 'chrome/browser/policy/managed_bookmarks_policy_handler_unittest.cc')
-rw-r--r-- | chrome/browser/policy/managed_bookmarks_policy_handler_unittest.cc | 56 |
1 files changed, 33 insertions, 23 deletions
diff --git a/chrome/browser/policy/managed_bookmarks_policy_handler_unittest.cc b/chrome/browser/policy/managed_bookmarks_policy_handler_unittest.cc index 5009731..1105262 100644 --- a/chrome/browser/policy/managed_bookmarks_policy_handler_unittest.cc +++ b/chrome/browser/policy/managed_bookmarks_policy_handler_unittest.cc @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <utility> + #include "base/json/json_reader.h" #include "chrome/browser/policy/managed_bookmarks_policy_handler.h" #include "components/bookmarks/common/bookmark_pref_names.h" @@ -79,31 +81,39 @@ 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().Pass())) + .Set("name", "Google") + .Set("url", "http://google.com/")) .Append(extensions::DictionaryBuilder() - .Set("name", "Big Folder") - .Set("children", 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(extensions::DictionaryBuilder() - .Set("name", "More Stuff") - .Set("children", extensions::ListBuilder() - .Append(extensions::DictionaryBuilder() - .Set("name", "Bugs") - .Set("url", "http://crbug.com/") - .Pass()) - .Pass()) - .Pass()) + .Set("name", "Empty Folder") + .Set("children", extensions::ListBuilder())) + .Append( + 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( + 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()) - .Pass()) .Build()); EXPECT_TRUE(pref_value->Equals(expected.get())); } |