Bug 1637822 [wpt PR 23585] - Add inset inline properties tests for dialog centering tests, a=testonly

Automatic update from web-platform-tests
Add inset inline properties tests for dialog centering tests

--

wpt-commits: 2616c9d6e9e31c3ed90c3682fa8ff71f4b4b429a
wpt-pr: 23585
This commit is contained in:
sefeng 2020-05-21 10:22:01 +00:00 коммит произвёл moz-wptsync-bot
Родитель a4a7ccfd43
Коммит 301c73e51a
1 изменённых файлов: 13 добавлений и 1 удалений

Просмотреть файл

@ -42,7 +42,19 @@ function testDialogCentering(writingMode, containerWritingMode, dialogWritingMod
iframe.height = iframeHeight;
iframe.onload = t.step_func_done(() => {
const dialog = iframe.contentDocument.querySelector("dialog");
assert_equals(iframe.contentWindow.getComputedStyle(dialog)[property], numericValue + "px");
const dialogStyle = iframe.contentWindow.getComputedStyle(dialog);
assert_equals(dialogStyle[property], numericValue + "px");
assert_equals(dialogStyle['inset-inline-start'], "0px");
assert_equals(dialogStyle['inset-inline-end'], "0px");
const dialogWM = dialogWritingMode || containerWritingMode || writingMode || "horizontal-tb";
if (dialogWM.startsWith("vertical")) {
assert_equals(dialogStyle['top'], "0px");
assert_equals(dialogStyle['bottom'], "0px");
} else {
assert_equals(dialogStyle['left'], "0px");
assert_equals(dialogStyle['right'], "0px");
}
});
document.body.appendChild(iframe);
}, writingMode + (containerWritingMode ? ` (container ${containerWritingMode})` : "") +