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

Unified Diff: chrome/test/chromedriver/element_commands.cc

Issue 13870016: [chromedriver] Fix nested frame issue for command getElementLocationOnceScrolledIntoView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Just rebase. Created 7 years, 8 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 | « no previous file | chrome/test/chromedriver/element_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/chromedriver/element_commands.cc
diff --git a/chrome/test/chromedriver/element_commands.cc b/chrome/test/chromedriver/element_commands.cc
index 209e4ddf0c0bfcf92be9bb63d72c0676ba2f3b85..88976e3c5f310843029b52ab0211f8762edc30c9 100644
--- a/chrome/test/chromedriver/element_commands.cc
+++ b/chrome/test/chromedriver/element_commands.cc
@@ -371,13 +371,13 @@ Status ExecuteGetElementLocationOnceScrolledIntoView(
const std::string& element_id,
const base::DictionaryValue& params,
scoped_ptr<base::Value>* value) {
- base::ListValue args;
- args.Append(CreateElement(element_id));
- return web_view->CallFunction(
- session->GetCurrentFrameId(),
- webdriver::atoms::asString(webdriver::atoms::GET_LOCATION_IN_VIEW),
- args,
- value);
+ WebPoint location;
+ Status status = ScrollElementIntoView(
+ session, web_view, element_id, &location);
+ if (status.IsError())
+ return status;
+ value->reset(CreateValueFrom(location));
+ return Status(kOk);
}
Status ExecuteGetElementSize(
« no previous file with comments | « no previous file | chrome/test/chromedriver/element_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698