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

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: 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') | chrome/test/chromedriver/element_util.cc » ('J')
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..b1f0994600b7ab5e5a2e505316302b73b4e0587b 100644
--- a/chrome/test/chromedriver/element_commands.cc
+++ b/chrome/test/chromedriver/element_commands.cc
@@ -413,13 +413,17 @@ 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 'name'");
kkania 2013/04/18 00:38:52 propertyName
chrisgao (Use stgao instead) 2013/04/18 01:39:48 Done.
+ std::string property_value;
+ Status status = GetElementEffectiveStyle(
+ session->GetCurrentFrameId(), 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') | chrome/test/chromedriver/element_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698