mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Update web-platform-tests to revision d23db97703021bdeb4ec21ff5ce3e9de54dd4d85
This commit is contained in:
parent
54d2b7de29
commit
77784e512e
163 changed files with 3806 additions and 3068 deletions
|
@ -46,10 +46,14 @@ function checkNotVerticallyCentered(dialog) {
|
|||
|
||||
function checkVerticallyCentered(dialog) {
|
||||
var centeredTop = (window.innerHeight - dialog.offsetHeight) / 2;
|
||||
assert_equals(dialog.getBoundingClientRect().top, centeredTop);
|
||||
// Using approx equals because getBoundingClientRect() and centeredTop
|
||||
// are calculated by different parts of the engine. Due to the loss
|
||||
// of precision, the numbers might not equal exactly.
|
||||
assert_approx_equals(dialog.getBoundingClientRect().top, centeredTop, 1);
|
||||
}
|
||||
|
||||
function reset() {
|
||||
document.body.style.width = "auto";
|
||||
if (dialog.open)
|
||||
dialog.close();
|
||||
dialog.remove();
|
||||
|
@ -127,8 +131,6 @@ test(function() {
|
|||
dialog.showModal();
|
||||
checkVerticallyCentered(dialog);
|
||||
|
||||
// Set back original value to 'width'.
|
||||
document.body.style.width = 'auto';
|
||||
}, "The dialog should be centered regardless of the presence of a horizontal scrollbar.");
|
||||
|
||||
test(function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue