mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Auto merge of #13612 - szeged:test-api-impl, r=jdm
WebBluetooth Test API and tests <!-- Please describe your changes on the following line: --> This patch depends on the [devices mock device support PR](https://github.com/servo/devices/pull/17). After it lands, the Cargo files can be updated. 1. Adjust to the changes in [devices mock device support PR](https://github.com/servo/devices/pull/17). 2. WebBluetooth Test API implementation. Based on : https://webbluetoothcg.github.io/web-bluetooth/tests.html 3. Wpt tests for the already landed WebBluetooth functions. <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors <!-- Either: --> - [x] There are tests for these changes <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13612) <!-- Reviewable:end -->
This commit is contained in:
commit
dae007fd16
253 changed files with 5456 additions and 24 deletions
|
@ -45,6 +45,7 @@ use dom::performance::Performance;
|
|||
use dom::promise::Promise;
|
||||
use dom::screen::Screen;
|
||||
use dom::storage::Storage;
|
||||
use dom::testrunner::TestRunner;
|
||||
use euclid::{Point2D, Rect, Size2D};
|
||||
use fetch;
|
||||
use ipc_channel::ipc::{self, IpcSender};
|
||||
|
@ -239,6 +240,8 @@ pub struct Window {
|
|||
|
||||
/// All the MediaQueryLists we need to update
|
||||
media_query_lists: WeakMediaQueryListVec,
|
||||
|
||||
test_runner: MutNullableHeap<JS<TestRunner>>,
|
||||
}
|
||||
|
||||
impl Window {
|
||||
|
@ -881,6 +884,10 @@ impl WindowMethods for Window {
|
|||
fn Fetch(&self, input: RequestOrUSVString, init: &RequestInit) -> Rc<Promise> {
|
||||
fetch::Fetch(&self.upcast(), input, init)
|
||||
}
|
||||
|
||||
fn TestRunner(&self) -> Root<TestRunner> {
|
||||
self.test_runner.or_init(|| TestRunner::new(self.upcast()))
|
||||
}
|
||||
}
|
||||
|
||||
impl Window {
|
||||
|
@ -1588,6 +1595,7 @@ impl Window {
|
|||
error_reporter: error_reporter,
|
||||
scroll_offsets: DOMRefCell::new(HashMap::new()),
|
||||
media_query_lists: WeakMediaQueryListVec::new(),
|
||||
test_runner: Default::default(),
|
||||
};
|
||||
|
||||
WindowBinding::Wrap(runtime.cx(), win)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue