-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JS] Fix few errors around AFSpecial_Keystroke #14429
Conversation
calixteman
commented
Jan 7, 2022
- @cincodenada found some errors which are fixed in this patch;
- it partially fixes issue AForm validation rejects valid fields #14306;
- add some tests.
/botio unittest |
From: Bot.io (Linux m4)ReceivedCommand cmd_unittest from @calixteman received. Current queue size: 0 Live output at: http://54.241.84.105:8877/ed658ea98c2b899/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_unittest from @calixteman received. Current queue size: 0 Live output at: http://54.193.163.58:8877/b8f3736da6aed57/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/ed658ea98c2b899/output.txt Total script time: 3.02 mins
|
From: Bot.io (Windows)SuccessFull output at http://54.193.163.58:8877/b8f3736da6aed57/output.txt Total script time: 5.83 mins
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the rest of the AFSpecial_Keystroke
method (to try and understand this code better), I cannot help thinking that the following block is redundant:
pdf.js/src/scripting_api/aform.js
Lines 549 to 551 in 290cbc5
if (psf === null) { | |
throw new Error("Invalid psf in AFSpecial_Keystroke"); | |
} |
given that we're throwing the exact same error in the
default
of the switch just below:pdf.js/src/scripting_api/aform.js
Lines 576 to 577 in 290cbc5
default: | |
throw new Error("Invalid psf in AFSpecial_Keystroke"); |
r=me, since the patch looks reasonable.
- @cincodenada found some errors which are fixed in this patch; - it partially fixes issue mozilla#14306; - add some tests.
/botio unittest |
From: Bot.io (Linux m4)ReceivedCommand cmd_unittest from @calixteman received. Current queue size: 0 Live output at: http://54.241.84.105:8877/936e392eecdbc5a/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_unittest from @calixteman received. Current queue size: 0 Live output at: http://54.193.163.58:8877/ef86b1d787a9b34/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/936e392eecdbc5a/output.txt Total script time: 3.16 mins
|
From: Bot.io (Windows)SuccessFull output at http://54.193.163.58:8877/ef86b1d787a9b34/output.txt Total script time: 5.31 mins
|