move incorrect organized test
This commit is contained in:
Родитель
39d967c067
Коммит
3116dc5386
32
suite.js
32
suite.js
|
@ -236,6 +236,22 @@ void function() {
|
|||
window.scrollTo(pX, pY);
|
||||
}
|
||||
});
|
||||
test('clamped to top of page', function() {
|
||||
var big = cleanup(document.createElement('div'));
|
||||
big.style.height = '200vh'; // 2x view height
|
||||
document.body.appendChild(big);
|
||||
document.documentElement.scrollTop = document.documentElement.scrollHeight / 2;
|
||||
|
||||
dialog.style.height = document.documentElement.scrollHeight + 200 + 'px';
|
||||
dialog.showModal();
|
||||
|
||||
var visibleRect = dialog.getBoundingClientRect();
|
||||
assert.equal(visibleRect.top, 0, 'large dialog should be visible at top of page');
|
||||
|
||||
var style = window.getComputedStyle(dialog);
|
||||
assert.equal(style.top, document.documentElement.scrollTop + 'px',
|
||||
'large dialog should be absolutely positioned at scroll top');
|
||||
});
|
||||
});
|
||||
|
||||
suite('backdrop', function() {
|
||||
|
@ -266,22 +282,6 @@ void function() {
|
|||
backdrop.click();
|
||||
assert.equal(clickFired, 1);
|
||||
});
|
||||
test('clamped to top of page', function() {
|
||||
var big = cleanup(document.createElement('div'));
|
||||
big.style.height = '200vh'; // 2x view height
|
||||
document.body.appendChild(big);
|
||||
document.documentElement.scrollTop = document.documentElement.scrollHeight / 2;
|
||||
|
||||
dialog.style.height = document.documentElement.scrollHeight + 200 + 'px';
|
||||
dialog.showModal();
|
||||
|
||||
var visibleRect = dialog.getBoundingClientRect();
|
||||
assert.equal(visibleRect.top, 0, 'large dialog should be visible at top of page');
|
||||
|
||||
var style = window.getComputedStyle(dialog);
|
||||
assert.equal(style.top, document.documentElement.scrollTop + 'px',
|
||||
'large dialog should be absolutely positioned at scroll top');
|
||||
});
|
||||
});
|
||||
|
||||
suite('form focus', function() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче