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

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

Issue 11884058: [chromedriver] Implement commands: findChildElement, findChildElements. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
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, 50 command_map_.Set("getTitle", base::Bind(execute_session_command,
51 base::Bind(&ExecuteGetTitle))); 51 base::Bind(&ExecuteGetTitle)));
52 command_map_.Set("findElement", base::Bind(execute_session_command, 52 command_map_.Set("findElement", base::Bind(execute_session_command,
53 base::Bind(&ExecuteFindElement))); 53 base::Bind(&ExecuteFindElement, 50)));
54 command_map_.Set("findElements", base::Bind(execute_session_command, 54 command_map_.Set("findElements", base::Bind(execute_session_command,
55 base::Bind(&ExecuteFindElements))); 55 base::Bind(&ExecuteFindElements, 50)));
56 command_map_.Set("findChildElement", base::Bind(execute_session_command,
57 base::Bind(&ExecuteFindChildElement, 50)));
58 command_map_.Set("findChildElements", base::Bind(execute_session_command,
59 base::Bind(&ExecuteFindChildElements, 50)));
56 command_map_.Set("setTimeout", base::Bind(execute_session_command, 60 command_map_.Set("setTimeout", base::Bind(execute_session_command,
57 base::Bind(&ExecuteSetTimeout))); 61 base::Bind(&ExecuteSetTimeout)));
58 command_map_.Set("getCurrentUrl", base::Bind(execute_session_command, 62 command_map_.Set("getCurrentUrl", base::Bind(execute_session_command,
59 base::Bind(&ExecuteGetCurrentUrl))); 63 base::Bind(&ExecuteGetCurrentUrl)));
60 command_map_.Set("goBack", base::Bind(execute_session_command, 64 command_map_.Set("goBack", base::Bind(execute_session_command,
61 base::Bind(&ExecuteGoBack))); 65 base::Bind(&ExecuteGoBack)));
62 command_map_.Set("goForward", base::Bind(execute_session_command, 66 command_map_.Set("goForward", base::Bind(execute_session_command,
63 base::Bind(&ExecuteGoForward))); 67 base::Bind(&ExecuteGoForward)));
64 command_map_.Set("refresh", base::Bind(execute_session_command, 68 command_map_.Set("refresh", base::Bind(execute_session_command,
65 base::Bind(&ExecuteRefresh))); 69 base::Bind(&ExecuteRefresh)));
(...skipping 25 matching lines...) Expand all
91 } 95 }
92 *status_code = status.code(); 96 *status_code = status.code();
93 if (status.IsError()) { 97 if (status.IsError()) {
94 scoped_ptr<base::DictionaryValue> error(new base::DictionaryValue()); 98 scoped_ptr<base::DictionaryValue> error(new base::DictionaryValue());
95 error->SetString("message", status.message()); 99 error->SetString("message", status.message());
96 value->reset(error.release()); 100 value->reset(error.release());
97 } 101 }
98 if (!*value) 102 if (!*value)
99 value->reset(base::Value::CreateNullValue()); 103 value->reset(base::Value::CreateNullValue());
100 } 104 }
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