mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1237713 - Fix and re-enable test browser_tabkeynavigation on e10s. r=jimm
This commit is contained in:
parent
0d372069d9
commit
de8333c4dc
@ -419,7 +419,6 @@ skip-if = os == "linux" || os == "mac" # No tabs in titlebar on linux
|
||||
# Disabled on OS X because of bug 967917
|
||||
[browser_tabfocus.js]
|
||||
[browser_tabkeynavigation.js]
|
||||
skip-if = e10s
|
||||
[browser_tabopen_reflows.js]
|
||||
[browser_tabs_close_beforeunload.js]
|
||||
support-files =
|
||||
|
@ -42,23 +42,19 @@ function test() {
|
||||
|
||||
is(gBrowser.selectedTab, tab1,
|
||||
"Tab1 should be activated");
|
||||
EventUtils.synthesizeKey("VK_TAB", { ctrlKey: true },
|
||||
browser1.contentWindow);
|
||||
EventUtils.synthesizeKey("VK_TAB", { ctrlKey: true });
|
||||
is(gBrowser.selectedTab, tab2,
|
||||
"Tab2 should be activated by pressing Ctrl+Tab on Tab1");
|
||||
|
||||
EventUtils.synthesizeKey("VK_TAB", { ctrlKey: true },
|
||||
browser2.contentWindow);
|
||||
EventUtils.synthesizeKey("VK_TAB", { ctrlKey: true });
|
||||
is(gBrowser.selectedTab, tab3,
|
||||
"Tab3 should be activated by pressing Ctrl+Tab on Tab2");
|
||||
|
||||
EventUtils.synthesizeKey("VK_TAB", { ctrlKey: true, shiftKey: true },
|
||||
browser3.contentWindow);
|
||||
EventUtils.synthesizeKey("VK_TAB", { ctrlKey: true, shiftKey: true });
|
||||
is(gBrowser.selectedTab, tab2,
|
||||
"Tab2 should be activated by pressing Ctrl+Shift+Tab on Tab3");
|
||||
|
||||
EventUtils.synthesizeKey("VK_TAB", { ctrlKey: true, shiftKey: true },
|
||||
browser2.contentWindow);
|
||||
EventUtils.synthesizeKey("VK_TAB", { ctrlKey: true, shiftKey: true });
|
||||
is(gBrowser.selectedTab, tab1,
|
||||
"Tab1 should be activated by pressing Ctrl+Shift+Tab on Tab2");
|
||||
|
||||
@ -67,23 +63,19 @@ function test() {
|
||||
|
||||
is(gBrowser.selectedTab, tab1,
|
||||
"Tab1 should be activated");
|
||||
EventUtils.synthesizeKey("VK_PAGE_DOWN", { ctrlKey: true },
|
||||
browser1.contentWindow);
|
||||
EventUtils.synthesizeKey("VK_PAGE_DOWN", { ctrlKey: true });
|
||||
is(gBrowser.selectedTab, tab2,
|
||||
"Tab2 should be activated by pressing Ctrl+PageDown on Tab1");
|
||||
|
||||
EventUtils.synthesizeKey("VK_PAGE_DOWN", { ctrlKey: true },
|
||||
browser2.contentWindow);
|
||||
EventUtils.synthesizeKey("VK_PAGE_DOWN", { ctrlKey: true });
|
||||
is(gBrowser.selectedTab, tab3,
|
||||
"Tab3 should be activated by pressing Ctrl+PageDown on Tab2");
|
||||
|
||||
EventUtils.synthesizeKey("VK_PAGE_UP", { ctrlKey: true },
|
||||
browser3.contentWindow);
|
||||
EventUtils.synthesizeKey("VK_PAGE_UP", { ctrlKey: true });
|
||||
is(gBrowser.selectedTab, tab2,
|
||||
"Tab2 should be activated by pressing Ctrl+PageUp on Tab3");
|
||||
|
||||
EventUtils.synthesizeKey("VK_PAGE_UP", { ctrlKey: true },
|
||||
browser2.contentWindow);
|
||||
EventUtils.synthesizeKey("VK_PAGE_UP", { ctrlKey: true });
|
||||
is(gBrowser.selectedTab, tab1,
|
||||
"Tab1 should be activated by pressing Ctrl+PageUp on Tab2");
|
||||
|
||||
@ -98,23 +90,19 @@ function test() {
|
||||
|
||||
is(gBrowser.selectedTab, tab1,
|
||||
"Tab1 should be activated");
|
||||
EventUtils.synthesizeKey(advanceKey, { altKey: true, metaKey: true },
|
||||
browser1.contentWindow);
|
||||
EventUtils.synthesizeKey(advanceKey, { altKey: true, metaKey: true });
|
||||
is(gBrowser.selectedTab, tab2,
|
||||
"Tab2 should be activated by pressing Ctrl+" + advanceKey + " on Tab1");
|
||||
|
||||
EventUtils.synthesizeKey(advanceKey, { altKey: true, metaKey: true },
|
||||
browser2.contentWindow);
|
||||
EventUtils.synthesizeKey(advanceKey, { altKey: true, metaKey: true });
|
||||
is(gBrowser.selectedTab, tab3,
|
||||
"Tab3 should be activated by pressing Ctrl+" + advanceKey + " on Tab2");
|
||||
|
||||
EventUtils.synthesizeKey(reverseKey, { altKey: true, metaKey: true },
|
||||
browser3.contentWindow);
|
||||
EventUtils.synthesizeKey(reverseKey, { altKey: true, metaKey: true });
|
||||
is(gBrowser.selectedTab, tab2,
|
||||
"Tab2 should be activated by pressing Ctrl+" + reverseKey + " on Tab3");
|
||||
|
||||
EventUtils.synthesizeKey(reverseKey, { altKey: true, metaKey: true },
|
||||
browser2.contentWindow);
|
||||
EventUtils.synthesizeKey(reverseKey, { altKey: true, metaKey: true });
|
||||
is(gBrowser.selectedTab, tab1,
|
||||
"Tab1 should be activated by pressing Ctrl+" + reverseKey + " on Tab2");
|
||||
}
|
||||
@ -125,15 +113,13 @@ function test() {
|
||||
is(gBrowser.tabContainer.selectedIndex, 2,
|
||||
"Tab2 index should be 2");
|
||||
|
||||
EventUtils.synthesizeKey("VK_PAGE_DOWN", { ctrlKey: true, shiftKey: true },
|
||||
browser2.contentWindow);
|
||||
EventUtils.synthesizeKey("VK_PAGE_DOWN", { ctrlKey: true, shiftKey: true });
|
||||
is(gBrowser.selectedTab, tab2,
|
||||
"Tab2 should be activated after Ctrl+Shift+PageDown");
|
||||
is(gBrowser.tabContainer.selectedIndex, 3,
|
||||
"Tab2 index should be 1 after Ctrl+Shift+PageDown");
|
||||
|
||||
EventUtils.synthesizeKey("VK_PAGE_UP", { ctrlKey: true, shiftKey: true },
|
||||
browser2.contentWindow);
|
||||
EventUtils.synthesizeKey("VK_PAGE_UP", { ctrlKey: true, shiftKey: true });
|
||||
is(gBrowser.selectedTab, tab2,
|
||||
"Tab2 should be activated after Ctrl+Shift+PageUp");
|
||||
is(gBrowser.tabContainer.selectedIndex, 2,
|
||||
@ -153,45 +139,37 @@ function test() {
|
||||
|
||||
is(gBrowser.selectedTab, tab1,
|
||||
"Tab1 should be activated");
|
||||
EventUtils.synthesizeKey(advanceKey, { metaKey: true },
|
||||
browser1.contentWindow);
|
||||
EventUtils.synthesizeKey(advanceKey, { metaKey: true });
|
||||
is(gBrowser.selectedTab, tab2,
|
||||
"Tab2 should be activated by pressing Ctrl+" + advanceKey + " on Tab1");
|
||||
|
||||
EventUtils.synthesizeKey(advanceKey, { metaKey: true },
|
||||
browser2.contentWindow);
|
||||
todo_is(gBrowser.selectedTab, tab3,
|
||||
"Tab3 should be activated by pressing Ctrl+" + advanceKey + " on Tab2");
|
||||
EventUtils.synthesizeKey(advanceKey, { metaKey: true });
|
||||
is(gBrowser.selectedTab, tab3,
|
||||
"Tab3 should be activated by pressing Ctrl+" + advanceKey + " on Tab2");
|
||||
|
||||
if (gBrowser.selectedTab != tab3) {
|
||||
EventUtils.synthesizeKey(reverseKey, { metaKey: true },
|
||||
browser3.contentWindow);
|
||||
is(gBrowser.selectedTab, tab2,
|
||||
"Tab2 should be activated by pressing Ctrl+" + reverseKey + " on Tab3");
|
||||
}
|
||||
EventUtils.synthesizeKey(reverseKey, { metaKey: true });
|
||||
is(gBrowser.selectedTab, tab2,
|
||||
"Tab2 should be activated by pressing Ctrl+" + reverseKey + " on Tab3");
|
||||
|
||||
EventUtils.synthesizeKey(reverseKey, { metaKey: true },
|
||||
browser2.contentWindow);
|
||||
todo_is(gBrowser.selectedTab, tab1,
|
||||
"Tab1 should be activated by pressing Ctrl+" + reverseKey + " on Tab2");
|
||||
EventUtils.synthesizeKey(reverseKey, { metaKey: true });
|
||||
is(gBrowser.selectedTab, tab1,
|
||||
"Tab1 should be activated by pressing Ctrl+" + reverseKey + " on Tab2");
|
||||
} else {
|
||||
gBrowser.selectedTab = tab2;
|
||||
EventUtils.synthesizeKey("VK_F4", { type: "keydown", ctrlKey: true },
|
||||
browser2.contentWindow);
|
||||
EventUtils.synthesizeKey("VK_F4", { type: "keydown", ctrlKey: true });
|
||||
|
||||
isnot(gBrowser.selectedTab, tab2,
|
||||
"Tab2 should be closed by pressing Ctrl+F4 on Tab2");
|
||||
is(gBrowser.tabs.length, 3,
|
||||
"The count of tabs should be 3 since tab2 should be closed");
|
||||
"The count of tabs should be 3 since tab2 should be closed");
|
||||
|
||||
let activeWindow =
|
||||
gBrowser.getBrowserForTab(gBrowser.selectedTab).contentWindow;
|
||||
// NOTE: keypress event shouldn't be fired since the keydown event should
|
||||
// be consumed by tab2.
|
||||
EventUtils.synthesizeKey("VK_F4", { type: "keyup", ctrlKey: true },
|
||||
activeWindow);
|
||||
is(gBrowser.tabs.length, 3,
|
||||
"The count of tabs should be 3 since renaming key events shouldn't close other tabs");
|
||||
EventUtils.synthesizeKey("VK_F4", { type: "keyup", ctrlKey: true });
|
||||
is(gBrowser.tabs.length, 3,
|
||||
"The count of tabs should be 3 since renaming key events shouldn't close other tabs");
|
||||
}
|
||||
|
||||
gBrowser.selectedTab = tab3;
|
||||
|
Loading…
Reference in New Issue
Block a user