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

Unified Diff: components/policy/core/common/registry_dict_unittest.cc

Issue 2481753002: Push preg_parser and registry_dict changes upstream (Closed)
Patch Set: Minor formatting fixes Created 4 years, 1 month 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 | « components/policy/core/common/registry_dict.cc ('k') | components/policy/core/common/registry_dict_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/policy/core/common/registry_dict_unittest.cc
diff --git a/components/policy/core/common/registry_dict_win_unittest.cc b/components/policy/core/common/registry_dict_unittest.cc
similarity index 98%
rename from components/policy/core/common/registry_dict_win_unittest.cc
rename to components/policy/core/common/registry_dict_unittest.cc
index 0d326dd590d2844846706c3abf44422dd96c7260..553ee6c390a39091284392c9a9a7955eb39b9c8d 100644
--- a/components/policy/core/common/registry_dict_win_unittest.cc
+++ b/components/policy/core/common/registry_dict_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "components/policy/core/common/registry_dict_win.h"
+#include "components/policy/core/common/registry_dict.h"
#include <string>
#include <utility>
@@ -184,6 +184,7 @@ TEST(RegistryDictTest, Swap) {
EXPECT_FALSE(dict_a.GetKey("two"));
}
+#if defined(OS_WIN)
TEST(RegistryDictTest, ConvertToJSON) {
RegistryDict test_dict;
@@ -244,7 +245,7 @@ TEST(RegistryDictTest, ConvertToJSON) {
expected.Set("string-to-int",
new base::FundamentalValue(static_cast<int>(0)));
expected_list.reset(new base::ListValue());
- expected_list->Append(new base::StringValue("value"));
+ expected_list->Append(base::MakeUnique<base::StringValue>("value"));
expected_subdict.reset(new base::DictionaryValue());
expected_subdict->Set("key", std::move(expected_list));
expected.Set("string-to-dict", std::move(expected_subdict));
@@ -287,6 +288,7 @@ TEST(RegistryDictTest, NonSequentialConvertToJSON) {
EXPECT_TRUE(base::Value::Equals(actual.get(), &expected));
}
+#endif
TEST(RegistryDictTest, KeyValueNameClashes) {
RegistryDict test_dict;
« no previous file with comments | « components/policy/core/common/registry_dict.cc ('k') | components/policy/core/common/registry_dict_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698