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

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

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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
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"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 111
112 TEST(CommandExecutorImplTest, CommandThatReturnsError) { 112 TEST(CommandExecutorImplTest, CommandThatReturnsError) {
113 CommandExecutorImpl executor; 113 CommandExecutorImpl executor;
114 executor.command_map_.Set("simpleCommand", 114 executor.command_map_.Set("simpleCommand",
115 base::Bind(&ExecuteSimpleCommand3)); 115 base::Bind(&ExecuteSimpleCommand3));
116 116
117 base::DictionaryValue params; 117 base::DictionaryValue params;
118 StatusCode status_code; 118 StatusCode status_code;
119 scoped_ptr<base::Value> value; 119 scoped_ptr<base::Value> value;
120 std::string out_session_id; 120 std::string out_session_id;
121 executor.ExecuteCommand("simpleCommand", params, "", 121 executor.ExecuteCommand("simpleCommand",
122 &status_code, &value, 122 params,
123 std::string(),
124 &status_code,
125 &value,
123 &out_session_id); 126 &out_session_id);
124 ASSERT_EQ(kUnknownError, status_code); 127 ASSERT_EQ(kUnknownError, status_code);
125 ASSERT_TRUE(value); 128 ASSERT_TRUE(value);
126 base::DictionaryValue* error; 129 base::DictionaryValue* error;
127 ASSERT_TRUE(value->GetAsDictionary(&error)); 130 ASSERT_TRUE(value->GetAsDictionary(&error));
128 std::string message; 131 std::string message;
129 ASSERT_TRUE(error->GetString("message", &message)); 132 ASSERT_TRUE(error->GetString("message", &message));
130 ASSERT_NE(std::string::npos, message.find("unknown error")); 133 ASSERT_NE(std::string::npos, message.find("unknown error"));
131 } 134 }
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/chromedriver_unittest.cc ('k') | chrome/test/chromedriver/commands_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698