| 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/json/json_reader.h" | 6 #include "base/json/json_reader.h" |
| 7 #include "base/json/json_writer.h" | 7 #include "base/json/json_writer.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| 11 #include "base/values.h" | 11 #include "base/values.h" |
| 12 #include "build/build_config.h" |
| 12 #include "components/safe_json/json_sanitizer.h" | 13 #include "components/safe_json/json_sanitizer.h" |
| 13 #include "components/safe_json/safe_json_parser.h" | 14 #include "components/safe_json/safe_json_parser.h" |
| 14 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 15 | 16 |
| 16 #if !defined(OS_ANDROID) | 17 #if !defined(OS_ANDROID) |
| 17 #include "components/safe_json/testing_json_parser.h" | 18 #include "components/safe_json/testing_json_parser.h" |
| 18 #endif | 19 #endif |
| 19 | 20 |
| 20 namespace safe_json { | 21 namespace safe_json { |
| 21 | 22 |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 // A low surrogate followed by a high surrogate. | 176 // A low surrogate followed by a high surrogate. |
| 176 CheckError("[\"\\ude03\\ud83d\"]"); | 177 CheckError("[\"\\ude03\\ud83d\"]"); |
| 177 | 178 |
| 178 // Valid escaped UTF-16 that encodes non-characters: | 179 // Valid escaped UTF-16 that encodes non-characters: |
| 179 CheckError("[\"\\ufdd0\"]"); | 180 CheckError("[\"\\ufdd0\"]"); |
| 180 CheckError("[\"\\ufffe\"]"); | 181 CheckError("[\"\\ufffe\"]"); |
| 181 CheckError("[\"\\ud83f\\udffe\"]"); | 182 CheckError("[\"\\ud83f\\udffe\"]"); |
| 182 } | 183 } |
| 183 | 184 |
| 184 } // namespace safe_json | 185 } // namespace safe_json |
| OLD | NEW |