This commit is contained in:
Sam Thorogood 2015-08-04 08:55:22 -07:00
Родитель 2858588d0e
Коммит 6a3588d872
1 изменённых файлов: 8 добавлений и 3 удалений

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

@ -27,8 +27,8 @@ void function() {
var expectedTop = (window.innerHeight - d.offsetHeight) / 2; var expectedTop = (window.innerHeight - d.offsetHeight) / 2;
var expectedLeft = (window.innerWidth - d.offsetWidth) / 2; var expectedLeft = (window.innerWidth - d.offsetWidth) / 2;
var rect = d.getBoundingClientRect(); var rect = d.getBoundingClientRect();
assert.closeTo(rect.top, expectedTop, 1); assert.closeTo(rect.top, expectedTop, 1, 'top should be nearby');
assert.closeTo(rect.left, expectedLeft, 1); assert.closeTo(rect.left, expectedLeft, 1, 'left should be nearby');
} }
/** /**
@ -423,7 +423,12 @@ void function() {
var value = 'ExpectedValue' + Math.random(); var value = 'ExpectedValue' + Math.random();
var form = document.createElement('form'); var form = document.createElement('form');
form.method = 'dialog'; try {
form.method = 'dialog';
} catch (e) {
// Setting the method directly throws an exception in <=IE9.
form.setAttribute('method', 'dialog');
}
dialog.appendChild(form); dialog.appendChild(form);
var input = document.createElement('input'); var input = document.createElement('input');