From a81ddd5c180c2129bf5c9923adf318e6cf5a3549 Mon Sep 17 00:00:00 2001 From: Euclid Ye Date: Fri, 4 Jul 2025 23:41:11 +0800 Subject: [PATCH] Rename original `window_resizeTo.html` to `window_resize_event.html` & Fix wrong usage of `innerHeight` & add new test (#37856) 1. rename original `window_resizeTo.html` to `window_resize_event.html` to reflect the purpose. Also change {innerWidth, innerHeight} to {outerWidth, outerHeight} to match spec. 2. Add a new test `window_resizeTo.html` for https://github.com/servo/servo/pull/37848 Testing: new test always fails because of https://github.com/servo/servo/issues/37824, which gives inaccurate outerHeight. Signed-off-by: Euclid Ye --- tests/wpt/mozilla/meta/MANIFEST.json | 9 +++++++- .../meta/mozilla/window_resizeTo.html.ini | 3 +++ .../tests/mozilla/window_resizeTo.html | 21 ++++++++----------- .../tests/mozilla/window_resize_event.html | 21 +++++++++++++++++++ 4 files changed, 41 insertions(+), 13 deletions(-) create mode 100644 tests/wpt/mozilla/meta/mozilla/window_resizeTo.html.ini create mode 100644 tests/wpt/mozilla/tests/mozilla/window_resize_event.html diff --git a/tests/wpt/mozilla/meta/MANIFEST.json b/tests/wpt/mozilla/meta/MANIFEST.json index 0fd6d74c3b1..08837195da8 100644 --- a/tests/wpt/mozilla/meta/MANIFEST.json +++ b/tests/wpt/mozilla/meta/MANIFEST.json @@ -14430,7 +14430,14 @@ ] ], "window_resizeTo.html": [ - "3f6c5a610d52b64bf4457d478b929e95d79e9ab8", + "d104be2bc840eecc7c32e27a6fdf1850d945f1e5", + [ + null, + {} + ] + ], + "window_resize_event.html": [ + "68222f978909022ae1abfbdce6c4ea1c5787c554", [ null, {} diff --git a/tests/wpt/mozilla/meta/mozilla/window_resizeTo.html.ini b/tests/wpt/mozilla/meta/mozilla/window_resizeTo.html.ini new file mode 100644 index 00000000000..366ab6c0b81 --- /dev/null +++ b/tests/wpt/mozilla/meta/mozilla/window_resizeTo.html.ini @@ -0,0 +1,3 @@ +[window_resizeTo.html] + [Correctly resize outerWidth and outerHeight] + expected: FAIL diff --git a/tests/wpt/mozilla/tests/mozilla/window_resizeTo.html b/tests/wpt/mozilla/tests/mozilla/window_resizeTo.html index 3f6c5a610d5..d104be2bc84 100644 --- a/tests/wpt/mozilla/tests/mozilla/window_resizeTo.html +++ b/tests/wpt/mozilla/tests/mozilla/window_resizeTo.html @@ -1,21 +1,18 @@ -Verify that the resize event is fired when the window is resized (in popup) +Verify that the resize dimension is outerWidth & outerHeight diff --git a/tests/wpt/mozilla/tests/mozilla/window_resize_event.html b/tests/wpt/mozilla/tests/mozilla/window_resize_event.html new file mode 100644 index 00000000000..68222f97890 --- /dev/null +++ b/tests/wpt/mozilla/tests/mozilla/window_resize_event.html @@ -0,0 +1,21 @@ + + +Verify that the resize event is fired when the window is resized (in popup) + + +