mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 939084 - Intermittent browser_social_chatwindow_resize.js, r=felipe
--HG-- extra : rebase_source : 4a9bc4113584492fd9ff76dd58824d0d13d6b4ff
This commit is contained in:
parent
9b8a8f628f
commit
087271ab47
@ -555,12 +555,24 @@ function resizeAndCheckWidths(first, second, third, checks, cb) {
|
||||
resizeWindowToChatAreaWidth(width, function(sizedOk) {
|
||||
checkPopup();
|
||||
ok(sizedOk, count+": window resized correctly");
|
||||
if (sizedOk) {
|
||||
let numVisible = [first, second, third].filter(function(item) !item.collapsed).length;
|
||||
is(numVisible, numExpectedVisible, count + ": " + "correct number of chats visible");
|
||||
function collapsedObserver(r, m) {
|
||||
if ([first, second, third].filter(function(item) !item.collapsed).length == numExpectedVisible) {
|
||||
if (m) {
|
||||
m.disconnect();
|
||||
}
|
||||
ok(true, count + ": " + "correct number of chats visible");
|
||||
info(">> Check " + count);
|
||||
resizeAndCheckWidths(first, second, third, checks, cb);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (!collapsedObserver()) {
|
||||
let m = new MutationObserver(collapsedObserver);
|
||||
m.observe(first, {attributes: true });
|
||||
m.observe(second, {attributes: true });
|
||||
m.observe(third, {attributes: true });
|
||||
}
|
||||
info(">> Check " + count);
|
||||
resizeAndCheckWidths(first, second, third, checks, cb);
|
||||
}, count);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user