Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: chrome/test/chromedriver/command_executor_impl_unittest.cc

Issue 12848005: [chromedriver] Separate stuff of chrome from chromedriver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments and fix compile error on mac. Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/test/chromedriver/command_executor_impl.cc ('k') | chrome/test/chromedriver/commands.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <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/command_executor_impl.h" 12 #include "chrome/test/chromedriver/command_executor_impl.h"
12 #include "chrome/test/chromedriver/status.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 14
15 TEST(CommandExecutorImplTest, UnknownCommand) { 15 TEST(CommandExecutorImplTest, UnknownCommand) {
16 CommandExecutorImpl executor; 16 CommandExecutorImpl executor;
17 base::DictionaryValue empty_dict; 17 base::DictionaryValue empty_dict;
18 StatusCode status; 18 StatusCode status;
19 scoped_ptr<base::Value> value; 19 scoped_ptr<base::Value> value;
20 std::string session_id; 20 std::string session_id;
21 executor.ExecuteCommand("noSuchCommand", empty_dict, "session", 21 executor.ExecuteCommand("noSuchCommand", empty_dict, "session",
22 &status, &value, &session_id); 22 &status, &value, &session_id);
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 &status_code, &value, 122 &status_code, &value,
123 &out_session_id); 123 &out_session_id);
124 ASSERT_EQ(kUnknownError, status_code); 124 ASSERT_EQ(kUnknownError, status_code);
125 ASSERT_TRUE(value); 125 ASSERT_TRUE(value);
126 base::DictionaryValue* error; 126 base::DictionaryValue* error;
127 ASSERT_TRUE(value->GetAsDictionary(&error)); 127 ASSERT_TRUE(value->GetAsDictionary(&error));
128 std::string message; 128 std::string message;
129 ASSERT_TRUE(error->GetString("message", &message)); 129 ASSERT_TRUE(error->GetString("message", &message));
130 ASSERT_NE(std::string::npos, message.find("unknown error")); 130 ASSERT_NE(std::string::npos, message.find("unknown error"));
131 } 131 }
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/command_executor_impl.cc ('k') | chrome/test/chromedriver/commands.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698