Closed Bug 1681026 Opened 5 years ago Closed 5 years ago

Enable the testPreviewNavigationCommands test in browser_preview_navigation.js

Categories

(Toolkit :: Printing, task, P3)

task

Tracking

()

RESOLVED FIXED
85 Branch
Tracking Status
firefox85 --- fixed

People

(Reporter: sfoster, Assigned: emilio)

References

Details

Attachments

(3 files)

Bug 1654684 adds a mochitest to exercise the new preview navigation toolbar.
The testPreviewNavigationCommands test was causing a crash in some configurations, in automation only, so was skipped to land the feature.

I'm attaching a log file from running browser_preview_navigation.js with this test enabled, on linux debug on try. It has some details of the crash that fails the test.

:emilio, the assert at https://searchfox.org/mozilla-central/rev/71621bfa47a371f2b1ccfd33c704913124afb933/layout/base/nsDocumentViewer.cpp#3282 is indeed off-by-one as the pageNum is 1-indexed. Once bug 1654684 lands, you can trigger this by scrolling to the end of the preview, or using the ">>" button, then clicking the ">" (next) button. That will send a "Printing:Preview:Navigate" message to the child process something like:
{pageNum = this.sheetCount, navType = nsIWebBrowserPrint.PRINTPREVIEW_GOTO_PAGENUM }

I think fixing that condition should allow us to un-skip this test. So, can you either do that when you land that fix, or let me know and I'll check and do it myself?

Flags: needinfo?(emilio)
Flags: needinfo?(emilio)

It was off-by-one as the pages are one-indexed.

Assignee: nobody → emilio
Status: NEW → ASSIGNED
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ae67665f4e1e Fix PrintPreviewScrollToPage assert and simplify it. r=hiro

This bug needs another patch to enable the test before we close it

Keywords: leave-open
Keywords: leave-open
Pushed by sfoster@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9939d12eae1e Enable the testPreviewNavigationCommands test for the print preview navigation toolbar. r=emilio
Regressions: 1681867
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 85 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: