pdf.js/test/unit
Ben Wagner 158c836e26 Correct PostScript trigonometric operators
PDF 32000-1:2008 7.10.5.1 "Type 4 (PostScript Calculator) Functions"
defers to the PostScript Language Reference for the description of these
functions. The PostScript Language Reference, third edition chapter 8
"Operators" defines the `angle` type as a "number of degrees". Section
8.1 defines "angle `sin` real", "angle `cos` real", and "num den `atan`
angle". The documentation for `atan` further states that it will return
an angle in degrees between 0 and 360.

Handle these operators correctly in `PostScriptEvaluator.execute`.
Convert the inputs to `sin` and `cos` from degrees to radians for use
with `Math.sin` and `Math.cos`. Correctly pop two values from the stack
for `atan`, use `Math.atan2`, and convert from radians to (positive)
degrees.
2023-03-03 17:25:11 -05:00
..
.eslintrc Enable the ESLint no-var rule globally 2021-03-13 16:12:53 +01:00
annotation_spec.js [Annotation] Avoid to encrypt the appearance stream two times (bug 1815476) 2023-02-07 19:26:46 +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 [api-minor] Generate images in the worker instead of the main thread. 2023-03-01 17:40:12 +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 Fix typo in cff_parser_spec.js 2021-08-06 19:30:36 +09:00
clitests_helper.js Inline the setPDFNetworkStreamFactory functionality in src/display/api.js 2023-01-06 13:23:07 +01:00
clitests.json Remove the abstract BaseViewer-class 2022-09-08 12:38:17 +02: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 Correctly pad strings when saving an encrypted pdf (bug 1726789) 2021-09-02 10:37:21 +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 Display background when printing or saving a text widget (issue #14928) 2022-05-19 16:41:54 +02:00
display_svg_spec.js [api-minor] Generate images in the worker instead of the main thread. 2023-03-01 17:40:12 +01:00
display_utils_spec.js Support FileAttachments with hash-signs in the filename (issue 15729) 2022-11-23 10:47:33 +01: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] Simplify the command manager 2022-07-21 18:44:41 +02:00
encodings_spec.js Update Prettier to version 2.0 2020-04-14 12:28:14 +02:00
evaluator_spec.js Use String.prototype.repeat() in a couple of spots 2022-03-30 15:42:40 +02:00
event_utils_spec.js Move the EventBus, and related functionality, into its own file 2021-12-15 17:18:57 +01: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 Correct PostScript trigonometric operators 2023-03-03 17:25:11 -05:00
jasmine-boot.js Inline the setPDFNetworkStreamFactory functionality in src/display/api.js 2023-01-06 13:23:07 +01: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 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 Convert done callbacks to async/await in test/unit/node_stream_spec.js 2021-04-13 21:51:26 +02: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 Don't replace an eol by a whitespace when the last char is a Katakana-Hiragana diacritic 2023-02-16 11:31:58 +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_viewer_spec.js Remove the abstract BaseViewer-class 2022-09-08 12:38:17 +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 [JS] Correctly format field with numbers (bug 1811694, bug 1811510) 2023-01-26 14:57:02 +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 Merge pull request #15981 from Snuffleupagus/cMapPacked-true 2023-02-04 15:00:26 +01:00
testreporter.js Enable the no-typeof-undefined ESLint plugin rule 2022-12-01 18:20:39 +01:00
text_layer_spec.js [api-minor] Combine the textContent/textContentStream parameters 2022-12-04 21:22:14 +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 Move binarySearchFirstItem back to the web/-folder (PR 15237 follow-up) 2022-08-14 11:38:17 +02:00
unicode_spec.js Remove the invisible format marks from the text chunks 2022-01-24 13:47:24 +01:00
unit_test.html Remove most build-time require statements from the viewer (PR 16009 follow-up) 2023-02-07 22:45:19 +01:00
util_spec.js Move the escapeString helper function into the worker-thread 2022-11-16 12:35:48 +01:00
writer_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
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 Support rich content in markup annotation 2021-10-31 13:44:51 +01:00
xfa_serialize_data_spec.js XFA - Encode tag names in UTF-8 when saving (fix #14249) 2021-11-07 21:41:37 +01:00
xfa_tohtml_spec.js XFA - Get each page asynchronously in order to avoid blocking the event loop (#14014) 2021-11-06 13:25:03 +01:00
xml_spec.js Handle PI with no value in xml parser 2021-05-18 10:22:18 +02:00