зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1617369 - Reformat recent rust changes with rustfmt r=webdriver-reviewers,whimboo
# ignore-this-changeset Depends on D76451 Differential Revision: https://phabricator.services.mozilla.com/D76663
This commit is contained in:
Родитель
e8574b55a1
Коммит
f69840fd80
|
@ -280,7 +280,6 @@ impl WrVecU8 {
|
|||
vec.extend_from_slice(bytes);
|
||||
*self = Self::from_vec(vec);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
|
|
|
@ -232,8 +232,6 @@ pub struct LogOptions {
|
|||
pub level: Option<logging::Level>,
|
||||
}
|
||||
|
||||
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use serde_json::json;
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
use crate::android::AndroidHandler;
|
||||
use crate::command::{
|
||||
AddonInstallParameters, AddonUninstallParameters, GeckoContextParameters,
|
||||
GeckoExtensionCommand, GeckoExtensionRoute, XblLocatorParameters,
|
||||
CHROME_ELEMENT_KEY,
|
||||
GeckoExtensionCommand, GeckoExtensionRoute, XblLocatorParameters, CHROME_ELEMENT_KEY,
|
||||
};
|
||||
use marionette_rs::common::{
|
||||
Cookie as MarionetteCookie, Date as MarionetteDate, Frame as MarionetteFrame,
|
||||
|
@ -41,8 +40,8 @@ use webdriver::command::WebDriverCommand::{
|
|||
GetPageSource, GetTimeouts, GetTitle, GetWindowHandle, GetWindowHandles, GetWindowRect, GoBack,
|
||||
GoForward, IsDisplayed, IsEnabled, IsSelected, MaximizeWindow, MinimizeWindow, NewSession,
|
||||
NewWindow, PerformActions, Print, Refresh, ReleaseActions, SendAlertText, SetTimeouts,
|
||||
SetWindowRect, Status, SwitchToFrame, SwitchToParentFrame, SwitchToWindow, TakeElementScreenshot,
|
||||
TakeScreenshot,
|
||||
SetWindowRect, Status, SwitchToFrame, SwitchToParentFrame, SwitchToWindow,
|
||||
TakeElementScreenshot, TakeScreenshot,
|
||||
};
|
||||
use webdriver::command::{
|
||||
ActionsParameters, AddCookieParameters, GetNamedCookieParameters, GetParameters,
|
||||
|
|
|
@ -337,7 +337,7 @@ impl<U: WebDriverExtensionRoute> WebDriverMessage<U> {
|
|||
);
|
||||
let element = WebElement(element_id.as_str().into());
|
||||
WebDriverCommand::TakeElementScreenshot(element)
|
||||
},
|
||||
}
|
||||
Route::Print => WebDriverCommand::Print(serde_json::from_str(raw_body)?),
|
||||
Route::Status => WebDriverCommand::Status,
|
||||
Route::Extension(ref extension) => extension.command(params, &body_data)?,
|
||||
|
@ -1211,7 +1211,7 @@ mod tests {
|
|||
assert_de(&new_window, json);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[test]
|
||||
fn test_json_print_defaults() {
|
||||
let params = PrintParameters::default();
|
||||
assert_de(¶ms, json!({}));
|
||||
|
|
|
@ -279,11 +279,7 @@ pub(crate) fn standard_routes<U: WebDriverExtensionRoute>() -> Vec<(Method, &'st
|
|||
"/session/{sessionId}/actions",
|
||||
Route::ReleaseActions,
|
||||
),
|
||||
(
|
||||
Method::POST,
|
||||
"/session/{sessionId}/print",
|
||||
Route::Print,
|
||||
),
|
||||
(Method::POST, "/session/{sessionId}/print", Route::Print),
|
||||
(Method::GET, "/status", Route::Status),
|
||||
];
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче