mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 860994 - Fixup intermittent context menu failing tests
--HG-- extra : rebase_source : f577ee38b6e22398b4a8a160cd18dcfcfd3d3169
This commit is contained in:
parent
124d1b4696
commit
0c8adb11bd
@ -382,14 +382,16 @@ MenuPopup.prototype = {
|
||||
let self = this;
|
||||
this._panel.addEventListener("transitionend", function () {
|
||||
self._panel.removeEventListener("transitionend", arguments.callee);
|
||||
self._panel.removeAttribute("hiding");
|
||||
self._panel.hidden = true;
|
||||
self._popupState = null;
|
||||
|
||||
let event = document.createEvent("Events");
|
||||
event.initEvent("popuphidden", true, false);
|
||||
document.dispatchEvent(event);
|
||||
});
|
||||
|
||||
this._panel.removeAttribute("showing");
|
||||
this._panel.setAttribute("hiding", "true");
|
||||
setTimeout(()=>this._panel.removeAttribute("showing"), 0);
|
||||
},
|
||||
|
||||
_position: function _position(aPositionOptions) {
|
||||
@ -408,7 +410,6 @@ MenuPopup.prototype = {
|
||||
let width = this._popup.boxObject.width;
|
||||
let height = this._popup.boxObject.height;
|
||||
let halfWidth = width / 2;
|
||||
let halfHeight = height / 2;
|
||||
let screenWidth = ContentAreaObserver.width;
|
||||
let screenHeight = ContentAreaObserver.height;
|
||||
|
||||
|
@ -347,7 +347,9 @@ gTests.push({
|
||||
|
||||
checkContextMenuPositionRange(ContextMenuUI._panel, 65, 80, notificationHeight + 155, notificationHeight + 180);
|
||||
|
||||
ContextMenuUI._menuPopup.hide();
|
||||
promise = waitForEvent(document, "popuphidden");
|
||||
ContextMenuUI.hide();
|
||||
yield promise;
|
||||
|
||||
Browser.closeTab(Browser.selectedTab);
|
||||
}
|
||||
@ -497,6 +499,7 @@ gTests.push({
|
||||
ok(imagetab != null, "tab created");
|
||||
|
||||
Browser.closeTab(imagetab);
|
||||
yield waitForEvent(imagetab.chromeTab.parentNode, "TabRemove");
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -474,19 +474,21 @@ function runTests() {
|
||||
waitForExplicitFinish();
|
||||
Task.spawn(function() {
|
||||
while((gCurrentTest = gTests.shift())){
|
||||
info(gCurrentTest.desc);
|
||||
info("START " + gCurrentTest.desc);
|
||||
try {
|
||||
if ('function' == typeof gCurrentTest.setUp) {
|
||||
info("SETUP " + gCurrentTest.desc);
|
||||
yield Task.spawn(gCurrentTest.setUp.bind(gCurrentTest));
|
||||
}
|
||||
yield Task.spawn(gCurrentTest.run.bind(gCurrentTest));
|
||||
if ('function' == typeof gCurrentTest.tearDown) {
|
||||
info("TEARDOWN " + gCurrentTest.desc);
|
||||
yield Task.spawn(gCurrentTest.tearDown.bind(gCurrentTest));
|
||||
}
|
||||
} catch (ex) {
|
||||
ok(false, "runTests: Task failed - " + ex);
|
||||
} finally {
|
||||
info("END "+gCurrentTest.desc);
|
||||
info("END " + gCurrentTest.desc);
|
||||
}
|
||||
}
|
||||
finish();
|
||||
|
@ -160,7 +160,6 @@ menulist {
|
||||
.menu-container {
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
transition: opacity ease-out 0.2s;
|
||||
}
|
||||
|
||||
.menu-container[showingfrom="below"] {
|
||||
@ -171,10 +170,15 @@ menulist {
|
||||
transform: translateY(-@metro_spacing_normal@);
|
||||
}
|
||||
|
||||
.menu-container[hiding],
|
||||
.menu-container[showing] {
|
||||
transition: opacity ease-out 0.2s,
|
||||
transform ease-out 0.2s;
|
||||
}
|
||||
|
||||
.menu-container[showing] {
|
||||
opacity: 1;
|
||||
transform: none;
|
||||
transition: all ease-out 0.2s;
|
||||
}
|
||||
|
||||
.menu-popup > richlistbox {
|
||||
|
Loading…
Reference in New Issue
Block a user