OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
| 5 #include <stddef.h> |
| 6 |
5 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
6 #include "base/android/jni_array.h" | 8 #include "base/android/jni_array.h" |
7 #include "base/android/jni_string.h" | 9 #include "base/android/jni_string.h" |
8 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
9 #include "base/values.h" | 11 #include "base/values.h" |
10 #include "components/policy/core/browser/android/policy_converter.h" | 12 #include "components/policy/core/browser/android/policy_converter.h" |
11 #include "components/policy/core/common/schema.h" | 13 #include "components/policy/core/common/schema.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
13 | 15 |
14 using base::DictionaryValue; | 16 using base::DictionaryValue; |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 dict->SetInteger("thx", 1138); | 180 dict->SetInteger("thx", 1138); |
179 EXPECT_EQ("{\"thx\":1138}", Convert(dict, dict_schema)); | 181 EXPECT_EQ("{\"thx\":1138}", Convert(dict, dict_schema)); |
180 EXPECT_EQ("{\"moose\":true}", | 182 EXPECT_EQ("{\"moose\":true}", |
181 Convert(new StringValue("{\"moose\": true}"), dict_schema)); | 183 Convert(new StringValue("{\"moose\": true}"), dict_schema)); |
182 EXPECT_EQ("\"fnord\"", Convert(new StringValue("fnord"), dict_schema)); | 184 EXPECT_EQ("\"fnord\"", Convert(new StringValue("fnord"), dict_schema)); |
183 EXPECT_EQ("1729", Convert(new FundamentalValue(1729), dict_schema)); | 185 EXPECT_EQ("1729", Convert(new FundamentalValue(1729), dict_schema)); |
184 } | 186 } |
185 | 187 |
186 } // namespace android | 188 } // namespace android |
187 } // namespace policy | 189 } // namespace policy |
OLD | NEW |