1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 14:48:08 +02:00
Commit graph

19191 commits

Author SHA1 Message Date
Tim van der Meij
f4053c2b3e
Close the page in the text layer caret selection integration test
This integration test is currently the only one that spawns a separate
browser instance. However, while it closes the browser once it's done,
it doesn't close the page (and therefore doesn't call the `testingClose`
method) like the other integration tests do.

This commit fixes this difference by closing the page before closing the
browser, thereby ensuring all regular cleanup logic gets called and we
avoid (intermittent) shutdown tracebacks in the logs. This allows
upcoming integration tests that spawn a separate browser instance to
reuse this pattern to cleanly end the test.

Given that we integrate the `closeSinglePage` code from #17962 for this
patch, @calixteman is credited as the co-author.

Co-authored-by: Calixte Denizet <calixte.denizet@gmail.com>
2024-06-23 12:46:18 +02:00
Tim van der Meij
327738d02a
Disable system addon updates for Firefox in testing mode
This commit fixes the following log line that currently shows up for
every type of tests that involve a browser:

`System addon update list error SyntaxError: XMLHttpRequest.open:
'http://%(server)s/dummy-system-addons.xml' is not a valid URL.`

If Firefox is in testing mode, the system addons update URL is
configured to a dummy URL so that it can't actually update (see for
example the same value in Marionette at
https://searchfox.org/mozilla-central/source/testing/marionette/client/marionette_driver/geckoinstance.py#109),
but this doesn't stop Firefox from trying to update, and when it does
it logs this line because the URL is obviously invalid.

Hence this patch which disables system addon updates altogether so
Firefox doesn't attempt to use the dummy URL anymore. The browser
updates are all managed by Puppeteer, and regular updates have already
been disabled too (see
6937a76f0a/packages/browsers/src/browser-data/firefox.ts (L302-L303)).
2024-06-23 11:58:55 +02:00
Tim van der Meij
c18a987f4e
Merge pull request #18313 from Snuffleupagus/l10n-destroy
Try to shutdown Fluent "more" when closing the viewer during testing
2024-06-22 19:45:24 +02:00
Tim van der Meij
658b5fab5d
Merge pull request #18312 from timvandermeij/updates
Update dependencies and translations to the most recent versions
2024-06-22 19:32:25 +02:00
Jonas Jenwald
6492587066 Try to shutdown Fluent "more" when closing the viewer during testing
Even with PR 18280 fixed, we still *occasionally* see l10n-related errors when closing the integration-tests on the bots.
2024-06-22 16:40:12 +02:00
Tim van der Meij
a89c700607
Update translations to the most recent versions 2024-06-21 17:11:30 +02:00
Tim van der Meij
3b9208b8b6
Update dependencies to the most recent versions 2024-06-21 17:09:21 +02:00
Tim van der Meij
f9ff613e56
Merge pull request #18303 from bootleq/findbar-state-entire-word
Expose entireWord in updateFindControlState
2024-06-21 16:13:54 +02:00
Tim van der Meij
ba0e732e32
Merge pull request #18308 from nicolo-ribaudo/patch-1
Use the new formatted issue templates
2024-06-21 16:00:59 +02:00
Nicolò Ribaudo
1480e6778b
Use the new formatted issue templates 2024-06-21 15:42:31 +02:00
bootleq
890c567eca Expose entireWord in updateFindControlState
Allow apps with supportsIntegratedFind to better monitor the find state.

A recognized use case is the Firefox findbar, its "not found" sound must
consider `entireWord` and only make noise when it is off.

See related implementation in
https://hg.mozilla.org/mozilla-central/rev/16b902cbcf26

This change can help if we have to move the implementation from cpp to jsm.
2024-06-21 13:12:59 +08:00
calixteman
a081dd25eb
Merge pull request #18306 from calixteman/bug1903731
Always use DW if it's a number for the font default width (bug 1903731)
2024-06-20 16:52:29 +02:00
Tim van der Meij
1cf19e907d
Merge pull request #18302 from Snuffleupagus/testingClose-findbar-close
Close `PDFFindBar` when closing the viewer during testing
2024-06-20 15:55:36 +02:00
calixteman
d09aed87d0
Merge pull request #18296 from calixteman/bug1903589
[Editor] Correctly set the accessibility data when copying & pasting a stamp with an alt text (bug 1903589)
2024-06-20 15:35:22 +02:00
Calixte Denizet
8c9a665728 Always use DW if it's a number for the font default width (bug 1903731) 2024-06-20 15:33:34 +02:00
Jonas Jenwald
e76242d4ea
Merge pull request #18304 from Snuffleupagus/issue-18298
Don't throw if there's not enough data to get the header in `FlateStream` (issue 18298)
2024-06-20 13:53:26 +02:00
Calixte Denizet
67f9756fce [Editor] Correctly set the accessibility data when copying & pasting a stamp with an alt text (bug 1903589) 2024-06-20 13:52:58 +02:00
calixteman
9afd3a5b2f
Merge pull request #18301 from calixteman/no_signal
[Editor] Don't create an observer for the stamp annotation after the viewer has been closed
2024-06-20 13:42:54 +02:00
Jonas Jenwald
3fae2d71f6 Don't throw if there's not enough data to get the header in FlateStream (issue 18298)
Following in the footsteps of PR 17340.
2024-06-20 13:03:17 +02:00
Jonas Jenwald
02c03154b3 Close PDFFindBar when closing the viewer during testing
By closing `PDFFindBar` we also disconnect the `ResizeObserver`, since we've seen at least one case where that's running during shutdown: http://54.193.163.58:8877/91c40554d1b07c0/output.txt
2024-06-20 11:51:21 +02:00
Calixte Denizet
7d7ae34e34 [Editor] Don't create an observer for the stamp annotation after the viewer has been closed 2024-06-20 10:52:28 +02:00
Tim van der Meij
3e1d779859
Merge pull request #18218 from nicolo-ribaudo/test-maxCanvasPixels
Respect `maxCanvasPixels` when computing canvas dimensions
2024-06-19 16:47:09 +02:00
Jonas Jenwald
94cbe9ec23
Merge pull request #18289 from Snuffleupagus/app-testingClose
Add a new helper, in the viewer, to close everything during testing
2024-06-19 16:22:12 +02:00
Nicolò Ribaudo
de23bb9b82
Respect maxCanvasPixels when computing canvas dimensions
Ensure that we never round the canvas dimensions above `maxCanvasPixels`
by rounding them to the preceeding multiple of the display ratio rather
than the succeeding one.
2024-06-19 15:23:16 +02:00
Nicolò Ribaudo
12692d2e39
Add test for CSS-only zoom above maxCanvasPixels
This commit introduces a test to ensure that:
- When zooming below the maxCanvasPixels limit, the canvas is rendered
  with the correct size (the two sides are multiplied by the zoom factor).
- When zooming above the maxCanvasPixels limit, the canvas size is capped.
2024-06-19 15:22:53 +02:00
Tim van der Meij
b7d194f3c9
Merge pull request #18292 from Snuffleupagus/tweakWebpackOutput-improve-regex
Update the regular expression in `tweakWebpackOutput` to support minified-legacy builds (issue 18290)
2024-06-19 14:26:20 +02:00
Tim van der Meij
764e67e861
Merge pull request #18278 from timvandermeij/updates
Update dependencies to the most recent versions and upgrade `eslint-plugin-unicorn` to version 54.0.0
2024-06-19 14:01:49 +02:00
Jonas Jenwald
c771ac81cd Add a new helper, in the viewer, to close everything during testing
This has two advantages, as far as I'm concerned:
 - The tests don't need to manually invoke multiple functions to properly clean-up, which reduces the risk of missing something.
 - By collecting all the relevant clean-up in one method, rather than spreading it out, we get a much better overview of exactly what is being reset.
2024-06-19 13:48:08 +02:00
calixteman
c53f71a7d2
Merge pull request #18284 from calixteman/editor_signal
[Editor] Remove the various listeners when destroying the editor manager
2024-06-19 12:36:38 +02:00
Jonas Jenwald
df058edf22 Update the regular expression in tweakWebpackOutput to support minified-legacy builds (issue 18290) 2024-06-19 12:21:10 +02:00
Calixte Denizet
390afcb685 [Editor] Remove the various listeners when destroying the editor manager 2024-06-19 10:33:52 +02:00
calixteman
9dbe4c246b
Merge pull request #18286 from calixteman/call_sandbox
Avoid to call a function in the js sandbox when it has been destroyed
2024-06-18 22:53:16 +02:00
Calixte Denizet
4bdbf4bb3d Avoid to call a function in the js sandbox when it has been destroyed 2024-06-18 22:30:21 +02:00
Tim van der Meij
58dd289971
Upgrade eslint-plugin-unicorn to version 54.0.0
This is a major version bump, but the changelog at
https://github.com/sindresorhus/eslint-plugin-unicorn/releases/tag/v54.0.0
doesn't indicate any breaking changes that should impact us.
2024-06-18 21:49:38 +02:00
Tim van der Meij
c77dbe0496
Update dependencies to the most recent versions 2024-06-18 21:49:34 +02:00
Tim van der Meij
4b5d5a557c
Merge pull request #18280 from calixteman/issue18279
Pause l10n (i.e. disconnect the mutation observer in fluent) when closing the viewer
2024-06-18 21:47:06 +02:00
Calixte Denizet
34389d4e47 Pause l10n (i.e. disconnect the mutation observer in fluent) when closing the viewer 2024-06-18 21:08:47 +02:00
Tim van der Meij
0d8828f93d
Merge pull request #18282 from Snuffleupagus/issue-18274
Don't save modified documents, when running tests, upon closing the viewer (issue 18274)
2024-06-18 20:55:27 +02:00
Jonas Jenwald
9e811b97b1 Don't save modified documents, when running tests, upon closing the viewer (issue 18274) 2024-06-18 20:05:11 +02:00
Tim van der Meij
c521351338
Merge pull request #18260 from calixteman/dumpio
Enable dumpio when running the tests in order to have some useful debug data
2024-06-18 19:39:59 +02:00
Tim van der Meij
2f462a8afe
Merge pull request #18277 from calixteman/issue18276
[Editor] Fix intermittent failure in integration test when highlighting with the keyboard
2024-06-18 19:34:59 +02:00
calixteman
45762c2f0e
Merge pull request #18275 from calixteman/fix_stamp_css_odd_spread
[Editor] Set the canvas in the stamp editor at the right position in odd spread mode
2024-06-18 18:51:25 +02:00
Calixte Denizet
acf8600a3d [Editor] Set the canvas in the stamp editor at the right position in odd spread mode 2024-06-18 18:44:29 +02:00
Calixte Denizet
4cc77f1470 [Editor] Fix intermittent failure in integration test when highlighting with the keyboard 2024-06-18 18:29:25 +02:00
Jonas Jenwald
701325896a
Merge pull request #18273 from Snuffleupagus/addLocallyCachedImageOps
Add a helper function for handling locally cached image data (PR 18269 follow-up)
2024-06-18 18:11:19 +02:00
Calixte Denizet
3c02dc6d1d Enable dumpio when running the tests in order to have some useful debug data 2024-06-18 18:03:26 +02:00
Jonas Jenwald
604e8977e9 Add a helper function for handling locally cached image data (PR 18269 follow-up)
This avoids having to duplicate the same exact code multiple times.
2024-06-18 17:20:40 +02:00
calixteman
4c041586fb
Merge pull request #18271 from calixteman/clean_before_closing
Clean up before closing the tab in integration tests
2024-06-18 16:55:53 +02:00
Tim van der Meij
4c82438e61
Merge pull request #18269 from Snuffleupagus/issue-18259
Ensure that dependencies are added to the operatorList for locally cached images (issue 18259)
2024-06-18 15:07:07 +02:00
Tim van der Meij
c07dd17162
Merge pull request #18270 from Snuffleupagus/issue-18264
Only use the l10n fallback bundle when normal ftl-file fetching failed (issue 18264)
2024-06-18 14:53:45 +02:00