Bug 1461463 - [geckodriver] Empty response value should be null and not {}. r=ato

WebDriver commands which do not return a value have to send null.
But currently geckodriver returns an empty object.

MozReview-Commit-ID: EEmNlbmxu5n

--HG--
extra : rebase_source : aaa09cb5d8470b9669b8046ead62d709111f7f04
This commit is contained in:
Henrik Skupin 2018-05-17 15:56:39 +02:00
parent 892b245929
commit 8b962cb10a

View File

@ -26,12 +26,12 @@ impl WebDriverResponse {
CloseWindow(ref x) => json::encode(&x.to_json()),
Cookie(ref x) => json::encode(x),
Cookies(ref x) => json::encode(x),
DeleteSession => Ok("{}".to_string()),
DeleteSession => Ok("null".to_string()),
ElementRect(ref x) => json::encode(x),
Generic(ref x) => json::encode(x),
NewSession(ref x) => json::encode(x),
Timeouts(ref x) => json::encode(x),
Void => Ok("{}".to_string()),
Void => Ok("null".to_string()),
WindowRect(ref x) => json::encode(&x.to_json()),
}.unwrap();