diff --git a/ports/glutin/window.rs b/ports/glutin/window.rs index 79582972de71..4e685cedf74c 100644 --- a/ports/glutin/window.rs +++ b/ports/glutin/window.rs @@ -834,7 +834,10 @@ impl WindowMethods for Window { WindowKind::Window(ref window) => { window.set_inner_size(size.width as u32, size.height as u32) } - WindowKind::Headless(..) => {} + WindowKind::Headless(..) => { + let dimensions = TypedSize2D::new(size.width as u32, size.height as u32); + self.event_queue.borrow_mut().push(WindowEvent::Resize(dimensions)); + } } } diff --git a/tests/wpt/mozilla/meta/MANIFEST.json b/tests/wpt/mozilla/meta/MANIFEST.json index 8fdbc6e596e0..f6b53a5a8ed9 100644 --- a/tests/wpt/mozilla/meta/MANIFEST.json +++ b/tests/wpt/mozilla/meta/MANIFEST.json @@ -19540,6 +19540,12 @@ {} ] ], + "mozilla/resizeTo.html": [ + [ + "/_mozilla/mozilla/resizeTo.html", + {} + ] + ], "mozilla/response-data-brotli.htm": [ [ "/_mozilla/mozilla/response-data-brotli.htm", @@ -30923,6 +30929,10 @@ "df273cf90396cc2d3d3159ce72176122ab9518e5", "support" ], + "mozilla/resizeTo.html": [ + "7baa224e1fefd5c288e5bf3a671bfdda13281e18", + "testharness" + ], "mozilla/resources/background-green.css": [ "bb230110dd1cf4647e020d7172bc375e972c7b41", "support" diff --git a/tests/wpt/mozilla/tests/mozilla/resizeTo.html b/tests/wpt/mozilla/tests/mozilla/resizeTo.html new file mode 100644 index 000000000000..104f6c92468b --- /dev/null +++ b/tests/wpt/mozilla/tests/mozilla/resizeTo.html @@ -0,0 +1,16 @@ + + +