1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 07:08:08 +02:00
pdf.js/test
Tim van der Meij 253a7333d8
Fix the "must highlight text in the right position" integration test
This commit implements the following improvements for the test:

- Replace the hardcoded highlight padding with a dynamic calculation. It
  turns out that the amount of padding can differ per system, possibly
  due to e.g. local (font) settings, which could cause the test to fail.
  The test now no longer implicitly depends on the environment.
- Remove the page offset subtraction. It's only needed for one assertion,
  and we can simply add the page offset there once.
- Improve the "magic" numbers in the test. The number 5 is removed now
  that the padding calculation made it obsolete, the number 28 is changed
  to 30 because that's the actual value in the PDF data and the number 4
  is explained a bit more to state that the space also counts as a glyph.
- Annotate the steps and checks to improve readability of the test and
  to explain why certain calculations have to be performed.
2024-04-11 13:42:08 +02:00
..
chromium Enable the import/no-commonjs ESLint plugin rule 2023-10-14 12:49:17 +02:00
font Convert the TTX driver code to promises 2024-04-05 13:34:54 +02:00
fuzz Limit the amount of console "spam" during fuzz tests (PR 17337 follow-up) 2023-12-04 16:39:45 +01:00
images [Editor] Support svg images in the stamp annotation 2023-07-07 15:59:13 +02:00
integration Fix the "must highlight text in the right position" integration test 2024-04-11 13:42:08 +02:00
pdfs Merge pull request #17882 from calixteman/bug1889122 2024-04-10 09:40:54 +02:00
resources Enable the declaration-block-no-redundant-longhand-properties Stylelint rule 2023-03-25 10:08:27 +01:00
stats Enable the import/no-commonjs ESLint plugin rule 2023-10-14 12:49:17 +02:00
types Format json files in using prettier 2024-01-16 19:40:25 +01:00
unit Fix annotation border style parsing by handling empty dash arrays 2024-04-08 16:34:27 +02:00
.eslintrc Prevent duplicate names in unit/integration tests 2024-02-11 11:45:09 +01:00
.gitignore Ignore test snapshots directory. 2013-03-15 11:24:08 -07:00
add_test.mjs [ESM] Convert *most* of test-folder to use standard modules 2023-07-08 13:13:04 +02:00
annotation_layer_builder_overrides.css Use CSS nesting in the annotationLayer 2023-10-27 18:46:47 +02:00
downloadutils.mjs Modernize the rewriteWebArchiveUrl test helper function 2023-12-17 21:53:50 +01:00
draw_layer_test.css [Editor] Add a way to extract the outlines of a union of rectangles 2023-11-20 18:45:19 +01:00
driver.js [api-minor] Replace the PromiseCapability with Promise.withResolvers() 2024-04-01 11:42:37 +02:00
integration-boot.mjs When zooming the scrollbar can disappear and then no scrollend is triggered 2024-03-15 15:37:06 +01:00
test.mjs Convert the TTX driver code to promises 2024-04-05 13:34:54 +02:00
test_manifest.json Don't render annotations with a null dimension 2024-04-09 16:03:49 +02:00
test_slave.html [api-minor] Move to Fluent for the localization (bug 1858715) 2023-10-19 11:20:41 +02:00
testutils.mjs [ESM] Convert *most* of test-folder to use standard modules 2023-07-08 13:13:04 +02:00
text_layer_test.css Use CSS nesting in the textLayer 2023-10-27 17:38:01 +02:00
webserver.mjs Improve the webserver's constructor 2024-02-17 16:22:10 +01:00
xfa_layer_builder_overrides.css Remove unnecessary alpha-value from CSS rgb colors 2023-10-06 09:50:03 +02:00