pdf.js/test/unit
Jonas Jenwald 0eb1433c78 [api-minor] Change the format of the fontName-property, in defaultAppearanceData, on Annotation-instances (PR 12831 follow-up)
Currently the `fontName`-property contains an actual /Name-instance, which is a problem given that its fallback value is an empty string; see ca7f546828/src/core/default_appearance.js (L35)
The reason that this is a problem can be seen in ca7f546828/src/core/primitives.js (L30-L34), since an empty string short-circuits the cache. Essentially, in PDF documents, a /Name-instance cannot be empty and the way that the `DefaultAppearanceEvaluator` does things is unfortunately not entirely correct.

Hence the `fontName`-property is changed to instead contain a string, rather than a /Name-instance, which simplifies the code overall.

*Please note:* I'm tagging this patch with "[api-minor]", since PR 12831 is included in the current pre-release (although we're not using the `fontName`-property in the display-layer).
2021-04-01 16:47:30 +02:00
..
.eslintrc Enable the ESLint no-var rule globally 2021-03-13 16:12:53 +01:00
annotation_spec.js Remove redundant done-callback functions from unit-tests which are async 2021-03-21 11:33:39 +01:00
annotation_storage_spec.js [api-minor] Annotation -- Don't compute appearance when nothing has changed 2021-02-12 19:27:21 +01:00
api_spec.js [api-minor] Support proper URL-objects, in addition to URL-strings, in getDocument 2021-03-31 16:21:41 +02:00
bidi_spec.js Convert var to const/let in the test/unit folder 2020-10-25 15:40:51 +01:00
cff_parser_spec.js Convert var to const/let in the test/unit folder 2020-10-25 15:40:51 +01:00
clitests_helper.js [api-minor] Highlight search results correctly for normalized text (PR 9448) 2021-01-12 18:08:08 +01:00
clitests.json XFA - Add a lexer/parser for FormCalc language (#12936) 2021-02-17 20:28:06 +01:00
cmap_spec.js Remove unncessary CanvasFactory/CMapReaderFactory/FileReaderFactory duplication in unit-tests 2021-01-08 17:33:59 +01:00
colorspace_spec.js Remove the special handling, used when creating Indexed ColorSpaces, for the case where the lookup-data is a Stream 2020-07-10 17:22:55 +02:00
core_utils_spec.js Move the encodeToXmlString helper function to src/core/core_utils.js 2021-02-17 13:12:01 +01:00
crypto_spec.js Fix var conversions that ESLint could not do automatically 2020-10-25 16:17:12 +01:00
custom_spec.js Remove unncessary CanvasFactory/CMapReaderFactory/FileReaderFactory duplication in unit-tests 2021-01-08 17:33:59 +01:00
default_appearance_spec.js [api-minor] Change the format of the fontName-property, in defaultAppearanceData, on Annotation-instances (PR 12831 follow-up) 2021-04-01 16:47:30 +02:00
display_svg_spec.js Load all unit-tests with native import, rather than SystemJS 2020-10-26 11:11:48 +01:00
display_utils_spec.js Move the getPdfFilenameFromUrl helper function from web/ui_utils.js and into src/display/display_utils.js 2021-03-17 15:48:24 +01:00
document_spec.js Don't use 'in' operator to check if key is in a Map 2020-12-16 16:00:12 +01:00
encodings_spec.js Update Prettier to version 2.0 2020-04-14 12:28:14 +02:00
evaluator_spec.js Run gulp lint --fix, to account for changes in Prettier version 2.2.1 2020-11-29 10:01:46 +01:00
fetch_stream_spec.js Remove unnecessary /* eslint no-var: error */ lines in the test/unit/ folder (PR 12528 follow-up) 2021-03-13 11:50:11 +01:00
function_spec.js Convert var to const/let in the test/unit folder 2020-10-25 15:40:51 +01:00
jasmine-boot.js XFA - Convert some template properties into CSS ones (#13082) 2021-03-25 13:02:39 +01:00
message_handler_spec.js Update Prettier to version 2.0 2020-04-14 12:28:14 +02:00
metadata_spec.js Move the Metadata parsing to the worker-thread 2021-02-17 13:12:01 +01:00
murmurhash3_spec.js Add a MurmurHash3_64.update unit-test for TypedArrays which share the same underlying ArrayBuffer (PR 12534 follow-up) 2020-10-28 12:42:04 +01:00
network_spec.js Fix var conversions that ESLint could not do automatically 2020-10-25 16:17:12 +01:00
network_utils_spec.js Update Prettier to version 2.0 2020-04-14 12:28:14 +02:00
node_stream_spec.js Use the ESLint no-restricted-syntax rule to ensure that assert is always called with two arguments 2020-05-05 13:40:05 +02:00
parser_spec.js Remove unnecessary /* eslint no-var: error */ lines in the test/unit/ folder (PR 12528 follow-up) 2021-03-13 11:50:11 +01:00
pdf_find_controller_spec.js [api-minor] Highlight search results correctly for normalized text (PR 9448) 2021-01-12 18:08:08 +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
primitives_spec.js Add support, in Dict.merge, for merging of "sub"-dictionaries 2020-08-30 23:18:32 +02:00
scripting_spec.js JS - Fix setting a color on an annotation 2021-02-20 15:24:37 +01:00
stream_spec.js Convert var to const/let in the test/unit folder 2020-10-25 15:40:51 +01:00
test_utils.js Use ESLint to ensure that exports are sorted alphabetically 2021-01-09 20:37:51 +01:00
testreporter.js Replace a few new Date().getTime() instances with Date.now() 2021-02-11 23:00:42 +01:00
type1_parser_spec.js Convert var to const/let in the test/unit folder 2020-10-25 15:40:51 +01:00
ui_utils_spec.js Move the getPdfFilenameFromUrl helper function from web/ui_utils.js and into src/display/display_utils.js 2021-03-17 15:48:24 +01:00
unicode_spec.js Convert var to const/let in the test/unit folder 2020-10-25 15:40:51 +01:00
unit_test.html Import the TestReporter, in the unit and font tests 2020-10-27 11:30:15 +01:00
util_spec.js Move the encodeToXmlString helper function to src/core/core_utils.js 2021-02-17 13:12:01 +01:00
writer_spec.js Dict keys need to be escaped too when saving 2020-09-11 12:25:05 +02:00
xfa_formcalc_spec.js XFA - Add a lexer/parser for FormCalc language (#12936) 2021-02-17 20:28:06 +01:00
xfa_parser_spec.js XFA - Add support for few ui elements (#13115) 2021-03-31 15:42:21 +02:00
xfa_tohtml_spec.js XFA - Convert some template properties into CSS ones (#13082) 2021-03-25 13:02:39 +01:00
xml_spec.js Move the XML-parser to the src/core/-folder 2021-02-17 13:12:01 +01:00