Add test to ensure Fitts Law works on the Back button on Windows

RESOLVED FIXED in Firefox 28

Status

()

Firefox
Theme
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: jaws, Assigned: jaws)

Tracking

Trunk
Firefox 28
All
Windows 7
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Created attachment 8335344 [details] [diff] [review]
backButtonTest.patch

Bug 571454 added code to specifically support clicking on the first pixel of the window when in maximized mode so that it would trigger hitting the back button on a default profile in Windows.

We should have a test that verifies this behavior exists and doesn't regress.

Pushed to tryserver: https://tbpl.mozilla.org/?tree=Try&rev=5bdfc9acf79e
Attachment #8335344 - Flags: review?(felipc)
All green on Tryserver.
Comment on attachment 8335344 [details] [diff] [review]
backButtonTest.patch

Review of attachment 8335344 [details] [diff] [review]:
-----------------------------------------------------------------

r+, but I would suggest listening for a "popstate" event instead of waitForCondition, to make the test more deterministic and also more e10s friendly.

::: browser/base/content/test/general/browser_backButtonFitts.js
@@ +20,5 @@
> +    EventUtils.synthesizeMouseAtPoint(xPixel, yPixel, {}, window);
> +    var condition = function() gBrowser.selectedBrowser.contentDocument.location.href == firstLocation;
> +    waitForCondition(condition,
> +      () => {
> +        ok(condition(), "Clicking the first pixel should have navigated back.");

no need to re-run condition, you could just have ok(true, ...) here
Attachment #8335344 - Flags: review?(felipc) → review+
https://hg.mozilla.org/mozilla-central/rev/916737f3bb20
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 28
You need to log in before you can comment on or make changes to this bug.