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

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

Issue 14188022: [chromedriver] Fix bug in command for GetElementValueOfCSSProperty. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
Index: chrome/test/chromedriver/element_util.cc
diff --git a/chrome/test/chromedriver/element_util.cc b/chrome/test/chromedriver/element_util.cc
index b230e781fdf6f4ebd73dc988c3b48954bcbb8afd..a3c3c42fe7c352b39e85def181150ffbaa4b2d04 100644
--- a/chrome/test/chromedriver/element_util.cc
+++ b/chrome/test/chromedriver/element_util.cc
@@ -158,26 +158,6 @@ Status ScrollElementRegionIntoViewHelper(
return Status(kOk);
}
-Status GetElementEffectiveStyle(
- const std::string& frame,
- WebView* web_view,
- const std::string& element_id,
- const std::string& property,
- std::string* value) {
- base::ListValue args;
- args.Append(CreateElement(element_id));
- args.AppendString(property);
- scoped_ptr<base::Value> result;
- Status status = web_view->CallFunction(
- frame, webdriver::atoms::asString(webdriver::atoms::GET_EFFECTIVE_STYLE),
- args, &result);
- if (status.IsError())
- return status;
- if (!result->GetAsString(value))
- return Status(kUnknownError, "fail to parse value of GET_EFFECTIVE_STYLE");
- return Status(kOk);
-}
-
Status GetElementBorder(
const std::string& frame,
WebView* web_view,
@@ -340,6 +320,26 @@ Status GetElementClickableLocation(
return Status(kOk);
}
+Status GetElementEffectiveStyle(
+ const std::string& frame,
kkania 2013/04/18 00:38:52 i think it would make sense for the webview to be
chrisgao (Use stgao instead) 2013/04/18 01:39:48 Fix in the established convention here.
+ WebView* web_view,
+ const std::string& element_id,
+ const std::string& property,
+ std::string* value) {
+ base::ListValue args;
+ args.Append(CreateElement(element_id));
+ args.AppendString(property);
+ scoped_ptr<base::Value> result;
+ Status status = web_view->CallFunction(
+ frame, webdriver::atoms::asString(webdriver::atoms::GET_EFFECTIVE_STYLE),
+ args, &result);
+ if (status.IsError())
+ return status;
+ if (!result->GetAsString(value))
+ return Status(kUnknownError, "fail to parse value of GET_EFFECTIVE_STYLE");
kkania 2013/04/18 00:38:52 failed
chrisgao (Use stgao instead) 2013/04/18 01:39:48 Done.
+ return Status(kOk);
+}
+
Status GetElementRegion(
Session* session,
WebView* web_view,

Powered by Google App Engine
This is Rietveld 408576698