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

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

Issue 6694007: Small test and ChromeDriver fixes to enable additional tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 9 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 9471e4be47cd0b93362798336d8fc23de01d587e..b956a4e7493d4bb5b4286981ae0b2f72c84fc418 100644
--- a/chrome/test/webdriver/commands/webelement_commands.cc
+++ b/chrome/test/webdriver/commands/webelement_commands.cc
@@ -155,16 +155,12 @@ bool ElementDisplayedCommand::DoesGet() {
}
void ElementDisplayedCommand::ExecuteGet(Response* const response) {
- scoped_ptr<ListValue> args(new ListValue);
- args->Append(element.ToValue());
-
- std::string script = base::StringPrintf(
- "return (%s).apply(null, arguments);", atoms::IS_DISPLAYED);
-
- Value* result = NULL;
- ErrorCode status = session_->ExecuteScript(script, args.get(), &result);
+ bool is_displayed;
+ ErrorCode status = session_->IsElementDisplayed(
+ session_->current_target(), element, &is_displayed);
+ if (status == kSuccess)
+ response->SetValue(Value::CreateBooleanValue(is_displayed));
response->SetStatus(status);
- response->SetValue(result);
}
///////////////////// ElementEnabledCommand ////////////////////

Powered by Google App Engine
This is Rietveld 408576698