mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Fix resize event is not fired for window in headless mode (#26194)
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
aeb2503fdb
commit
faaf9e9323
4 changed files with 60 additions and 4 deletions
|
@ -14142,6 +14142,13 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"window_resizeTo.html": [
|
||||
"87d60498e80bcd01b5790feb3f9e104410cb6e1b",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"window_resize_not_triggered_on_load.html": [
|
||||
"f551f67ee91f25c7e05c868dbbcad5cb11c93645",
|
||||
[
|
||||
|
|
16
tests/wpt/mozilla/tests/mozilla/window_resizeTo.html
Normal file
16
tests/wpt/mozilla/tests/mozilla/window_resizeTo.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>Verify that the resize event is fired when the window is resized (particularly in headless mode)</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
async_test(function (t) {
|
||||
window.onresize = t.step_func(function () {
|
||||
assert_equals(window.innerWidth, 200);
|
||||
assert_equals(window.innerHeight, 200);
|
||||
t.done();
|
||||
});
|
||||
|
||||
window.resizeTo(200, 200);
|
||||
}, "onresize");
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue