зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1514429 Part 2: Update a test that assumes innerWidth should change while zooming. r=botond
This test treats innerWidth as being related to the visual viewport, which is no longer is. This modifies the test to assert that innerWidth and innerHeight are unchanged by modifications to the visual viewport. Depends on D42940 Differential Revision: https://phabricator.services.mozilla.com/D54350 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
6f08dccc67
Коммит
1e6383d32e
|
@ -24,18 +24,8 @@ function run()
|
|||
|
||||
var utils = SpecialPowers.getDOMWindowUtils(window);
|
||||
utils.setVisualViewportSize(newWidth, newHeight);
|
||||
is(window.innerWidth, newWidth, "innerWidth not updated to viewport width");
|
||||
is(window.innerHeight, newHeight, "innerHeight not updated to viewport height");
|
||||
|
||||
var innerWidthGetter = Object.getOwnPropertyDescriptor(window, "innerWidth").get;
|
||||
var innerHeightGetter = Object.getOwnPropertyDescriptor(window, "innerHeight").get;
|
||||
|
||||
window.innerWidth = oldWidth;
|
||||
window.innerHeight = oldHeight;
|
||||
is(window.innerWidth, oldWidth, "Should have redefined innerWidth");
|
||||
is(window.innerHeight, oldHeight, "Should have redefined innerWidth");
|
||||
is(innerWidthGetter.call(window), newWidth, "innerWidth clobbered by direct set");
|
||||
is(innerHeightGetter.call(window), newHeight, "innerHeight clobbered by direct set");
|
||||
is(window.innerWidth, oldWidth, "innerWidth unaffected by changes to visual viewport size");
|
||||
is(window.innerHeight, oldHeight, "innerHeight unaffected by changes to visual viewport size");
|
||||
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче