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

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: address Dennis' comments 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
« no previous file with comments | « chrome/test/webdriver/commands/mouse_commands.cc ('k') | chrome/test/webdriver/run_webdriver_tests.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..1f4e4dd6beb68641e456d0f15f8673e3b50c1ed1 100644
--- a/chrome/test/webdriver/commands/webelement_commands.cc
+++ b/chrome/test/webdriver/commands/webelement_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.
@@ -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 ////////////////////
« no previous file with comments | « chrome/test/webdriver/commands/mouse_commands.cc ('k') | chrome/test/webdriver/run_webdriver_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698