pdf.js/test/unit
Ross Johnson 6dae2677d5 [api-minor] Highlight search results correctly for normalized text (PR 9448)
This patch is a rebased *and* refactored version of PR 9448, such that it applies cleanly given that `PDFFindController` has changed since that PR was opened; obviously keeping the original author information intact.

This patch will thus ensure that e.g. fractions, and other things that we normalize before searching, will still be highlighted correctly in the textLayer.

Furthermore, this patch also adds basic unit-tests for this functionality.

*Note:* The `[api-minor]` tag is added, since third-party implementations of the `PDFFindController` must now always use the `pageMatchesLength` property to get accurate length information (see the `web/text_layer_builder.js` changes).

Co-authored-by: Ross Johnson <ross@mazira.com>
Co-authored-by: Jonas Jenwald <jonas.jenwald@gmail.com>
2021-01-12 18:08:08 +01:00
..
.eslintrc Load the non-test files with standard import statements when running the unit-tests 2020-10-27 11:47:35 +01:00
annotation_spec.js Remove unncessary CanvasFactory/CMapReaderFactory/FileReaderFactory duplication in unit-tests 2021-01-08 17:33:59 +01:00
annotation_storage_spec.js JS -- hidden annotations must be built in case a script show them 2020-11-10 12:48:34 +01:00
api_spec.js Remove unncessary CanvasFactory/CMapReaderFactory/FileReaderFactory duplication in unit-tests 2021-01-08 17:33:59 +01: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 JS -- Add a sandbox based on quickjs 2020-11-19 13:40:46 +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 Parenthesis in names are not escaped when saving 2020-11-25 12:28:12 +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
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 Run gulp lint --fix, to account for changes in Prettier version 2.1.x 2020-09-06 12:23:59 +02: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 Update Prettier to version 2.0 2020-04-14 12:28:14 +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 JS -- Add 'util' object 2020-11-06 18:12:29 +01:00
message_handler_spec.js Update Prettier to version 2.0 2020-04-14 12:28:14 +02:00
metadata_spec.js [api-minor] Change the "dc:creator" Metadata field to an Array 2021-01-11 21:34:07 +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 Update Prettier to version 2.0 2020-04-14 12:28:14 +02: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 -- Actions must be evaluated in global scope 2020-12-17 22:01:45 +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 Import the TestReporter, in the unit and font tests 2020-10-27 11:30:15 +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 Support the once option, when registering EventBus listeners 2020-12-29 16:49:13 +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 Fix encoding issues when printing/saving a form with non-ascii characters 2021-01-05 17:23:18 +01:00
writer_spec.js Dict keys need to be escaped too when saving 2020-09-11 12:25:05 +02:00
xml_spec.js [api-minor] Change the "dc:creator" Metadata field to an Array 2021-01-11 21:34:07 +01:00