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

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

Issue 14188022: [chromedriver] Fix bug in command for GetElementValueOfCSSProperty. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments. 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 8fb39b9ccbadfa0adb4481d1a72055d4bbc44531..209e4ddf0c0bfcf92be9bb63d72c0676ba2f3b85 100644
--- a/chrome/test/chromedriver/element_commands.cc
+++ b/chrome/test/chromedriver/element_commands.cc
@@ -413,13 +413,16 @@ Status ExecuteGetElementValueOfCSSProperty(
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_EFFECTIVE_STYLE),
- args,
- value);
+ std::string property_name;
+ if (!params.GetString("propertyName", &property_name))
+ return Status(kUnknownError, "missing 'propertyName'");
+ std::string property_value;
+ Status status = GetElementEffectiveStyle(
+ session, web_view, element_id, property_name, &property_value);
+ if (status.IsError())
+ return status;
+ value->reset(new base::StringValue(property_value));
+ return Status(kOk);
}
Status ExecuteElementEquals(
« 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