pdf.js/test/unit
Jonas Jenwald 97c2ce9da0 Ensure that GenericL10n works if the locale files cannot be loaded
- Ensure that localization works in the GENERIC viewer, even if the necessary locale files cannot be loaded.
   This was the behaviour prior to the introduction of Fluent, and it seems worthwhile to keep that (especially since we already bundle the en-US strings anyway).

 - Let the `GenericL10n`-implementation use the *bundled* en-US strings directly when no language is provided.

 - Remove the `NullL10n`-implementation, and simply fallback to `GenericL10n`, to reduce the maintenance burden of viewer-components localization.

 - Indirectly, given the previous point, stop exporting `NullL10n` in the viewer-components since it's now removed.
   Note that it was never really intended to be used directly and only existed as a fallback.

*Please note:* This doesn't affect the Firefox PDF Viewer, thanks to the use of import maps.
2024-01-31 14:07:11 +01:00
..
.eslintrc Enable the ESLint no-var rule globally 2021-03-13 16:12:53 +01:00
annotation_spec.js Re-enable the should compress and save text unit-test (issue 17399) 2024-01-28 14:31:07 +01: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 Reduce memory use and improve perfs when computing the bounding box of a bezier curve (bug 1875547) 2024-01-24 23:41:14 +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_helper.js Move the isNodeJS-helper into the src/shared/util.js file 2023-07-17 16:42:25 +02:00
clitests.json Format json files in using prettier 2024-01-16 19:40:25 +01:00
cmap_spec.js [api-minor] Let the cMapPacked parameter, in getDocument, default to true 2023-01-30 15:35:02 +01:00
colorspace_spec.js Remove obsolete done callbacks from the unit tests 2021-04-10 20:29:39 +02:00
core_utils_spec.js Move the arrayBuffersToBytes helper function into the worker-thread 2023-02-11 21:34: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 Move the isNodeJS-helper into the src/shared/util.js file 2023-07-17 16:42:25 +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 Move the isNodeJS-helper into the src/shared/util.js file 2023-07-17 16:42:25 +02:00
fetch_stream_spec.js Convert done callbacks to async/await in test/unit/fetch_stream_spec.js 2021-04-13 21:51:27 +02:00
font_substitutions_spec.js Add the font Linux Libertine as a possible substitution for Times New Roman 2024-01-16 12:31:23 +01:00
function_spec.js Correct PostScript trigonometric operators 2023-03-03 17:25:11 -05:00
jasmine-boot.js [api-major] Output JavaScript modules in the builds (issue 10317) 2023-10-07 09:31:08 +02:00
message_handler_spec.js Use shorter arrow functions where possible 2024-01-21 10:13:12 +01: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 shorter arrow functions where possible 2024-01-21 10:13:12 +01:00
parser_spec.js Let Lexer.getNumber treat more invalid "numbers" as zero (issue 15604) 2022-10-20 22:36:15 +02:00
pdf_find_controller_spec.js Use shorter arrow functions where possible 2024-01-21 10:13:12 +01: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 [Editor] Add a color picker with predefined colors for highlighting text (bug 1866434) 2023-12-05 23:27:22 +01:00
pdf_viewer_spec.js Remove the abstract BaseViewer-class 2022-09-08 12:38:17 +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.image_decoders_spec.js Limit the amount of console "spam" during fuzz tests (PR 17337 follow-up) 2023-12-04 16:39:45 +01: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
primitives_spec.js Add general iteration support in the RefSet and RefSetCache classes 2022-03-18 14:27:34 +01:00
scripting_spec.js Enable the arrow-body-style ESLint rule 2024-01-21 16:20:55 +01: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 Disable the "should compress and save text" unit-test in Node.js (PR 17202 follow-up) 2023-12-09 14:13:11 +01:00
testreporter.js Enable the no-typeof-undefined ESLint plugin rule 2022-12-01 18:20:39 +01:00
text_layer_spec.js Move the isNodeJS-helper into the src/shared/util.js file 2023-07-17 16:42:25 +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 Ensure that GenericL10n works if the locale files cannot be loaded 2024-01-31 14:07:11 +01:00
util_spec.js Remove the isArrayBuffer helper function 2024-01-19 14:10:52 +01:00
writer_spec.js Compress the data when saving annotions 2023-05-09 14:46:50 +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 Enable the import/no-cycle ESLint plugin rule 2023-06-04 13:44:15 +02: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