Bug 1440537 - Fix docshell swap test to not rely on cross-docgroup flushing. r=bzbarsky

This flush used to happen from snapshotWindow's innerWidth / innerHeight /
scroll* getters.

Differential Revision: https://phabricator.services.mozilla.com/D28303
This commit is contained in:
Emilio Cobos Álvarez 2019-04-20 19:42:30 +02:00
Родитель 78fcdc6414
Коммит bf82ff6c77
1 изменённых файлов: 3 добавлений и 0 удалений

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

@ -117,6 +117,9 @@
l3.detach();
l4.detach();
// swapDocShells reflows asynchronously, ensure layout is
// clean so that the viewport of f1 is the right size.
$("f1").getBoundingClientRect();
var s1_new = snapshotWindow($("f1").contentWindow);
var [same, first, second] = compareSnapshots(s1_new, s2, true);
ok(same, "Should reflow on swap. Expected " + second + " but got " + first);