| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_util.h" | 6 #include "base/file_util.h" |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/json/json_string_value_serializer.h" | 8 #include "base/json/json_string_value_serializer.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 L"window.domAutomationController.send(" | 160 L"window.domAutomationController.send(" |
| 161 L" JSON.stringify(automation.GetFailures()));", | 161 L" JSON.stringify(automation.GetFailures()));", |
| 162 &json_wide); | 162 &json_wide); |
| 163 | 163 |
| 164 // Note that we don't use ASSERT_TRUE here (and in some other places) as it | 164 // Note that we don't use ASSERT_TRUE here (and in some other places) as it |
| 165 // doesn't work inside a function with a return type other than void. | 165 // doesn't work inside a function with a return type other than void. |
| 166 EXPECT_TRUE(succeeded); | 166 EXPECT_TRUE(succeeded); |
| 167 if (!succeeded) | 167 if (!succeeded) |
| 168 return false; | 168 return false; |
| 169 | 169 |
| 170 std::string json = WideToUTF8(json_wide); | 170 std::string json = base::WideToUTF8(json_wide); |
| 171 JSONStringValueSerializer deserializer(json); | 171 JSONStringValueSerializer deserializer(json); |
| 172 scoped_ptr<Value> value(deserializer.Deserialize(NULL, NULL)); | 172 scoped_ptr<Value> value(deserializer.Deserialize(NULL, NULL)); |
| 173 | 173 |
| 174 EXPECT_TRUE(value.get()); | 174 EXPECT_TRUE(value.get()); |
| 175 if (!value.get()) | 175 if (!value.get()) |
| 176 return false; | 176 return false; |
| 177 | 177 |
| 178 EXPECT_TRUE(value->IsType(Value::TYPE_LIST)); | 178 EXPECT_TRUE(value->IsType(Value::TYPE_LIST)); |
| 179 if (!value->IsType(Value::TYPE_LIST)) | 179 if (!value->IsType(Value::TYPE_LIST)) |
| 180 return false; | 180 return false; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 TEST_F(DomCheckerTest, DISABLED_Http) { | 246 TEST_F(DomCheckerTest, DISABLED_Http) { |
| 247 if (!CommandLine::ForCurrentProcess()->HasSwitch(kRunDomCheckerTest)) | 247 if (!CommandLine::ForCurrentProcess()->HasSwitch(kRunDomCheckerTest)) |
| 248 return; | 248 return; |
| 249 | 249 |
| 250 ResultsList new_passes, new_failures; | 250 ResultsList new_passes, new_failures; |
| 251 RunTest(true, &new_passes, &new_failures); | 251 RunTest(true, &new_passes, &new_failures); |
| 252 PrintResults(new_passes, new_failures); | 252 PrintResults(new_passes, new_failures); |
| 253 } | 253 } |
| 254 | 254 |
| 255 } // namespace | 255 } // namespace |
| OLD | NEW |