| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 <list> | 5 #include <list> |
| 6 #include <string> | 6 #include <string> |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| 11 #include "chrome/test/chromedriver/devtools_client.h" | 11 #include "chrome/test/chromedriver/chrome/devtools_client.h" |
| 12 #include "chrome/test/chromedriver/status.h" | 12 #include "chrome/test/chromedriver/chrome/status.h" |
| 13 #include "chrome/test/chromedriver/web_view_impl.h" | 13 #include "chrome/test/chromedriver/chrome/web_view_impl.h" |
| 14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
| 15 | 15 |
| 16 namespace { | 16 namespace { |
| 17 | 17 |
| 18 class FakeDevToolsClient : public DevToolsClient { | 18 class FakeDevToolsClient : public DevToolsClient { |
| 19 public: | 19 public: |
| 20 FakeDevToolsClient() : status_(kOk) {} | 20 FakeDevToolsClient() : status_(kOk) {} |
| 21 virtual ~FakeDevToolsClient() {} | 21 virtual ~FakeDevToolsClient() {} |
| 22 | 22 |
| 23 void set_status(const Status& status) { | 23 void set_status(const Status& status) { |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 | 193 |
| 194 TEST(ParseCallFunctionResult, ScriptError) { | 194 TEST(ParseCallFunctionResult, ScriptError) { |
| 195 scoped_ptr<base::Value> result; | 195 scoped_ptr<base::Value> result; |
| 196 base::DictionaryValue dict; | 196 base::DictionaryValue dict; |
| 197 dict.SetInteger("status", 1); | 197 dict.SetInteger("status", 1); |
| 198 dict.SetInteger("value", 1); | 198 dict.SetInteger("value", 1); |
| 199 Status status = internal::ParseCallFunctionResult(dict, &result); | 199 Status status = internal::ParseCallFunctionResult(dict, &result); |
| 200 ASSERT_EQ(1, status.code()); | 200 ASSERT_EQ(1, status.code()); |
| 201 ASSERT_FALSE(result); | 201 ASSERT_FALSE(result); |
| 202 } | 202 } |
| OLD | NEW |