1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 14:48:08 +02:00
pdf.js/test/unit
Nicolò Ribaudo 229ad1bb2c
Use the URL global instead of the deprecated url.parse
The Node.js url.parse API (https://nodejs.org/api/url.html#urlparseurlstring-parsequerystring-slashesdenotehost)
is deprecated because it's prone to security issues (to the point that Node.js doesn't even publish CVEs for it anymore).

The official reccomendation is to instead use the global URL constructor, available both in Node.js and in browsers.
Node.js filesystem APIs accept URL objects as parameter, so this also avoids a few URL->filepath conversions.
2024-08-27 18:19:25 +02:00
..
.eslintrc Enable the ESLint no-var rule globally 2021-03-13 16:12:53 +01:00
annotation_spec.js [Editor] Update the freetext annotation dictionary instead of creating a new one when updating an existing freetext 2024-07-11 10:44:21 +02:00
annotation_storage_spec.js Annotations - Avoid empty value in text field when storage contains something for it (bug 1719148) 2021-09-18 15:08:22 +02:00
api_spec.js Remove PDFWorkerUtil and move its contents into PDFWorker instead 2024-07-29 11:22:43 +02:00
app_options_spec.js Add better validation for the "PREFERENCE" kind AppOptions 2024-02-20 18:38:15 +01:00
bidi_spec.js Tweak the Bidi-detection heuristics for very short RTL strings (issue 11656) 2021-11-03 20:31:57 +01:00
cff_parser_spec.js Use shorter arrow functions where possible 2024-01-21 10:13:12 +01:00
clitests.json Merge pull request #17706 from Snuffleupagus/Node-Fetch-API 2024-03-19 11:04:28 +01:00
clitests_helper.js [api-minor] Re-factor how Node.js packages/polyfills are loaded (issue 17245) 2024-05-06 23:20:03 +02:00
cmap_spec.js Shorten the errors mentioning API parameters in BaseCMapReaderFactory and BaseStandardFontDataFactory 2024-07-27 16:54:54 +02:00
colorspace_spec.js Remove obsolete done callbacks from the unit tests 2021-04-10 20:29:39 +02:00
core_utils_spec.js When updating, write the xref table in the same format as the previous one (bug 1878916) 2024-02-13 14:14:37 +01:00
crypto_spec.js Enable the unicorn/prefer-optional-catch-binding ESLint plugin rule 2023-06-12 11:46:11 +02:00
custom_spec.js Remove duplicated destroy-calls in the "custom ownerDocument" unit-tests 2022-10-02 12:01:41 +02:00
default_appearance_spec.js Improve parseAppearanceStream to handle more "complex" ColorSpaces 2023-07-06 15:58:09 +02:00
display_utils_spec.js [api-minor] Remove the unused onlyStripPath option from the getFilenameFromUrl helper function 2024-05-03 08:29:41 +02:00
document_spec.js [Annotation] Fix printing/saving for annotations containing some non-ascii chars and with no fonts to handle them (bug 1666824) 2022-11-10 19:05:39 +01:00
editor_spec.js [Editor] Improve curve smoothing for Ink tool (bug 1789443) 2023-05-23 17:15:21 +02:00
encodings_spec.js Update Prettier to version 2.0 2020-04-14 12:28:14 +02:00
evaluator_spec.js Enable the unicorn/prefer-optional-catch-binding ESLint plugin rule 2023-06-12 11:46:11 +02:00
event_utils_spec.js Add signal-support in the EventBus, and utilize it in the viewer (PR 17964 follow-up) 2024-04-20 12:00:58 +02:00
fetch_stream_spec.js [api-minor] Use the Fetch API, when supported, to load PDF documents in Node.js environments 2024-02-21 22:38:42 +01:00
font_substitutions_spec.js Remove the tag for missing font subset when trying to find a substitution 2024-04-11 20:34:28 +02:00
function_spec.js Correct PostScript trigonometric operators 2023-03-03 17:25:11 -05:00
jasmine-boot.js Add better validation for the "PREFERENCE" kind AppOptions 2024-02-20 18:38:15 +01:00
message_handler_spec.js [api-minor] Replace the PromiseCapability with Promise.withResolvers() 2024-04-01 11:42:37 +02:00
metadata_spec.js Remove the isEmptyObj unit-test helper function 2023-02-04 12:43:53 +01:00
murmurhash3_spec.js Replace the AnnotationStorage.lastModified-getter with a proper hash-method 2022-05-04 15:21:30 +02:00
network_spec.js Convert done callbacks to async/await in test/unit/network_spec.js 2021-04-13 21:51:26 +02:00
network_utils_spec.js Slightly improve validation of (some) parameters in getDocument 2022-03-21 13:32:17 +01:00
node_stream_spec.js Use the URL global instead of the deprecated url.parse 2024-08-27 18:19:25 +02:00
parser_spec.js Support an odd number of digits in hexadecimal strings (issue 18645) 2024-08-23 16:31:43 +02:00
pdf.image_decoders_spec.js [api-minor] Remove the image-related error message prefixes 2024-04-20 12:51:45 +02:00
pdf.worker_spec.js Add unit-tests to check that more PDF.js APIs expose the expected functionality 2023-07-07 12:36:21 +02:00
pdf_find_controller_spec.js Allow specifying custom match logic in PDFFindController 2024-08-13 10:45:57 +02:00
pdf_find_utils_spec.js Run gulp lint --fix, to account for changes in Prettier version 2.1.x 2020-09-06 12:23:59 +02:00
pdf_history_spec.js Update Prettier to version 2.0 2020-04-14 12:28:14 +02:00
pdf_spec.js [api-minor] Remove Outliner from the official API 2024-07-16 13:08:26 +02:00
pdf_viewer.component_spec.js Ensure that GenericL10n works if the locale files cannot be loaded 2024-01-31 14:07:11 +01:00
pdf_viewer_spec.js Remove the abstract BaseViewer-class 2022-09-08 12:38:17 +02:00
primitives_spec.js Allow to insert several annotations under the same parent in the structure tree 2024-04-24 16:23:05 +02:00
scripting_spec.js Improve date parsing in the js sandbox 2024-06-14 17:21:50 +02:00
stream_spec.js [api-minor] Remove the forceClamped-functionality in the Streams (issue 14849) 2022-04-29 14:46:30 +02:00
struct_tree_spec.js Include the /Lang-property, when it exists, in the StructTree-data (issue 14261) 2021-11-14 12:37:41 +01:00
test_utils.js [api-minor] Use the Fetch API, when supported, to load PDF documents in Node.js environments 2024-02-21 22:38:42 +01:00
testreporter.js Don't ignore errors in the Jasmine suite start/end stages 2024-06-23 20:59:48 +02:00
text_layer_spec.js [api-minor] Re-factor the basic textLayer-functionality 2024-05-17 14:20:20 +02:00
type1_parser_spec.js Move some constants and helper functions from src/core/fonts.js and into their own file 2021-05-02 21:00:29 +02:00
ui_utils_spec.js Use String.prototype.replaceAll() where appropriate 2023-03-22 15:31:10 +01:00
unicode_spec.js [api-minor] Don't normalize the text used in the text layer. 2023-04-17 14:31:23 +02:00
unit_test.html Remove the web-com import map (PR 17588 follow-up) 2024-02-07 16:33:27 +01:00
util_spec.js Implement a unit test for the BaseException class 2024-05-14 20:21:42 +02:00
writer_spec.js Correctly update the xref table when an annotation is deleted 2024-04-18 21:27:39 +02:00
xfa_formcalc_spec.js Fix property chain orders of Operators in isDotExpression and isSomPredicate 2022-09-21 17:20:23 +02:00
xfa_parser_spec.js Prevent duplicate names in unit/integration tests 2024-02-11 11:45:09 +01:00
xfa_serialize_data_spec.js Enable the import/no-cycle ESLint plugin rule 2023-06-04 13:44:15 +02:00
xfa_tohtml_spec.js Use even more optional chaining in the code-base 2023-11-02 16:47:33 +01:00
xml_spec.js Enable the unicorn/prefer-string-replace-all ESLint plugin rule 2023-03-23 12:57:10 +01:00