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 <list> | 5 #include <list> |
6 #include <string> | 6 #include <string> |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
11 #include "base/location.h" | 11 #include "base/location.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/memory/scoped_vector.h" | 13 #include "base/memory/scoped_vector.h" |
14 #include "base/message_loop.h" | 14 #include "base/message_loop.h" |
15 #include "base/synchronization/waitable_event.h" | 15 #include "base/synchronization/waitable_event.h" |
16 #include "base/threading/thread.h" | 16 #include "base/threading/thread.h" |
17 #include "base/values.h" | 17 #include "base/values.h" |
| 18 #include "chrome/test/chromedriver/chrome/status.h" |
18 #include "chrome/test/chromedriver/chromedriver.h" | 19 #include "chrome/test/chromedriver/chromedriver.h" |
19 #include "chrome/test/chromedriver/command_executor.h" | 20 #include "chrome/test/chromedriver/command_executor.h" |
20 #include "chrome/test/chromedriver/status.h" | |
21 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
22 | 22 |
23 namespace { | 23 namespace { |
24 | 24 |
25 void ExpectExecuteError(const std::string& command) { | 25 void ExpectExecuteError(const std::string& command) { |
26 std::string response; | 26 std::string response; |
27 ExecuteCommand(command, &response); | 27 ExecuteCommand(command, &response); |
28 scoped_ptr<base::Value> value(base::JSONReader::Read(response)); | 28 scoped_ptr<base::Value> value(base::JSONReader::Read(response)); |
29 ASSERT_TRUE(value.get()); | 29 ASSERT_TRUE(value.get()); |
30 base::DictionaryValue* dict; | 30 base::DictionaryValue* dict; |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 EXPECT_EQ(kOk, status); | 161 EXPECT_EQ(kOk, status); |
162 } | 162 } |
163 { | 163 { |
164 base::DictionaryValue params; | 164 base::DictionaryValue params; |
165 scoped_ptr<base::Value> value(base::Value::CreateNullValue()); | 165 scoped_ptr<base::Value> value(base::Value::CreateNullValue()); |
166 mock->Expect(scoped_ptr<ExpectedCommand>(new ExpectedCommand( | 166 mock->Expect(scoped_ptr<ExpectedCommand>(new ExpectedCommand( |
167 "quitAll", params, "", kOk, value.Pass(), ""))); | 167 "quitAll", params, "", kOk, value.Pass(), ""))); |
168 } | 168 } |
169 Shutdown(); | 169 Shutdown(); |
170 } | 170 } |
OLD | NEW |