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

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

Issue 11746025: [chromedriver]Implement command: title. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Resolved merge conflict. Created 7 years, 11 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/chromedriver.py ('k') | chrome/test/chromedriver/commands.h » ('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 "chrome/test/chromedriver/command_executor_impl.h" 5 #include "chrome/test/chromedriver/command_executor_impl.h"
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/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/message_loop_proxy.h" 10 #include "base/message_loop_proxy.h"
(...skipping 29 matching lines...) Expand all
40 scoped_ptr<base::Value>*, 40 scoped_ptr<base::Value>*,
41 std::string*)> execute_session_command = base::Bind( 41 std::string*)> execute_session_command = base::Bind(
42 &ExecuteSessionCommand, 42 &ExecuteSessionCommand,
43 &session_map_); 43 &session_map_);
44 command_map_.Set("get", base::Bind(execute_session_command, 44 command_map_.Set("get", base::Bind(execute_session_command,
45 base::Bind(&ExecuteGet))); 45 base::Bind(&ExecuteGet)));
46 command_map_.Set("executeScript", base::Bind(execute_session_command, 46 command_map_.Set("executeScript", base::Bind(execute_session_command,
47 base::Bind(&ExecuteExecuteScript))); 47 base::Bind(&ExecuteExecuteScript)));
48 command_map_.Set("switchToFrame", base::Bind(execute_session_command, 48 command_map_.Set("switchToFrame", base::Bind(execute_session_command,
49 base::Bind(&ExecuteSwitchToFrame))); 49 base::Bind(&ExecuteSwitchToFrame)));
50 command_map_.Set("getTitle", base::Bind(execute_session_command,
51 base::Bind(&ExecuteGetTitle)));
50 Command quit_command = base::Bind(execute_session_command, 52 Command quit_command = base::Bind(execute_session_command,
51 base::Bind(&ExecuteQuit, &session_map_)); 53 base::Bind(&ExecuteQuit, &session_map_));
52 command_map_.Set("quit", quit_command); 54 command_map_.Set("quit", quit_command);
53 55
54 // Non-session commands. 56 // Non-session commands.
55 command_map_.Set("newSession", 57 command_map_.Set("newSession",
56 base::Bind(&ExecuteNewSession, &session_map_, launcher_.get())); 58 base::Bind(&ExecuteNewSession, &session_map_, launcher_.get()));
57 command_map_.Set("quitAll", 59 command_map_.Set("quitAll",
58 base::Bind(&ExecuteQuitAll, quit_command, &session_map_)); 60 base::Bind(&ExecuteQuitAll, quit_command, &session_map_));
59 } 61 }
(...skipping 15 matching lines...) Expand all
75 } 77 }
76 *status_code = status.code(); 78 *status_code = status.code();
77 if (status.IsError()) { 79 if (status.IsError()) {
78 scoped_ptr<base::DictionaryValue> error(new base::DictionaryValue()); 80 scoped_ptr<base::DictionaryValue> error(new base::DictionaryValue());
79 error->SetString("message", status.message()); 81 error->SetString("message", status.message());
80 value->reset(error.release()); 82 value->reset(error.release());
81 } 83 }
82 if (!*value) 84 if (!*value)
83 value->reset(base::Value::CreateNullValue()); 85 value->reset(base::Value::CreateNullValue());
84 } 86 }
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/chromedriver.py ('k') | chrome/test/chromedriver/commands.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698