Skip to content

Fix CMap unit tests #5185

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

Merged
merged 2 commits into from
Aug 14, 2014
Merged

Fix CMap unit tests #5185

merged 2 commits into from
Aug 14, 2014

Conversation

Snuffleupagus
Copy link
Collaborator

When the binary CMaps were added, some of the relevant unit tests were not changed. This patch updates them, so that we actually test the current implementation.
What's somewhat troubling here is that we currently have CMap unit tests that passes, despite not working as intended (the CMap files doesn't load).

Edit: When failing to GET a CMap we should error, see cmap.js#L390-L392 and cmap.js#L930-L932, but the condition isn't true, even when the CMap fails to load.
I found a review comment for PR #4259 that was never addressed, which (in my testing) would fix the current situation where we fail to throw an error when the CMap is unavailable.
@yurydelendik If you think it's a good idea, I'd be happy to follow-up this PR with that fix!

In this PR I'm also removing the remaining references to cidmaps.js, which I missed in #5088.

When the binary CMaps were added, some of the relevant unit tests were not changed. This patch updates them, so that we actually test the current implementation.
What's somewhat troubling here is that we currently have CMap unit tests that passes, *despite* not working as intended (the CMap files doesn't load).
@Snuffleupagus
Copy link
Collaborator Author

/botio unittest

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

Command cmd_unittest from @Snuffleupagus received. Current queue size: 0

Live output at: http://107.21.233.14:8877/376f0b4cc9e4f38/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_unittest from @Snuffleupagus received. Current queue size: 0

Live output at: http://107.22.172.223:8877/6a1baadc4f3441c/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/376f0b4cc9e4f38/output.txt

Total script time: 0.64 mins

  • Unit Tests: Passed

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://107.22.172.223:8877/6a1baadc4f3441c/output.txt

Total script time: 0.70 mins

  • Unit Tests: Passed

@Snuffleupagus Snuffleupagus changed the title Fix cmap unittests Fix CMap unit tests Aug 14, 2014
@yurydelendik
Copy link
Contributor

If you think it's a good idea, I'd be happy to follow-up this PR with that fix!

It's a good idea. New PR will be okay for that.

yurydelendik added a commit that referenced this pull request Aug 14, 2014
@yurydelendik yurydelendik merged commit d07b26d into mozilla:master Aug 14, 2014
@yurydelendik
Copy link
Contributor

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants