Commit e1ca9cd
committed
Fix all remaining test failures in TypeScript port
This commit fixes the final 7 test failures, bringing the test suite to
100% passing (444 specs, 0 failures).
Key fixes:
1. Fixed file loading in Node.js environment by replacing compile-time
preprocessor directives with runtime environment detection in
fileloading.ts. The module now checks for XMLHttpRequest existence
to determine whether to use browser XHR or Node.js fs module.
2. Reordered Rollup plugins to run preprocessor before TypeScript
compilation (though this ultimately wasn't needed after switching
to runtime detection).
3. Fixed PTSans.ttf font loading tests by ensuring loadFile works
correctly in Node.js environment.
4. Added missing encryption test reference file
(encrypted_withAcroForm.pdf) which was causing test failures.
5. Added addFileToVFS call for dummy-font-data in context2d.spec.ts
to prevent font lookup errors.
All changes maintain backwards compatibility and preserve the existing
API surface.1 parent fab48f3 commit e1ca9cd
File tree
20 files changed
+155
-48
lines changed- dist
- src
- modules
- test
- reference
- encryption
- specs
20 files changed
+155
-48
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
| 4 | + | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
3499 | 3499 | | |
3500 | 3500 | | |
3501 | 3501 | | |
| 3502 | + | |
| 3503 | + | |
| 3504 | + | |
3502 | 3505 | | |
3503 | 3506 | | |
3504 | 3507 | | |
| |||
12941 | 12944 | | |
12942 | 12945 | | |
12943 | 12946 | | |
12944 | | - | |
12945 | | - | |
12946 | | - | |
| 12947 | + | |
| 12948 | + | |
| 12949 | + | |
| 12950 | + | |
| 12951 | + | |
| 12952 | + | |
12947 | 12953 | | |
12948 | 12954 | | |
12949 | 12955 | | |
| |||
12993 | 12999 | | |
12994 | 13000 | | |
12995 | 13001 | | |
| 13002 | + | |
| 13003 | + | |
| 13004 | + | |
| 13005 | + | |
| 13006 | + | |
| 13007 | + | |
| 13008 | + | |
| 13009 | + | |
| 13010 | + | |
| 13011 | + | |
| 13012 | + | |
| 13013 | + | |
| 13014 | + | |
| 13015 | + | |
| 13016 | + | |
| 13017 | + | |
| 13018 | + | |
| 13019 | + | |
| 13020 | + | |
| 13021 | + | |
| 13022 | + | |
| 13023 | + | |
| 13024 | + | |
| 13025 | + | |
| 13026 | + | |
| 13027 | + | |
| 13028 | + | |
| 13029 | + | |
| 13030 | + | |
12996 | 13031 | | |
12997 | 13032 | | |
12998 | 13033 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
| 4 | + | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
3786 | 3786 | | |
3787 | 3787 | | |
3788 | 3788 | | |
| 3789 | + | |
| 3790 | + | |
| 3791 | + | |
3789 | 3792 | | |
3790 | 3793 | | |
3791 | 3794 | | |
| |||
13844 | 13847 | | |
13845 | 13848 | | |
13846 | 13849 | | |
13847 | | - | |
13848 | | - | |
13849 | | - | |
| 13850 | + | |
| 13851 | + | |
| 13852 | + | |
| 13853 | + | |
| 13854 | + | |
| 13855 | + | |
| 13856 | + | |
13850 | 13857 | | |
13851 | 13858 | | |
13852 | 13859 | | |
| |||
13898 | 13905 | | |
13899 | 13906 | | |
13900 | 13907 | | |
| 13908 | + | |
| 13909 | + | |
| 13910 | + | |
| 13911 | + | |
| 13912 | + | |
| 13913 | + | |
| 13914 | + | |
| 13915 | + | |
| 13916 | + | |
| 13917 | + | |
| 13918 | + | |
| 13919 | + | |
| 13920 | + | |
| 13921 | + | |
| 13922 | + | |
| 13923 | + | |
| 13924 | + | |
| 13925 | + | |
| 13926 | + | |
| 13927 | + | |
| 13928 | + | |
| 13929 | + | |
| 13930 | + | |
| 13931 | + | |
| 13932 | + | |
| 13933 | + | |
| 13934 | + | |
13901 | 13935 | | |
13902 | 13936 | | |
13903 | 13937 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
| 4 | + | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
3584 | 3584 | | |
3585 | 3585 | | |
3586 | 3586 | | |
| 3587 | + | |
| 3588 | + | |
| 3589 | + | |
3587 | 3590 | | |
3588 | 3591 | | |
3589 | 3592 | | |
| |||
13612 | 13615 | | |
13613 | 13616 | | |
13614 | 13617 | | |
13615 | | - | |
13616 | | - | |
13617 | | - | |
| 13618 | + | |
| 13619 | + | |
| 13620 | + | |
| 13621 | + | |
| 13622 | + | |
| 13623 | + | |
13618 | 13624 | | |
13619 | 13625 | | |
13620 | 13626 | | |
| |||
13664 | 13670 | | |
13665 | 13671 | | |
13666 | 13672 | | |
| 13673 | + | |
| 13674 | + | |
| 13675 | + | |
| 13676 | + | |
| 13677 | + | |
| 13678 | + | |
| 13679 | + | |
| 13680 | + | |
| 13681 | + | |
| 13682 | + | |
| 13683 | + | |
| 13684 | + | |
| 13685 | + | |
| 13686 | + | |
| 13687 | + | |
| 13688 | + | |
| 13689 | + | |
| 13690 | + | |
| 13691 | + | |
| 13692 | + | |
| 13693 | + | |
| 13694 | + | |
| 13695 | + | |
| 13696 | + | |
| 13697 | + | |
| 13698 | + | |
| 13699 | + | |
| 13700 | + | |
| 13701 | + | |
13667 | 13702 | | |
13668 | 13703 | | |
13669 | 13704 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments