pdf.js/test/unit
Jonas Jenwald 661c60ecc9 [api-minor] Support accessing both the original and modified PDF fingerprint
The PDF.js API has only ever supported accessing the original file ID, however the second one that (should) exist in *modified* documents have thus far been completely inaccessible through the API.
That seems like a simple oversight, caused e.g. by the viewer not needing it, since it really shouldn't hurt to provide API-users with the ability to check if a PDF document has been modified since its creation.[1]

Please refer to https://www.adobe.com/content/dam/acom/en/devnet/pdf/pdfs/PDF32000_2008.pdf#G13.2261661 for additional information.

For an example of how to update existing code to use the new API, please see the changes in the `web/app.js` file included in this patch.

*Please note:* While I'm not sure if we'll ever be able to remove the old `PDFDocumentProxy.fingerprint` getter, given that it's existed since "forever", that probably isn't a big deal given that it's now limited to only `GENERIC`-builds.

---
[1] Although this obviously depends on the PDF software following the specification, by updating the second file ID as intended.
2021-07-03 13:56:33 +02:00
..
.eslintrc Enable the ESLint no-var rule globally 2021-03-13 16:12:53 +01:00
annotation_spec.js Cache the "raw" standard font data in the worker-thread (PR 12726 follow-up) 2021-06-09 18:27:51 +02:00
annotation_storage_spec.js Drop obsolete done callbacks in test/unit/annotation_storage_spec.js 2021-04-14 22:11:45 +02:00
api_spec.js [api-minor] Support accessing both the original and modified PDF fingerprint 2021-07-03 13:56:33 +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 Remove some, with Prettier 2.3.0, unnecessary // prettier-ignore comments 2021-05-19 11:36:03 +02: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 - Save filled data in the pdf when downloading the file (Bug 1716288) 2021-06-25 18:57:01 +02:00
cmap_spec.js Convert done callbacks to async/await in test/unit/cmap_spec.js 2021-04-14 22:24:28 +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 XFA -- Load fonts permanently from the pdf 2021-04-15 17:57:42 +02:00
crypto_spec.js Remove some, with Prettier 2.3.0, unnecessary // prettier-ignore comments 2021-05-19 11:36:03 +02:00
custom_spec.js Account for formatting changes in Prettier version 2.3.0 2021-05-16 11:44:05 +02: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 Convert done callbacks to async/await in test/unit/display_svg_spec.js 2021-04-14 21:59:13 +02:00
display_utils_spec.js Remove obsolete done callbacks from the unit tests 2021-04-10 20:29:39 +02:00
document_spec.js A couple of small scripting/XFA-related tweaks in the worker-code 2021-04-17 10:34:22 +02:00
encodings_spec.js Update Prettier to version 2.0 2020-04-14 12:28:14 +02:00
evaluator_spec.js Support corrupt documents with *empty* Name-entries (issue 13610) 2021-06-22 16:55:44 +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
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 - Save filled data in the pdf when downloading the file (Bug 1716288) 2021-06-25 18:57:01 +02:00
message_handler_spec.js Convert done callbacks to async/await in test/unit/message_handler_spec.js 2021-04-14 21:59:13 +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 Convert done callbacks to async/await in test/unit/network_spec.js 2021-04-13 21:51:26 +02:00
network_utils_spec.js Update Prettier to version 2.0 2020-04-14 12:28:14 +02:00
node_stream_spec.js Convert done callbacks to async/await in test/unit/node_stream_spec.js 2021-04-13 21:51:26 +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 Convert done callbacks to async/await in test/unit/primitives_spec.js 2021-04-13 21:50:13 +02:00
scripting_spec.js Remove obsolete done callbacks from the unit tests 2021-04-10 20:29:39 +02:00
stream_spec.js Move the PredictorStream from src/core/stream.js and into its own file 2021-04-28 10:16:51 +02:00
struct_tree_spec.js Add support for basic structure tree for accessibility. 2021-04-09 09:56:28 -07:00
test_utils.js Include and use the 14 standard fonts files. 2021-06-07 11:10:11 -07: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 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 Convert done callbacks to async/await in test/unit/ui_utils_spec.js 2021-04-13 21:50:13 +02:00
unicode_spec.js Remove obsolete done callbacks from the unit tests 2021-04-10 20:29:39 +02:00
unit_test.html Import the TestReporter, in the unit and font tests 2020-10-27 11:30:15 +01:00
util_spec.js Convert done callbacks to async/await in test/unit/util_spec.js 2021-04-13 21:47:53 +02:00
writer_spec.js Ensure that saveDocument works if there's no /ID-entry in the PDF document (issue 13279) (#13280) 2021-04-22 12:08:56 +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 - Avoid infinite loop when creating some nodes in data 2021-06-09 19:07:59 +02:00
xfa_serialize_data_spec.js XFA - Save filled data in the pdf when downloading the file (Bug 1716288) 2021-06-25 18:57:01 +02:00
xfa_tohtml_spec.js XFA - Remove empty pages 2021-06-30 16:32:27 +02:00
xml_spec.js Handle PI with no value in xml parser 2021-05-18 10:22:18 +02:00