mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Format script component
This commit is contained in:
parent
2ca7a13473
commit
c37a345dc9
357 changed files with 25485 additions and 18076 deletions
|
@ -15,7 +15,7 @@ use ipc_channel::ipc::IpcSender;
|
|||
use profile_traits::ipc;
|
||||
|
||||
// https://webbluetoothcg.github.io/web-bluetooth/tests#test-runner
|
||||
#[dom_struct]
|
||||
#[dom_struct]
|
||||
pub struct TestRunner {
|
||||
reflector_: Reflector,
|
||||
}
|
||||
|
@ -28,9 +28,11 @@ impl TestRunner {
|
|||
}
|
||||
|
||||
pub fn new(global: &GlobalScope) -> DomRoot<TestRunner> {
|
||||
reflect_dom_object(Box::new(TestRunner::new_inherited()),
|
||||
global,
|
||||
TestRunnerBinding::Wrap)
|
||||
reflect_dom_object(
|
||||
Box::new(TestRunner::new_inherited()),
|
||||
global,
|
||||
TestRunnerBinding::Wrap,
|
||||
)
|
||||
}
|
||||
|
||||
fn get_bluetooth_thread(&self) -> IpcSender<BluetoothRequest> {
|
||||
|
@ -42,14 +44,12 @@ impl TestRunnerMethods for TestRunner {
|
|||
// https://webbluetoothcg.github.io/web-bluetooth/tests#setBluetoothMockDataSet
|
||||
fn SetBluetoothMockDataSet(&self, dataSetName: DOMString) -> ErrorResult {
|
||||
let (sender, receiver) = ipc::channel(self.global().time_profiler_chan().clone()).unwrap();
|
||||
self.get_bluetooth_thread().send(BluetoothRequest::Test(String::from(dataSetName), sender)).unwrap();
|
||||
self.get_bluetooth_thread()
|
||||
.send(BluetoothRequest::Test(String::from(dataSetName), sender))
|
||||
.unwrap();
|
||||
match receiver.recv().unwrap().into() {
|
||||
Ok(()) => {
|
||||
Ok(())
|
||||
},
|
||||
Err(error) => {
|
||||
Err(Error::from(error))
|
||||
},
|
||||
Ok(()) => Ok(()),
|
||||
Err(error) => Err(Error::from(error)),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue