geckodriver: Fix GetCSSValue message to send correct key 'propertyName'

Source-Repo: https://github.com/mozilla/geckodriver
Source-Revision: 68c483a934112a3342167dd1e82707f8445da55a

--HG--
extra : rebase_source : 44bd99cc8bf52a2f778a448dd9bd07d253f11242
This commit is contained in:
James Graham 2015-09-09 15:23:16 +01:00
Родитель e3c5c98b7d
Коммит 74743f3c6d
2 изменённых файлов: 9 добавлений и 3 удалений

Просмотреть файл

@ -100,5 +100,5 @@ fn main() {
launcher);
//TODO: what if binary isn't a valid path?
start(addr, MarionetteHandler::new(settings));
start(addr, MarionetteHandler::new(settings), vec![]);
}

Просмотреть файл

@ -27,7 +27,7 @@ use webdriver::command::WebDriverCommand::{
ElementClick, ElementTap, ElementClear, ElementSendKeys,
ExecuteScript, ExecuteAsyncScript, GetCookies, GetCookie, AddCookie,
DeleteCookies, DeleteCookie, SetTimeouts, DismissAlert,
AcceptAlert, GetAlertText, SendAlertText, TakeScreenshot};
AcceptAlert, GetAlertText, SendAlertText, TakeScreenshot, Extension};
use webdriver::command::{
GetParameters, WindowSizeParameters, SwitchToWindowParameters,
SwitchToFrameParameters, LocatorParameters, JavascriptCommandParameters,
@ -472,6 +472,9 @@ impl MarionetteSession {
}
DeleteSession => {
WebDriverResponse::DeleteSession
},
Extension(_) => {
panic!("No extensions implemented")
}
})
}
@ -798,7 +801,7 @@ impl ToMarionette for WebDriverMessage {
GetCSSValue(ref e, ref x) => {
let mut data = BTreeMap::new();
data.insert("id".to_string(), e.id.to_json());
data.insert("name".to_string(), x.to_json());
data.insert("propertyName".to_string(), x.to_json());
(Some("getElementValueOfCssProperty"), Some(Ok(Json::Object(data))))
},
GetElementText(ref x) => (Some("getElementText"), Some(x.to_marionette())),
@ -842,6 +845,9 @@ impl ToMarionette for WebDriverMessage {
data.insert("full".to_string(), Json::Boolean(false));
(Some("takeScreenshot"), Some(Ok(Json::Object(data))))
},
Extension(_) => {
panic!("No extensions implemented");
}
};
let name = try_opt!(opt_name,