| 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/json/json_writer.h" | 7 #include "base/json/json_writer.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "chrome/test/chromedriver/chrome/status.h" |
| 10 #include "chrome/test/chromedriver/command_executor.h" | 11 #include "chrome/test/chromedriver/command_executor.h" |
| 11 #include "chrome/test/chromedriver/command_names.h" | 12 #include "chrome/test/chromedriver/command_names.h" |
| 12 #include "chrome/test/chromedriver/server/http_handler.h" | 13 #include "chrome/test/chromedriver/server/http_handler.h" |
| 13 #include "chrome/test/chromedriver/server/http_response.h" | 14 #include "chrome/test/chromedriver/server/http_response.h" |
| 14 #include "chrome/test/chromedriver/status.h" | |
| 15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 16 | 16 |
| 17 namespace { | 17 namespace { |
| 18 | 18 |
| 19 class DummyExecutor : public CommandExecutor { | 19 class DummyExecutor : public CommandExecutor { |
| 20 public: | 20 public: |
| 21 DummyExecutor() : status_(kOk) {} | 21 DummyExecutor() : status_(kOk) {} |
| 22 explicit DummyExecutor(StatusCode status) : status_(status) {} | 22 explicit DummyExecutor(StatusCode status) : status_(status) {} |
| 23 virtual ~DummyExecutor() {} | 23 virtual ~DummyExecutor() {} |
| 24 | 24 |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 ASSERT_TRUE(internal::MatchesCommand( | 162 ASSERT_TRUE(internal::MatchesCommand( |
| 163 kPost, "path/1/space/2/3", command, &session_id, ¶ms)); | 163 kPost, "path/1/space/2/3", command, &session_id, ¶ms)); |
| 164 ASSERT_EQ("1", session_id); | 164 ASSERT_EQ("1", session_id); |
| 165 ASSERT_EQ(2u, params.size()); | 165 ASSERT_EQ(2u, params.size()); |
| 166 std::string param; | 166 std::string param; |
| 167 ASSERT_TRUE(params.GetString("a", ¶m)); | 167 ASSERT_TRUE(params.GetString("a", ¶m)); |
| 168 ASSERT_EQ("2", param); | 168 ASSERT_EQ("2", param); |
| 169 ASSERT_TRUE(params.GetString("b", ¶m)); | 169 ASSERT_TRUE(params.GetString("b", ¶m)); |
| 170 ASSERT_EQ("3", param); | 170 ASSERT_EQ("3", param); |
| 171 } | 171 } |
| OLD | NEW |