| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <memory> | 5 #include <memory> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
| 9 #include "base/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 } | 82 } |
| 83 | 83 |
| 84 void FailWithError(const std::string& error) { | 84 void FailWithError(const std::string& error) { |
| 85 ADD_FAILURE() << error; | 85 ADD_FAILURE() << error; |
| 86 message_loop_runner_->Quit(); | 86 message_loop_runner_->Quit(); |
| 87 } | 87 } |
| 88 | 88 |
| 89 scoped_refptr<content::MessageLoopRunner> message_loop_runner_; | 89 scoped_refptr<content::MessageLoopRunner> message_loop_runner_; |
| 90 }; | 90 }; |
| 91 | 91 |
| 92 IN_PROC_BROWSER_TEST_F(SafeJsonParserTest, Parse) { | 92 // Flaky in debug builds: http://crbug.com/611067 |
| 93 IN_PROC_BROWSER_TEST_F(SafeJsonParserTest, DISABLED_Parse) { |
| 93 TestParse("{}"); | 94 TestParse("{}"); |
| 94 TestParse("choke"); | 95 TestParse("choke"); |
| 95 TestParse("{\"awesome\": true}"); | 96 TestParse("{\"awesome\": true}"); |
| 96 TestParse("\"laser\""); | 97 TestParse("\"laser\""); |
| 97 TestParse("false"); | 98 TestParse("false"); |
| 98 TestParse("null"); | 99 TestParse("null"); |
| 99 TestParse("3.14"); | 100 TestParse("3.14"); |
| 100 TestParse("["); | 101 TestParse("["); |
| 101 TestParse("\""); | 102 TestParse("\""); |
| 102 TestParse(std::string()); | 103 TestParse(std::string()); |
| 103 TestParse("☃"); | 104 TestParse("☃"); |
| 104 TestParse("\"☃\""); | 105 TestParse("\"☃\""); |
| 105 TestParse("\"\\ufdd0\""); | 106 TestParse("\"\\ufdd0\""); |
| 106 TestParse("\"\\ufffe\""); | 107 TestParse("\"\\ufffe\""); |
| 107 TestParse("\"\\ud83f\\udffe\""); | 108 TestParse("\"\\ud83f\\udffe\""); |
| 108 } | 109 } |
| OLD | NEW |