1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-29 15:47:57 +02:00
pdf.js/test/unit
Tim van der Meij 0351c7eff4 Move the getFileName helper function to the core
This is required to be able to use it in the annotation display code,
where we now apply it to sanitize the filename of the FileAttachment
annotation. The PDF file from https://bugzilla.mozilla.org/show_bug.cgi?id=1230933 has shown that some PDF generators include the path of the file rather than the filename, which causes filenames with weird initial characters. PDF viewers handle this differently (for example Foxit Reader just replaces forward slashes with spaces), but we think it's better to only show the filename as intended.

Additionally we add unit tests for the `getFilenameFromUrl` helper
function.
2016-02-23 22:49:53 +01:00
..
annotation_layer_spec.js Implement unit and reference testing for FileAttachment annotations 2016-02-23 22:49:53 +01:00
api_spec.js Destroy workers when they are no longer needed in the unit tests 2016-01-29 12:23:17 +01:00
cmap_spec.js Uses editorconfig to maintain consistent coding styles 2015-11-14 07:32:18 +05:30
crypto_spec.js Uses editorconfig to maintain consistent coding styles 2015-11-14 07:32:18 +05:30
evaluator_spec.js Uses editorconfig to maintain consistent coding styles 2015-11-14 07:32:18 +05:30
font_spec.js Add validation for callsubr and callgsubr for type 2 charstrings. 2016-01-05 09:54:25 -08:00
function_spec.js Uses editorconfig to maintain consistent coding styles 2015-11-14 07:32:18 +05:30
metadata_spec.js Uses editorconfig to maintain consistent coding styles 2015-11-14 07:32:18 +05:30
parser_spec.js Ensure that Lexer_getName does not fail if a Name contains in invalid usage of the NUMBER SIGN (#) (issue 6692) 2015-11-28 11:59:09 +01:00
primitives_spec.js Adds UMD headers to core, display and shared files. 2015-12-15 13:24:39 -06:00
stream_spec.js Uses editorconfig to maintain consistent coding styles 2015-11-14 07:32:18 +05:30
testreporter.js Uses editorconfig to maintain consistent coding styles 2015-11-14 07:32:18 +05:30
ui_utils_spec.js Strip null (\x00) characters from the URLs in LinkAnnotations (issue 6832) 2016-01-04 21:55:20 +01:00
unit_test.html Use RequireJS in the viewer, examples and tests. 2015-12-29 09:20:52 -06:00
util_spec.js Move the getFileName helper function to the core 2016-02-23 22:49:53 +01:00