mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 09:47:35 +00:00
LibWeb: Ensure DOMRect top, bottom, left and right handle NaN correctly
This commit is contained in:
parent
b03c94c26e
commit
1560bfc6c9
3 changed files with 47 additions and 4 deletions
|
@ -26,6 +26,18 @@
|
|||
// 4. Creating a DOMRect with DOMRect.fromRect()
|
||||
testPart(() => Rect.fromRect({ x: 10, y: 20, width: 30, height: 40 }));
|
||||
|
||||
// 5. Creating a DOMRect with NaN x value
|
||||
testPart(() => new Rect(NaN, 20, 30, 40));
|
||||
|
||||
// 6. Creating a DOMRect with NaN y value
|
||||
testPart(() => new Rect(10, NaN, 30, 40));
|
||||
|
||||
// 7. Creating a DOMRect with NaN width value
|
||||
testPart(() => new Rect(10, 20, NaN, 40));
|
||||
|
||||
// 8. Creating a DOMRect with NaN height value
|
||||
testPart(() => new Rect(10, 20, 30, NaN));
|
||||
|
||||
testCounter = 1;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue