Skip to content
Snippets Groups Projects
Commit a5ceb4d5 authored by Hiroyuki Ikezoe's avatar Hiroyuki Ikezoe
Browse files

Bug 1704065 - Don't start navigation swipe gestures where there is no navigation history. r=spohl

Apparently we should check each command specified by
browser.gesture.swipe.left or browser.gesture.swipe.right, it will be fixed
in bug 1707118.

Differential Revision: https://phabricator.services.mozilla.com/D113635
parent ffad9ff5
No related branches found
No related tags found
No related merge requests found
......@@ -250,7 +250,7 @@ var gGestureSupport = {
: aEvent.DIRECTION_LEFT;
}
return true;
return canGoBack || canGoForward;
},
/**
......
"use strict";
module.exports = {
extends: ["plugin:mozilla/browser-test"],
};
[browser_gesture_navigation.js]
/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set sts=2 sw=2 et tw=80: */
"use strict";
add_task(async () => {
// Open a new browser window to make sure there is no navigation history.
const newBrowser = await BrowserTestUtils.openNewBrowserWindow({});
let event = {
direction: SimpleGestureEvent.DIRECTION_LEFT,
};
ok(!newBrowser.gGestureSupport._shouldDoSwipeGesture(event));
event = {
direction: SimpleGestureEvent.DIRECTION_RIGHT,
};
ok(!newBrowser.gGestureSupport._shouldDoSwipeGesture(event));
await BrowserTestUtils.closeWindow(newBrowser);
});
......@@ -28,6 +28,7 @@ BROWSER_CHROME_MANIFESTS += [
"content/test/forms/browser.ini",
"content/test/fullscreen/browser.ini",
"content/test/general/browser.ini",
"content/test/gesture/browser.ini",
"content/test/historySwipeAnimation/browser.ini",
"content/test/keyboard/browser.ini",
"content/test/menubar/browser.ini",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment