pdf.js/test
Tim van der Meij 6ef813af01
Extract and modernize the webserver's request checking code
The `handler` method contained this code in two inline functions,
triggered via callbacks, which made the `handler` method big and harder
to read. Moreover, this code relied on variables from the outer scope,
which made it harder to reason about because the inputs and outputs
weren't easily visible.

This commit fixes the problems by extracting the request checking code
into a dedicated private method, and modernizing it to use e.g. `const`/
`let` instead of `var` and using template strings. The logic is now
self-contained in a single method that can be read from top to bottom
without callbacks and with comments annotating each check/section.
2024-02-17 16:22:10 +01:00
..
chromium Enable the import/no-commonjs ESLint plugin rule 2023-10-14 12:49:17 +02:00
font Introduce a GitHub Actions workflow for running the font tests 2023-11-12 17:48:04 +01: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 [Editor] Set rotated free highlight at the right position after having changed its thickness (bug 1879108) 2024-02-11 21:06:56 +01:00
pdfs Add a dummy beginMarkedContentProps operator when optional content parsing fails (issue 17679) 2024-02-17 13:45:16 +01: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 When updating, write the xref table in the same format as the previous one (bug 1878916) 2024-02-13 14:14:37 +01: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 Use a limit, in more places, when splitting strings 2024-02-02 13:10:52 +01:00
integration-boot.mjs Implement caret browsing mode (bug 807730) 2024-02-07 09:35:22 +01:00
test_manifest.json Add a dummy beginMarkedContentProps operator when optional content parsing fails (issue 17679) 2024-02-17 13:45:16 +01:00
test_slave.html [api-minor] Move to Fluent for the localization (bug 1858715) 2023-10-19 11:20:41 +02:00
test.mjs Update puppeteer to version 22.0.0 2024-02-10 19:05:36 +01: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 Extract and modernize the webserver's request checking code 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