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

Unified Diff: chrome/test/webdriver/commands/webelement_commands.cc

Issue 6523032: Even more test cleanup. Some fixes to non-test code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/webdriver/commands/webelement_commands.cc
diff --git a/chrome/test/webdriver/commands/webelement_commands.cc b/chrome/test/webdriver/commands/webelement_commands.cc
index e9bb7c47bd9d928b2455333f3a9974f460956ddc..b5a2021d87b4d6b267a9fa9678d338f74bd0931c 100644
--- a/chrome/test/webdriver/commands/webelement_commands.cc
+++ b/chrome/test/webdriver/commands/webelement_commands.cc
@@ -15,6 +15,14 @@
namespace webdriver {
+WebElementCommand::WebElementCommand(
+ const std::vector<std::string>& path_segments,
+ const DictionaryValue* const parameters)
+ : WebDriverCommand(path_segments, parameters),
+ path_segments_(path_segments) {}
+
+WebElementCommand::~WebElementCommand() {}
+
bool WebElementCommand::Init(Response* const response) {
if (!WebDriverCommand::Init(response))
return false;
@@ -84,6 +92,25 @@ bool WebElementCommand::GetElementSize(int* width, int* height) {
dict->GetInteger("height", height);
}
+bool WebElementCommand::RequiresValidTab() {
+ return true;
+}
+
+ElementValueCommand::ElementValueCommand(
+ const std::vector<std::string>& path_segments,
+ DictionaryValue* parameters)
+ : WebElementCommand(path_segments, parameters) {}
+
+ElementValueCommand::~ElementValueCommand() {}
+
+bool ElementValueCommand::DoesGet() {
+ return true;
+}
+
+bool ElementValueCommand::DoesPost() {
+ return true;
+}
+
void ElementValueCommand::ExecuteGet(Response* const response) {
Value* unscoped_result = NULL;
ListValue args;
@@ -143,6 +170,17 @@ void ElementValueCommand::ExecutePost(Response* const response) {
response->set_status(kSuccess);
}
+ElementTextCommand::ElementTextCommand(
+ const std::vector<std::string>& path_segments,
+ DictionaryValue* parameters)
+ : WebElementCommand(path_segments, parameters) {}
+
+ElementTextCommand::~ElementTextCommand() {}
+
+bool ElementTextCommand::DoesGet() {
+ return true;
+}
+
void ElementTextCommand::ExecuteGet(Response* const response) {
Value* unscoped_result = NULL;
ListValue args;

Powered by Google App Engine
This is Rietveld 408576698