blob: e334bba9c0be199e940625053a6c40690ccb662e [file] [log] [blame]
This test checks getBoundingClientRect() on rectangles
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS successfullyParsed is true
TEST COMPLETE
Checking a rectangle of absolute size at absolute coordinates:
PASS r1.left.toFixed(2) is "20.00"
PASS r1.top.toFixed(2) is "30.00"
PASS r1.width.toFixed(2) is "40.00"
PASS r1.height.toFixed(2) is "50.00"
PASS r1.right.toFixed(2) is "60.00"
PASS r1.bottom.toFixed(2) is "80.00"
Checking a resized rectangle at relative coordinates:
PASS r2.left.toFixed(2) is "180.00"
PASS r2.top.toFixed(2) is "15.00"
PASS r2.width.toFixed(2) is "160.00"
PASS r2.height.toFixed(2) is "25.00"
PASS r2.right.toFixed(2) is "340.00"
PASS r2.bottom.toFixed(2) is "40.00"
Checking rectangles with overflow:
PASS r3.left.toFixed(2) is "300.00"
PASS r3.top.toFixed(2) is "0.00"
PASS r3.width.toFixed(2) is "210.00"
PASS r3.height.toFixed(2) is "50.00"
PASS r3.right.toFixed(2) is "510.00"
PASS r3.bottom.toFixed(2) is "50.00"
PASS r4.left.toFixed(2) is "300.00"
PASS r4.top.toFixed(2) is "50.00"
PASS r4.width.toFixed(2) is "210.00"
PASS r4.height.toFixed(2) is "60.00"
PASS r4.right.toFixed(2) is "510.00"
PASS r4.bottom.toFixed(2) is "110.00"
PASS successfullyParsed is true
TEST COMPLETE