summaryrefslogtreecommitdiffstats
path: root/chrome/test/webdriver/commands/find_element_commands.cc
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-09 20:16:55 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-09 20:16:55 +0000
commit808d103da058975e8aebe257ec6479a42d92cda4 (patch)
treee6c070f6a5f4210a5a840e80e15e936d56126935 /chrome/test/webdriver/commands/find_element_commands.cc
parent0e3c9572844ac820dc2f83ce6f6985afc836369b (diff)
downloadchromium_src-808d103da058975e8aebe257ec6479a42d92cda4.zip
chromium_src-808d103da058975e8aebe257ec6479a42d92cda4.tar.gz
chromium_src-808d103da058975e8aebe257ec6479a42d92cda4.tar.bz2
Cleanup more test code.
BUG=none TEST=compiles Review URL: http://codereview.chromium.org/6462015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74328 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/webdriver/commands/find_element_commands.cc')
-rw-r--r--chrome/test/webdriver/commands/find_element_commands.cc19
1 files changed, 18 insertions, 1 deletions
diff --git a/chrome/test/webdriver/commands/find_element_commands.cc b/chrome/test/webdriver/commands/find_element_commands.cc
index 94d82c8..16f2454 100644
--- a/chrome/test/webdriver/commands/find_element_commands.cc
+++ b/chrome/test/webdriver/commands/find_element_commands.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -17,6 +17,15 @@
namespace webdriver {
+FindElementCommand::FindElementCommand(
+ const std::vector<std::string>& path_segments,
+ const DictionaryValue* const parameters,
+ const bool find_one_element)
+ : WebDriverCommand(path_segments, parameters),
+ find_one_element_(find_one_element) {}
+
+FindElementCommand::~FindElementCommand() {}
+
bool FindElementCommand::Init(Response* const response) {
if (!WebDriverCommand::Init(response)) {
SET_WEBDRIVER_ERROR(response, "Failure on Init for find element",
@@ -49,6 +58,10 @@ bool FindElementCommand::Init(Response* const response) {
return true;
}
+bool FindElementCommand::DoesPost() {
+ return true;
+}
+
void FindElementCommand::ExecutePost(Response* const response) {
scoped_ptr<ListValue> args(new ListValue());
DictionaryValue* locator = new DictionaryValue();
@@ -108,5 +121,9 @@ void FindElementCommand::ExecutePost(Response* const response) {
response->set_status(error);
}
+bool FindElementCommand::RequiresValidTab() {
+ return false;
+}
+
} // namespace webdriver