forked from ZenBrowserMirrors/zen-desktop
test: Added double click to open tab test, b=(no-bug), c=tabs, workspaces, tests
This commit is contained in:
parent
adfc235865
commit
bb78fc165b
3 changed files with 17 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
diff --git a/browser/components/tabbrowser/content/tabs.js b/browser/components/tabbrowser/content/tabs.js
|
||||
index ef9c0389ec926e6bc01c0dc3b883beceaf1f7d43..f7b8ce70fc77d5e00cc066f203609a42083789d5 100644
|
||||
index ef9c0389ec926e6bc01c0dc3b883beceaf1f7d43..045864f229327e46812eaa77925988608125fa70 100644
|
||||
--- a/browser/components/tabbrowser/content/tabs.js
|
||||
+++ b/browser/components/tabbrowser/content/tabs.js
|
||||
@@ -83,7 +83,7 @@
|
||||
|
@ -24,7 +24,7 @@ index ef9c0389ec926e6bc01c0dc3b883beceaf1f7d43..f7b8ce70fc77d5e00cc066f203609a42
|
|||
if (
|
||||
event.button != 0 ||
|
||||
- event.target != this.arrowScrollbox ||
|
||||
+ event.target != document.getElementById("zen-tabs-wrapper") ||
|
||||
+ !event.target.closest(".zen-workspace-normal-tabs-section") ||
|
||||
event.composedTarget.localName == "toolbarbutton"
|
||||
) {
|
||||
return;
|
||||
|
|
|
@ -5,3 +5,4 @@ support-files = [
|
|||
|
||||
["browser_basic_workspaces.js"]
|
||||
["browser_workspace_bookmarks.js"]
|
||||
["browser_double_click_newtab.js"]
|
||||
|
|
14
src/zen/tests/workspaces/browser_double_click_newtab.js
Normal file
14
src/zen/tests/workspaces/browser_double_click_newtab.js
Normal file
|
@ -0,0 +1,14 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
https://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
'use strict';
|
||||
|
||||
add_task(async function test_Check_Creation() {
|
||||
const placeToDoubleClick = gZenWorkspaces.activeWorkspaceStrip;
|
||||
EventUtils.sendMouseEvent({ type: 'dblclick' }, placeToDoubleClick, window);
|
||||
await TestUtils.waitForCondition(() => gBrowser.tabs.length === 3, 'New tab should be opened.');
|
||||
|
||||
ok(true, 'New tab should be opened.');
|
||||
await BrowserTestUtils.removeTab(gBrowser.tabs[2]);
|
||||
ok(gBrowser.tabs.length === 2, 'There should be one tab.');
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue