OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/file_path.h" | 6 #include "base/file_path.h" |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/scoped_ptr.h" | 9 #include "base/scoped_ptr.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 &json_wide); | 157 &json_wide); |
158 | 158 |
159 // Note that we don't use ASSERT_TRUE here (and in some other places) as it | 159 // Note that we don't use ASSERT_TRUE here (and in some other places) as it |
160 // doesn't work inside a function with a return type other than void. | 160 // doesn't work inside a function with a return type other than void. |
161 EXPECT_TRUE(succeeded); | 161 EXPECT_TRUE(succeeded); |
162 if (!succeeded) | 162 if (!succeeded) |
163 return false; | 163 return false; |
164 | 164 |
165 std::string json = WideToUTF8(json_wide); | 165 std::string json = WideToUTF8(json_wide); |
166 JSONStringValueSerializer deserializer(json); | 166 JSONStringValueSerializer deserializer(json); |
167 scoped_ptr<Value> value(deserializer.Deserialize(NULL)); | 167 scoped_ptr<Value> value(deserializer.Deserialize(NULL, NULL)); |
168 | 168 |
169 EXPECT_TRUE(value.get()); | 169 EXPECT_TRUE(value.get()); |
170 if (!value.get()) | 170 if (!value.get()) |
171 return false; | 171 return false; |
172 | 172 |
173 EXPECT_TRUE(value->IsType(Value::TYPE_LIST)); | 173 EXPECT_TRUE(value->IsType(Value::TYPE_LIST)); |
174 if (!value->IsType(Value::TYPE_LIST)) | 174 if (!value->IsType(Value::TYPE_LIST)) |
175 return false; | 175 return false; |
176 | 176 |
177 ListValue* list_value = static_cast<ListValue*>(value.get()); | 177 ListValue* list_value = static_cast<ListValue*>(value.get()); |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 TEST_F(DomCheckerTest, DISABLED_Http) { | 237 TEST_F(DomCheckerTest, DISABLED_Http) { |
238 if (!CommandLine::ForCurrentProcess()->HasSwitch(kRunDomCheckerTest)) | 238 if (!CommandLine::ForCurrentProcess()->HasSwitch(kRunDomCheckerTest)) |
239 return; | 239 return; |
240 | 240 |
241 ResultsList new_passes, new_failures; | 241 ResultsList new_passes, new_failures; |
242 RunTest(true, &new_passes, &new_failures); | 242 RunTest(true, &new_passes, &new_failures); |
243 PrintResults(new_passes, new_failures); | 243 PrintResults(new_passes, new_failures); |
244 } | 244 } |
245 | 245 |
246 } // namespace | 246 } // namespace |
OLD | NEW |