mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 963067 - 'Cut' in the cut, copy, paste menu is always active after a browser launch. r=jimm
This commit is contained in:
parent
e90c22e00c
commit
dc23e6347a
@ -167,6 +167,7 @@ var ContextMenuUI = {
|
||||
|
||||
for (let command of Array.slice(this.commands.childNodes)) {
|
||||
command.hidden = true;
|
||||
command.selected = false;
|
||||
}
|
||||
|
||||
let optionsAvailable = false;
|
||||
|
@ -874,6 +874,43 @@ gTests.push({
|
||||
}
|
||||
});
|
||||
|
||||
gTests.push({
|
||||
desc: "Bug 963067 - 'Cut' in the cut, copy, paste menu is always active " +
|
||||
"after a browser launch.",
|
||||
run: function test() {
|
||||
info(chromeRoot + "browser_context_menu_tests_02.html");
|
||||
yield addTab(chromeRoot + "browser_context_menu_tests_02.html");
|
||||
|
||||
purgeEventQueue();
|
||||
emptyClipboard();
|
||||
|
||||
ContextUI.dismiss();
|
||||
yield waitForCondition(() => !ContextUI.navbarVisible);
|
||||
|
||||
let tabWindow = Browser.selectedTab.browser.contentWindow;
|
||||
let input = tabWindow.document.getElementById("text3-input");
|
||||
let cutMenuItem = document.getElementById("context-cut");
|
||||
|
||||
input.select();
|
||||
|
||||
// Emulate RichListBox's behavior and set first item selected by default.
|
||||
cutMenuItem.selected = true;
|
||||
|
||||
let promise = waitForEvent(document, "popupshown");
|
||||
sendContextMenuClickToElement(tabWindow, input);
|
||||
yield promise;
|
||||
|
||||
ok(!cutMenuItem.hidden && !cutMenuItem.selected,
|
||||
"Cut menu item is visible and not selected.");
|
||||
|
||||
promise = waitForEvent(document, "popuphidden");
|
||||
ContextMenuUI.hide();
|
||||
yield promise;
|
||||
|
||||
Browser.closeTab(Browser.selectedTab, { forceClose: true });
|
||||
}
|
||||
});
|
||||
|
||||
function test() {
|
||||
setDevPixelEqualToPx();
|
||||
runTests();
|
||||
|
Loading…
Reference in New Issue
Block a user