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/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.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/chrome/status.h" |
11 #include "chrome/test/chromedriver/fake_session_accessor.h" | 12 #include "chrome/test/chromedriver/fake_session_accessor.h" |
12 #include "chrome/test/chromedriver/session.h" | 13 #include "chrome/test/chromedriver/session.h" |
13 #include "chrome/test/chromedriver/session_commands.h" | 14 #include "chrome/test/chromedriver/session_commands.h" |
14 #include "chrome/test/chromedriver/session_map.h" | 15 #include "chrome/test/chromedriver/session_map.h" |
15 #include "chrome/test/chromedriver/status.h" | |
16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 Status ExecuteSimpleCommand( | 20 Status ExecuteSimpleCommand( |
21 Session* expected_session, | 21 Session* expected_session, |
22 base::DictionaryValue* expected_params, | 22 base::DictionaryValue* expected_params, |
23 base::Value* value, | 23 base::Value* value, |
24 Session* session, | 24 Session* session, |
25 const base::DictionaryValue& params, | 25 const base::DictionaryValue& params, |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 base::DictionaryValue params; | 87 base::DictionaryValue params; |
88 scoped_ptr<base::Value> value; | 88 scoped_ptr<base::Value> value; |
89 std::string session_id; | 89 std::string session_id; |
90 Status status = ExecuteSessionCommand( | 90 Status status = ExecuteSessionCommand( |
91 &map, base::Bind(&ShouldNotBeCalled), params, | 91 &map, base::Bind(&ShouldNotBeCalled), params, |
92 "session", &value, &session_id); | 92 "session", &value, &session_id); |
93 ASSERT_EQ(kNoSuchSession, status.code()); | 93 ASSERT_EQ(kNoSuchSession, status.code()); |
94 ASSERT_FALSE(value.get()); | 94 ASSERT_FALSE(value.get()); |
95 ASSERT_STREQ("session", session_id.c_str()); | 95 ASSERT_STREQ("session", session_id.c_str()); |
96 } | 96 } |
OLD | NEW |