Update PDF.js to new version db9115625b9e16b79ffdfcd8481547ae6f05a90a from 2024-07-05 20:51:15
Categories
(Firefox :: PDF Viewer, enhancement)
Tracking
()
People
(Reporter: update-bot, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [3pl-filed][task_id: f5agNT4gQxWlhK-oFo11PQ])
This update covers 37 commits. Here are the overall diff statistics, and then the commit information.
taskcluster/kinds/fetch/toolchains.yml | 2 +-
toolkit/components/pdfjs/PdfJsDefaultPrefs.js | 3 +-
toolkit/components/pdfjs/content/build/pdf.mjs | 163 +++++---
toolkit/components/pdfjs/content/build/pdf.sandbox.external.sys.mjs | 2 +-
toolkit/components/pdfjs/content/build/pdf.scripting.mjs | 46 ++-
toolkit/components/pdfjs/content/build/pdf.worker.mjs | 87 +++-
toolkit/components/pdfjs/content/web/viewer-geckoview.mjs | 173 +++++++-
toolkit/components/pdfjs/content/web/viewer.html | 2 +-
toolkit/components/pdfjs/content/web/viewer.mjs | 182 ++++++++-
toolkit/components/pdfjs/moz.yaml | 4 +-
10 files changed, 515 insertions(+), 149 deletions(-)
70b44251ed9650a53bc1e899f5127c1bb2584141 by Tim van der Meij <timvandermeij@gmail.com>
https://github.com/mozilla/pdf.js/commit/70b44251ed9650a53bc1e899f5127c1bb2584141
Authored: 2024-07-05 16:56:31 +0200
Committed: 2024-07-05 21:15:44 +0200
Fix the "must check that charLimit is correctly set" scripting integration test
This integration test fails intermittently because we're not (correctly)
awaiting the character limit increase sandbox action.
For the first increase an attempt was made to handle this, but it doesn't
work correctly because the text in the field is abcdefghijklmnopq
and
it's not be truncated until the sandbox action is completed, so because
we didn't await that we would could pass the value !== "abcdefgh"
check
because abcdefghijklmnopq !== abcdefgh
is true. For the second increase
we didn't have a check in place.
This commit fixes the issues by using the waitForSandboxTrip
and
waitForSelector
helper functions to make sure that we can only proceed
if the sandbox action is completed and the DOM element is updated.
Files Modified:
- test/integration/scripting_spec.mjs
0fba6e570e5eb31140143ac060240ffa362b90b3 by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/0fba6e570e5eb31140143ac060240ffa362b90b3
Authored: 2024-07-05 17:56:41 +0200
Committed: 2024-07-05 21:01:12 +0200
[Editor] Change the enableML pref for enableAltText (bug 1905923)
We want to use this pref to make a Nimbus experiment in the next weeks.
Files Modified:
- extensions/chromium/preferences_schema.json
- src/display/editor/stamp.js
- src/display/editor/tools.js
- web/app.js
- web/app_options.js
- web/chromecom.js
- web/firefoxcom.js
- web/genericcom.js
0910f17a58b7a909f39977ed5ee690d8798e668b by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/0910f17a58b7a909f39977ed5ee690d8798e668b
Authored: 2024-07-05 17:14:51 +0200
Committed: 2024-07-05 18:59:29 +0200
Allow to change the toolbar height when changing the pref toolbar.density in Firefox (bug 1171799)
It's a first step to just dispatch the pref change to the toolbar.
The second one, to effectively use it, will come after PR #18385 is merged.
Files Modified:
- web/app.js
- web/app_options.js
- web/preferences.js
- web/toolbar.js
5274bab9f3f1359a576cbab14fa3c20fae468e2a by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/5274bab9f3f1359a576cbab14fa3c20fae468e2a
Authored: 2024-07-03 19:25:43 +0200
Committed: 2024-07-05 13:43:11 +0200
[Editor] Avoid to query ML engine several times for the same image
Files Modified:
- src/display/editor/stamp.js
38528d1116edf81090423b9cb5b78b5b820f7d8a by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/38528d1116edf81090423b9cb5b78b5b820f7d8a
Authored: 2024-07-05 12:14:36 +0200
Committed: 2024-07-05 12:25:18 +0200
Remove the renderForms
parameter from the Annotation getOperatorList
methods
The renderForms
parameter pre-dates the introduction of the general intent
parameter, which means that we're now effectively passing the same state twice to these getOperatorList
methods.
Files Modified:
- src/core/annotation.js
- src/core/document.js
- test/unit/annotation_spec.js
5f744904ac249e2af38e84fbe9ea96a93d096c82 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/5f744904ac249e2af38e84fbe9ea96a93d096c82
Authored: 2024-07-05 11:34:46 +0200
Committed: 2024-07-05 11:38:55 +0200
Check the relevant parameters inside of the mustBeViewedWhenEditing
method
Similar to the mustBeViewed
method, we can check the relevant parameters within the mustBeViewedWhenEditing
method itself since that (in my opinion) slightly helps readability of the code in the src/core/document.js
file.
Files Modified:
- src/core/annotation.js
- src/core/document.js
a4ffc1066c9f6e1226b02c11a7c568a519a0654c by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/a4ffc1066c9f6e1226b02c11a7c568a519a0654c
Authored: 2024-07-04 21:21:57 +0200
Committed: 2024-07-04 23:34:30 +0200
Move the internal API/Worker isEditing
-state into RenderingIntentFlag
In hindsight this seems like a better idea, since it avoids the need to manually pass isEditing
around as a boolean value.
Note that RenderingIntentFlag
is internal functionality, not exposed in the official API, which means that it can be extended and modified as necessary.
Files Modified:
- src/core/document.js
- src/core/worker.js
- src/display/api.js
- src/shared/util.js
74cbfbd09f831cbbaba4d556c056092af166d167 by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/74cbfbd09f831cbbaba4d556c056092af166d167
Authored: 2024-07-04 22:01:35 +0200
Committed: 2024-07-04 22:01:35 +0200
[Editor] Remove the option enableStamp
Files Modified:
- extensions/chromium/preferences_schema.json
- web/app.js
- web/app_options.js
- web/viewer.html
53ddfd139ff9ea60a4b2e1a856ea93f46a014aff by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/53ddfd139ff9ea60a4b2e1a856ea93f46a014aff
Authored: 2024-07-04 10:33:53 +0200
Committed: 2024-07-04 11:12:31 +0200
Fix the integration tests related to printing
Files Modified:
- test/integration/scripting_spec.mjs
fd6d0be50fe6e858315d9dea56bfc82af646c7bb by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/fd6d0be50fe6e858315d9dea56bfc82af646c7bb
Authored: 2024-07-03 09:57:12 +0200
Committed: 2024-07-03 09:57:12 +0200
Make sure the editor is visible before getting its rect
Files Modified:
- test/integration/test_utils.mjs
832fc93aa4b882ff304a2c78d91418afbc0465fc by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/832fc93aa4b882ff304a2c78d91418afbc0465fc
Authored: 2024-07-02 22:38:10 +0200
Committed: 2024-07-03 09:46:54 +0200
Use vertical variant of a char when it's in a missing vertical font (bug 1905623)
Files Added:
- test/pdfs/bug1905623.pdf.link
Files Modified:
- src/core/fonts.js
- src/core/fonts_utils.js
- test/test_manifest.json
4e8a015a78e8c372244fc119757b55c3ad13388f by Tim van der Meij <timvandermeij@gmail.com>
https://github.com/mozilla/pdf.js/commit/4e8a015a78e8c372244fc119757b55c3ad13388f
Authored: 2024-07-02 18:29:19 +0200
Committed: 2024-07-02 18:29:19 +0200
Update translations to the most recent versions
Files Modified:
- l10n/zh-TW/viewer.ftl
bb54e7e64cc46792e6271c8deb714373cb570c3c by Tim van der Meij <timvandermeij@gmail.com>
https://github.com/mozilla/pdf.js/commit/bb54e7e64cc46792e6271c8deb714373cb570c3c
Authored: 2024-07-02 18:20:49 +0200
Committed: 2024-07-02 18:20:49 +0200
Update dependencies to the most recent versions
Files Modified:
- gulpfile.mjs
- package-lock.json
- package.json
68175323f1aa27436cd0e710094582dd99030dae by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/68175323f1aa27436cd0e710094582dd99030dae
Authored: 2024-07-02 15:49:54 +0200
Committed: 2024-07-02 16:54:19 +0200
[Editor] Make sure everything is cleaned up when we switch to annotation editor mode
Files Modified:
- test/integration/test_utils.mjs
- web/pdf_viewer.js
c154b1da2302f63ed40bf2089d249d4b00085146 by calixteman <cdenizet@mozilla.com>
https://github.com/mozilla/pdf.js/commit/c154b1da2302f63ed40bf2089d249d4b00085146
Authored: 2024-07-02 15:46:05 +0200
Committed: 2024-07-02 15:46:05 +0200
Update pdfjs.config
Co-authored-by: Jonas Jenwald <jonas.jenwald@gmail.com>
Files Modified:
- pdfjs.config
2060944bdac8b4804c1a6231c5f57a59b9137356 by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/2060944bdac8b4804c1a6231c5f57a59b9137356
Authored: 2024-07-02 15:08:43 +0200
Committed: 2024-07-02 15:08:43 +0200
Bump library version to 4.5
Files Modified:
- pdfjs.config
033623c8d64caa51c0035df3814d498783473b03 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/033623c8d64caa51c0035df3814d498783473b03
Authored: 2024-07-02 14:34:59 +0200
Committed: 2024-07-02 14:34:59 +0200
Update the year in the license_header
files
Files Modified:
- src/license_header.js
- src/license_header_libre.js
ecb39a75ed89bc6ed0a9067edfb96310b8005db0 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/ecb39a75ed89bc6ed0a9067edfb96310b8005db0
Authored: 2022-07-22 11:56:20 +0200
Committed: 2024-07-02 14:12:23 +0200
[Firefox] Generate a PDF.js default-prefs file that can be used directly in mozilla-central (bug 1905864)
Files Deleted:
- extensions/firefox/.eslintrc
- extensions/firefox/content/PdfJsDefaultPreferences.sys.mjs
Files Modified:
- gulpfile.mjs
64635f3b35a64d1f941aadaf2bdcfd114b7053cc by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/64635f3b35a64d1f941aadaf2bdcfd114b7053cc
Authored: 2024-05-21 14:41:07 +0200
Committed: 2024-07-02 14:11:40 +0200
[api-minor][Editor] When switching to editing mode, redraw pages containing editable annotations
Right now, editable annotations are using their own canvas when they're drawn, but
it induces several issues:
- if the annotation has to be composed with the page then the canvas must be correctly
composed with its parent. That means we should move the canvas under canvasWrapper
and we should extract composing info from the drawing instructions...
Currently it's the case with highlight annotations. - we use some extra memory for those canvas even if the user will never edit them, which
the case for example when opening a pdf in Fenix.
So with this patch, all the editable annotations are drawn on the canvas. When the
user switches to editing mode, then the pages with some editable annotations are redrawn but
without them: they'll be replaced by their counterpart in the annotation editor layer.
Files Modified:
- src/core/annotation.js
- src/core/document.js
- src/core/worker.js
- src/display/annotation_layer.js
- src/display/annotation_storage.js
- src/display/api.js
- test/integration/annotation_spec.mjs
- test/integration/freetext_editor_spec.mjs
- test/integration/stamp_editor_spec.mjs
- test/integration/test_utils.mjs
- web/annotation_layer_builder.js
- web/pdf_page_view.js
- web/pdf_viewer.js
576aaf7cc1e56c17da4a350ddb277d1c96e44544 by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/576aaf7cc1e56c17da4a350ddb277d1c96e44544
Authored: 2024-07-01 23:59:37 +0200
Committed: 2024-07-02 10:12:26 +0200
[Editor] Take into account the page translation when computing the quadpoints when saving an highlight
It fixes #18360.
Files Added:
- test/pdfs/issue18360.pdf
Files Modified:
- src/display/editor/highlight.js
- test/integration/highlight_editor_spec.mjs
- test/pdfs/.gitignore
2f4d5d25a8da8affa3f9768358dfc47f4a2dcba4 by Tim van der Meij <timvandermeij@gmail.com>
https://github.com/mozilla/pdf.js/commit/2f4d5d25a8da8affa3f9768358dfc47f4a2dcba4
Authored: 2024-07-01 20:10:35 +0200
Committed: 2024-07-01 20:10:35 +0200
Bump the stable version in pdfjs.config
Files Modified:
- pdfjs.config
bf5dd7ea10dcbb263fa252ae4a26919738668b40 by Tim van der Meij <timvandermeij@gmail.com>
https://github.com/mozilla/pdf.js/commit/bf5dd7ea10dcbb263fa252ae4a26919738668b40
Authored: 2024-07-01 19:32:03 +0200
Committed: 2024-07-01 19:32:03 +0200
Fix the repository URL in the package.json
file for pdfjs-dist
For provenance, enabled in PR #18352, to work the repository URL in
package.json
is required to match the repository URL of the GitHub
Actions invocation. This should fix the following error we encountered
publishing a new release today:
npm error 422 Unprocessable Entity - PUT https://registry.npmjs.org/pdfjs-dist - Error verifying sigstore provenance bundle: Failed to validate repository information: package.json: "repository.url" is "git+https://github.com/mozilla/pdfjs-dist.git", expected to match "https://github.com/mozilla/pdf.js" from provenance
Files Modified:
- gulpfile.mjs
efb45a705e816dda3255cd0183ecd6d1262c2dcd by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/efb45a705e816dda3255cd0183ecd6d1262c2dcd
Authored: 2024-07-01 16:20:04 +0200
Committed: 2024-07-01 16:20:07 +0200
Disable new tab page stuff in Firefox when running tests
It should help to have such a garbage in the logs:
console.warn: TopSitesFeed: Failed to fetch data from Contile server: NetworkError when attempting to fetch resource.
JavaScript error: , line 0: TypeError: NetworkError when attempting to fetch resource.
Files Modified:
- test/test.mjs
aaa65bf3fccc1621e93bfb06d0deec921e9bda80 by Wojciech Maj <kontakt@wojtekmaj.pl>
https://github.com/mozilla/pdf.js/commit/aaa65bf3fccc1621e93bfb06d0deec921e9bda80
Authored: 2024-07-01 13:16:16 +0200
Committed: 2024-07-01 15:37:25 +0200
Generate provenance statements on npm publish
This PR adds Provenance statements on npm publish
, increasing supply-chain security.
Files Modified:
- .github/workflows/publish_release.yml
6b449d88841937c79113ecbfe8c8ca0d6a5b6ca4 by Wojciech Maj <kontakt@wojtekmaj.pl>
https://github.com/mozilla/pdf.js/commit/6b449d88841937c79113ecbfe8c8ca0d6a5b6ca4
Authored: 2024-07-01 13:31:41 +0200
Committed: 2024-07-01 13:46:23 +0200
Use npm ci
, not npm install
, on CI
This PR switches from npm install
to npm ci
on CI. This enables some additional checks to ensure repo integrity when using CI/CD.
Read more: https://docs.npmjs.com/cli/v10/commands/npm-ci
Files Modified:
- .github/workflows/ci.yml
- .github/workflows/font_tests.yml
- .github/workflows/lint.yml
- .github/workflows/publish_release.yml
- .github/workflows/publish_website.yml
- .github/workflows/types_tests.yml
dddb74d5e4d422b2be80ee93c26396830be2cfb3 by Tim van der Meij <timvandermeij@gmail.com>
https://github.com/mozilla/pdf.js/commit/dddb74d5e4d422b2be80ee93c26396830be2cfb3
Authored: 2024-06-30 15:47:14 +0200
Committed: 2024-06-30 16:03:52 +0200
Fix npm publish
warnings about the package.json
format
This commit removes the following warnings from the npm publish
output:
npm warn publish npm auto-corrected some errors in your package.json when publishing. Please run "npm pkg fix" to address these errors.
npm warn publish errors corrected:
npm warn publish Removed invalid "scripts"
npm warn publish "repository.url" was normalized to "git+https://github.com/mozilla/pdfjs-dist.git"
For the "scripts" section it turns out that if the package doesn't have
any scripts it's expected to explicitly set it to an empty object; refer
to https://github.com/npm/cli/issues/6918 and
https://github.com/denoland/dnt/pull/414.
Files Modified:
- gulpfile.mjs
a5f2b9faebe7b9f315a572916d9a80fa9c05471b by Tim van der Meij <timvandermeij@gmail.com>
https://github.com/mozilla/pdf.js/commit/a5f2b9faebe7b9f315a572916d9a80fa9c05471b
Authored: 2024-06-30 15:15:11 +0200
Committed: 2024-06-30 16:03:52 +0200
Introduce a GitHub Actions workflow for publishing a release
This commit migrates this functionality away from the bots. Note that
the NPM token must be configured as a repository secret before this
workflow can execute.
The following resources are relevant for this patch:
- Publishing packages to the NPM registry:
https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages#publishing-packages-to-the-npm-registry - Creating secrets for a repository:
https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions#creating-secrets-for-a-repository
Files Added:
- .github/workflows/publish_release.yml
Files Modified:
- gulpfile.mjs
f3d177e3e42c678b069b14315d4c7fe4a537cdae by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/f3d177e3e42c678b069b14315d4c7fe4a537cdae
Authored: 2024-06-30 15:16:00 +0200
Committed: 2024-06-30 15:16:00 +0200
[api-minor] Remove the deprecated renderTextLayer
and updateTextLayer
functions (PR 18104 follow-up)
Files Modified:
- src/display/text_layer.js
- src/pdf.js
- test/unit/pdf_spec.js
- web/pdfjs.js
046e281e20850d2929f16180045db0a335f52c89 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/046e281e20850d2929f16180045db0a335f52c89
Authored: 2024-06-29 12:05:28 +0200
Committed: 2024-06-29 12:05:28 +0200
Add a comment about test/webserver.mjs
being development-only code
Files Modified:
- test/webserver.mjs
dacf8bb0d1af9ace9d309ec132cae1147ede481f by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/dacf8bb0d1af9ace9d309ec132cae1147ede481f
Authored: 2024-06-28 21:31:12 +0200
Committed: 2024-06-28 22:21:03 +0200
Take into account PageOpen and PageClose actions which are present in some fields
Files Added:
- test/pdfs/issue18305.pdf
Files Modified:
- src/scripting_api/doc.js
- test/integration/scripting_spec.mjs
- test/pdfs/.gitignore
4d91ae3cde4e7c0fccfaab3163ba5f54eb22b644 by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/4d91ae3cde4e7c0fccfaab3163ba5f54eb22b644
Authored: 2024-06-28 17:38:58 +0200
Committed: 2024-06-28 17:38:58 +0200
Ignore test issue17779.pdf in talos because it times out
Files Modified:
- test/test_manifest.json
f006aa36d176d3f3a2cf21bf9e89c52bdd578e0e by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/f006aa36d176d3f3a2cf21bf9e89c52bdd578e0e
Authored: 2024-06-27 18:57:00 +0200
Committed: 2024-06-27 18:57:00 +0200
Add a port option to gulp server
Files Modified:
- gulpfile.mjs
0e94f2bd00752321f22a02d66fb3307499cb1415 by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/0e94f2bd00752321f22a02d66fb3307499cb1415
Authored: 2024-06-27 18:15:45 +0200
Committed: 2024-06-27 18:23:41 +0200
Fix intermittent failures with freetext and stamp tests
They're potentially due to some concurrent access to the system clipboard.
So this patch makes them sequential.
Files Modified:
- test/integration/freetext_editor_spec.mjs
- test/integration/stamp_editor_spec.mjs
a4f1a9a41b9fe5ff6713024dcf6513ff52a91dc3 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/a4f1a9a41b9fe5ff6713024dcf6513ff52a91dc3
Authored: 2024-06-26 17:17:02 +0200
Committed: 2024-06-26 17:26:02 +0200
Cancel the requestAnimationFrame
in the API when cancelling rendering
Errors related to this requestAnimationFrame
show up intermittently when running the integration-tests on the bots, however I've been unable to reproduce it locally.
Hence I cannot guarantee that it's enough to fix the timing issues, however this should be generally safe since the requestAnimationFrame
invokes the _next
-method and the first thing that one does is check that rendering hasn't been cancelled.
Files Modified:
- src/display/api.js
4dad1e34b99affdcdfcab480c48dec794b0a79c7 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/4dad1e34b99affdcdfcab480c48dec794b0a79c7
Authored: 2024-06-26 16:31:07 +0200
Committed: 2024-06-26 16:31:07 +0200
Cancel the requestAnimationFrame
in the watchScroll
helper (PR 18193 follow-up)
While the event listener is removed during testing, the requestAnimationFrame
isn't cancelled and that occasionally shows up when the integration-tests are run on the bots.
Files Modified:
- web/ui_utils.js
7128b95d29a9b802746b61ee9ecd7ef868b2141e by Tim van der Meij <timvandermeij@gmail.com>
https://github.com/mozilla/pdf.js/commit/7128b95d29a9b802746b61ee9ecd7ef868b2141e
Authored: 2024-06-23 16:10:27 +0200
Committed: 2024-06-26 15:25:33 +0200
Fix a race condition involving the waitForEvent
integration test helper function
Debugging #17931 uncovered a race condition in the way we use the
waitForEvent
function. Currently the following happens:
- We call
waitForEvent
, which starts execution of the function body
and immediately returns a promise. - We do the action that triggers the event.
- We await the promise, which resolves if the event is triggered or
the timeout is reached.
The problem is in step 1: function body execution has started, but not
necessarily completed. Given that we don't await the promise, we
immediately trigger step 2 and it's not unlikely that the event we
trigger arrives before the event listener is actually registered in the
function body of waitForEvent
(which is slower because it needs to be
evaluated in the page context and there is some other logic before the
actual addEventListener
call).
This commit fixes the issue by passing the action to waitForEvent
as
a callback so waitForEvent
itself can call it once it's safe to do so.
This should make sure that we always register the event listener before
triggering the event, and because we shouldn't miss events anymore we
can also remove the retry logic for pasting.
Files Modified:
- test/integration/copy_paste_spec.mjs
- test/integration/test_utils.mjs
55ba4aa66aa6c1da1f1bdb0f9c9a5654a2c78c74 by Tim van der Meij <timvandermeij@gmail.com>
https://github.com/mozilla/pdf.js/commit/55ba4aa66aa6c1da1f1bdb0f9c9a5654a2c78c74
Authored: 2024-06-21 20:37:01 +0200
Committed: 2024-06-26 14:48:42 +0200
Refactor the copy/paste logic in the integration tests
The integration tests are currently not consistent in how they do
copy/pasting: some tests use the kbCopy
/kbPaste
functions with
waiting for the event inline, some have their own helper function to
combine those actions and some even call kbCopy
/kbPaste
without
waiting for the event at all (which can cause intermittent failures).
This commit fixes the issues by providing a set of four helper functions
that all tests use and that abstract e.g. waiting for the event away
from the caller. This makes the invididual tests simpler and consistent,
reduces code duplication and fixes possible intermittent failures
due to not waiting for events to trigger.
Files Modified:
- test/integration/copy_paste_spec.mjs
- test/integration/freetext_editor_spec.mjs
- test/integration/stamp_editor_spec.mjs
- test/integration/test_utils.mjs
Reporter | ||
Comment 1•4 months ago
|
||
f5agNT4gQxWlhK-oFo11PQ |
I've submitted a try run for this commit: https://treeherder.mozilla.org/jobs?repo=try&revision=72a38379a362370d7b19bd8dcc3b0d7b57726be3
Reporter | ||
Comment 2•4 months ago
|
||
f5agNT4gQxWlhK-oFo11PQ |
Updatebot encountered an error while trying to submit to phabricator.
Updatebot will be unable to do anything more for this library version.
Updated•4 months ago
|
Reporter | ||
Updated•4 months ago
|
Comment 3•4 months ago
|
||
I'm closing this bug in favor of bug 1906729 which contains a few more pdf.js patches especially one we want to have in nightly (about the enableAltText
pref).
Updated•4 months ago
|
Description
•