pdfjs-dist 2.0.489 → 2.2.228

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pdfjs-dist might be problematic. Click here for more details.

Files changed (169) hide show
  1. package/CODE_OF_CONDUCT.md +15 -0
  2. package/bower.json +1 -1
  3. package/build/pdf.js +18515 -11402
  4. package/build/pdf.js.map +1 -1
  5. package/build/pdf.min.js +1 -1
  6. package/build/pdf.worker.js +48266 -37137
  7. package/build/pdf.worker.js.map +1 -1
  8. package/build/pdf.worker.min.js +1 -1
  9. package/external/url/url-lib.js +627 -0
  10. package/image_decoders/pdf.image_decoders.js +11350 -0
  11. package/image_decoders/pdf.image_decoders.js.map +1 -0
  12. package/image_decoders/pdf.image_decoders.min.js +1 -0
  13. package/lib/core/annotation.js +587 -242
  14. package/lib/core/arithmetic_decoder.js +275 -245
  15. package/lib/core/bidi.js +65 -6
  16. package/lib/core/ccitt.js +173 -18
  17. package/lib/core/ccitt_stream.js +15 -6
  18. package/lib/core/cff_parser.js +433 -61
  19. package/lib/core/charsets.js +5 -4
  20. package/lib/core/chunked_stream.js +400 -152
  21. package/lib/core/cmap.js +326 -87
  22. package/lib/core/colorspace.js +874 -594
  23. package/lib/core/core_utils.js +147 -0
  24. package/lib/core/crypto.js +290 -45
  25. package/lib/core/document.js +560 -268
  26. package/lib/core/encodings.js +19 -10
  27. package/lib/core/evaluator.js +1005 -360
  28. package/lib/core/font_renderer.js +331 -97
  29. package/lib/core/fonts.js +812 -195
  30. package/lib/core/function.js +284 -71
  31. package/lib/core/glyphlist.js +4 -3
  32. package/lib/core/image.js +169 -62
  33. package/lib/core/image_utils.js +111 -0
  34. package/lib/core/jbig2.js +479 -66
  35. package/lib/core/jbig2_stream.js +19 -8
  36. package/lib/core/jpeg_stream.js +38 -13
  37. package/lib/core/jpg.js +253 -29
  38. package/lib/core/jpx.js +396 -6
  39. package/lib/core/jpx_stream.js +18 -6
  40. package/lib/core/metrics.js +15 -15
  41. package/lib/core/murmurhash3.js +56 -34
  42. package/lib/core/obj.js +1354 -488
  43. package/lib/core/operator_list.js +144 -31
  44. package/lib/core/parser.js +539 -191
  45. package/lib/core/pattern.js +148 -14
  46. package/lib/core/pdf_manager.js +323 -133
  47. package/lib/core/primitives.js +111 -24
  48. package/lib/core/ps_parser.js +134 -45
  49. package/lib/core/standard_fonts.js +17 -17
  50. package/lib/core/stream.js +313 -34
  51. package/lib/core/type1_parser.js +143 -13
  52. package/lib/core/unicode.js +32 -5
  53. package/lib/core/worker.js +217 -190
  54. package/lib/core/worker_stream.js +277 -0
  55. package/lib/display/annotation_layer.js +450 -133
  56. package/lib/display/api.js +1597 -784
  57. package/lib/display/api_compatibility.js +11 -13
  58. package/lib/display/canvas.js +360 -44
  59. package/lib/display/content_disposition.js +83 -32
  60. package/lib/display/display_utils.js +747 -0
  61. package/lib/display/fetch_stream.js +221 -90
  62. package/lib/display/font_loader.js +468 -236
  63. package/lib/display/metadata.js +38 -16
  64. package/lib/display/network.js +635 -428
  65. package/lib/display/network_utils.js +32 -19
  66. package/lib/display/node_stream.js +367 -175
  67. package/lib/display/pattern_helper.js +81 -31
  68. package/lib/display/svg.js +1235 -519
  69. package/lib/display/text_layer.js +153 -29
  70. package/lib/display/transport_stream.js +345 -94
  71. package/lib/display/webgl.js +64 -18
  72. package/lib/display/worker_options.js +5 -4
  73. package/lib/display/xml_parser.js +166 -53
  74. package/lib/examples/node/domstubs.js +60 -4
  75. package/lib/pdf.js +36 -14
  76. package/lib/pdf.worker.js +5 -3
  77. package/lib/shared/compatibility.js +158 -564
  78. package/lib/shared/global_scope.js +2 -2
  79. package/lib/shared/is_node.js +4 -4
  80. package/lib/shared/message_handler.js +521 -0
  81. package/lib/shared/streams_polyfill.js +21 -17
  82. package/lib/shared/url_polyfill.js +56 -0
  83. package/lib/shared/util.js +243 -710
  84. package/lib/test/unit/annotation_spec.js +870 -401
  85. package/lib/test/unit/api_spec.js +657 -345
  86. package/lib/test/unit/bidi_spec.js +7 -7
  87. package/lib/test/unit/cff_parser_spec.js +54 -11
  88. package/lib/test/unit/clitests_helper.js +10 -8
  89. package/lib/test/unit/cmap_spec.js +95 -41
  90. package/lib/test/unit/colorspace_spec.js +115 -63
  91. package/lib/test/unit/core_utils_spec.js +191 -0
  92. package/lib/test/unit/crypto_spec.js +17 -5
  93. package/lib/test/unit/custom_spec.js +43 -55
  94. package/lib/test/unit/display_svg_spec.js +34 -18
  95. package/lib/test/unit/display_utils_spec.js +273 -0
  96. package/lib/test/unit/document_spec.js +8 -13
  97. package/lib/test/unit/encodings_spec.js +25 -45
  98. package/lib/test/unit/evaluator_spec.js +38 -15
  99. package/lib/test/unit/fetch_stream_spec.js +109 -0
  100. package/lib/test/unit/function_spec.js +17 -5
  101. package/lib/test/unit/jasmine-boot.js +33 -20
  102. package/lib/test/unit/{util_stream_spec.js → message_handler_spec.js} +41 -69
  103. package/lib/test/unit/metadata_spec.js +71 -11
  104. package/lib/test/unit/murmurhash3_spec.js +3 -3
  105. package/lib/test/unit/network_spec.js +19 -54
  106. package/lib/test/unit/network_utils_spec.js +91 -14
  107. package/lib/test/unit/node_stream_spec.js +56 -32
  108. package/lib/test/unit/parser_spec.js +162 -71
  109. package/lib/test/unit/pdf_find_controller_spec.js +230 -0
  110. package/lib/test/unit/pdf_find_utils_spec.js +63 -0
  111. package/lib/test/unit/pdf_history_spec.js +21 -9
  112. package/lib/test/unit/primitives_spec.js +53 -20
  113. package/lib/test/unit/stream_spec.js +12 -4
  114. package/lib/test/unit/test_utils.js +273 -56
  115. package/lib/test/unit/testreporter.js +21 -3
  116. package/lib/test/unit/type1_parser_spec.js +8 -6
  117. package/lib/test/unit/ui_utils_spec.js +454 -16
  118. package/lib/test/unit/unicode_spec.js +18 -15
  119. package/lib/test/unit/util_spec.js +87 -128
  120. package/lib/web/annotation_layer_builder.js +39 -22
  121. package/lib/web/app.js +1290 -588
  122. package/lib/web/app_options.js +100 -62
  123. package/lib/web/base_viewer.js +511 -182
  124. package/lib/web/chromecom.js +261 -117
  125. package/lib/web/debugger.js +166 -22
  126. package/lib/web/download_manager.js +32 -13
  127. package/lib/web/firefox_print_service.js +20 -10
  128. package/lib/web/firefoxcom.js +315 -80
  129. package/lib/web/genericcom.js +89 -30
  130. package/lib/web/genericl10n.js +142 -30
  131. package/lib/web/grab_to_pan.js +28 -4
  132. package/lib/web/interfaces.js +170 -47
  133. package/lib/web/overlay_manager.js +235 -85
  134. package/lib/web/password_prompt.js +22 -14
  135. package/lib/web/pdf_attachment_viewer.js +38 -18
  136. package/lib/web/pdf_cursor_tools.js +39 -16
  137. package/lib/web/pdf_document_properties.js +255 -136
  138. package/lib/web/pdf_find_bar.js +84 -40
  139. package/lib/web/pdf_find_controller.js +495 -184
  140. package/lib/web/pdf_find_utils.js +111 -0
  141. package/lib/web/pdf_history.js +190 -53
  142. package/lib/web/pdf_link_service.js +138 -77
  143. package/lib/web/pdf_outline_viewer.js +122 -46
  144. package/lib/web/pdf_page_view.js +191 -67
  145. package/lib/web/pdf_presentation_mode.js +99 -34
  146. package/lib/web/pdf_print_service.js +61 -13
  147. package/lib/web/pdf_rendering_queue.js +28 -9
  148. package/lib/web/pdf_sidebar.js +141 -81
  149. package/lib/web/pdf_sidebar_resizer.js +42 -16
  150. package/lib/web/pdf_single_page_viewer.js +74 -66
  151. package/lib/web/pdf_thumbnail_view.js +104 -33
  152. package/lib/web/pdf_thumbnail_viewer.js +66 -26
  153. package/lib/web/pdf_viewer.component.js +112 -32
  154. package/lib/web/pdf_viewer.js +91 -52
  155. package/lib/web/preferences.js +284 -89
  156. package/lib/web/secondary_toolbar.js +165 -40
  157. package/lib/web/text_layer_builder.js +134 -59
  158. package/lib/web/toolbar.js +78 -43
  159. package/lib/web/ui_utils.js +462 -136
  160. package/lib/web/view_history.js +215 -67
  161. package/lib/web/viewer_compatibility.js +4 -13
  162. package/package.json +5 -4
  163. package/web/pdf_viewer.css +79 -11
  164. package/web/pdf_viewer.js +6107 -3748
  165. package/web/pdf_viewer.js.map +1 -1
  166. package/lib/display/dom_utils.js +0 -309
  167. package/lib/test/unit/dom_utils_spec.js +0 -89
  168. package/lib/test/unit/fonts_spec.js +0 -81
  169. package/lib/web/dom_events.js +0 -137
@@ -2,7 +2,7 @@
2
2
  * @licstart The following is the entire license notice for the
3
3
  * Javascript code in this page
4
4
  *
5
- * Copyright 2017 Mozilla Foundation
5
+ * Copyright 2019 Mozilla Foundation
6
6
  *
7
7
  * Licensed under the Apache License, Version 2.0 (the "License");
8
8
  * you may not use this file except in compliance with the License.
@@ -19,17 +19,17 @@
19
19
  * @licend The above is the entire license notice for the
20
20
  * Javascript code in this page
21
21
  */
22
- 'use strict';
22
+ "use strict";
23
23
 
24
- var _primitives = require('../../core/primitives');
24
+ var _primitives = require("../../core/primitives");
25
25
 
26
- var _stream = require('../../core/stream');
26
+ var _stream = require("../../core/stream");
27
27
 
28
- var _colorspace = require('../../core/colorspace');
28
+ var _colorspace = require("../../core/colorspace");
29
29
 
30
- var _function = require('../../core/function');
30
+ var _function = require("../../core/function");
31
31
 
32
- var _test_utils = require('./test_utils');
32
+ var _test_utils = require("./test_utils");
33
33
 
34
34
  describe('colorspace', function () {
35
35
  describe('ColorSpace', function () {
@@ -53,36 +53,46 @@ describe('colorspace', function () {
53
53
  describe('DeviceGrayCS', function () {
54
54
  it('should handle the case when cs is a Name object', function () {
55
55
  var cs = _primitives.Name.get('DeviceGray');
56
+
56
57
  var xref = new _test_utils.XRefMock([{
57
- ref: new _primitives.Ref(10, 0),
58
+ ref: _primitives.Ref.get(10, 0),
58
59
  data: new _primitives.Dict()
59
60
  }]);
60
61
  var res = new _primitives.Dict();
61
- var pdfFunctionFactory = new _function.PDFFunctionFactory({ xref: xref });
62
+ var pdfFunctionFactory = new _function.PDFFunctionFactory({
63
+ xref: xref
64
+ });
65
+
62
66
  var colorSpace = _colorspace.ColorSpace.parse(cs, xref, res, pdfFunctionFactory);
67
+
63
68
  var testSrc = new Uint8Array([27, 125, 250, 131]);
64
- var testDest = new Uint8Array(4 * 4 * 3);
65
- var expectedDest = new Uint8Array([27, 27, 27, 27, 27, 27, 125, 125, 125, 125, 125, 125, 27, 27, 27, 27, 27, 27, 125, 125, 125, 125, 125, 125, 250, 250, 250, 250, 250, 250, 131, 131, 131, 131, 131, 131, 250, 250, 250, 250, 250, 250, 131, 131, 131, 131, 131, 131]);
69
+ var testDest = new Uint8ClampedArray(4 * 4 * 3);
70
+ var expectedDest = new Uint8ClampedArray([27, 27, 27, 27, 27, 27, 125, 125, 125, 125, 125, 125, 27, 27, 27, 27, 27, 27, 125, 125, 125, 125, 125, 125, 250, 250, 250, 250, 250, 250, 131, 131, 131, 131, 131, 131, 250, 250, 250, 250, 250, 250, 131, 131, 131, 131, 131, 131]);
66
71
  colorSpace.fillRgb(testDest, 2, 2, 4, 4, 4, 8, testSrc, 0);
67
- expect(colorSpace.getRgb(new Float32Array([0.1]), 0)).toEqual(new Uint8Array([25, 25, 25]));
72
+ expect(colorSpace.getRgb(new Float32Array([0.1]), 0)).toEqual(new Uint8ClampedArray([26, 26, 26]));
68
73
  expect(colorSpace.getOutputLength(2, 0)).toEqual(6);
69
74
  expect(colorSpace.isPassthrough(8)).toBeFalsy();
70
75
  expect(testDest).toEqual(expectedDest);
71
76
  });
72
77
  it('should handle the case when cs is an indirect object', function () {
73
- var cs = new _primitives.Ref(10, 0);
78
+ var cs = _primitives.Ref.get(10, 0);
79
+
74
80
  var xref = new _test_utils.XRefMock([{
75
81
  ref: cs,
76
82
  data: _primitives.Name.get('DeviceGray')
77
83
  }]);
78
84
  var res = new _primitives.Dict();
79
- var pdfFunctionFactory = new _function.PDFFunctionFactory({ xref: xref });
85
+ var pdfFunctionFactory = new _function.PDFFunctionFactory({
86
+ xref: xref
87
+ });
88
+
80
89
  var colorSpace = _colorspace.ColorSpace.parse(cs, xref, res, pdfFunctionFactory);
90
+
81
91
  var testSrc = new Uint8Array([27, 125, 250, 131]);
82
- var testDest = new Uint8Array(3 * 3 * 3);
83
- var expectedDest = new Uint8Array([27, 27, 27, 27, 27, 27, 125, 125, 125, 27, 27, 27, 27, 27, 27, 125, 125, 125, 250, 250, 250, 250, 250, 250, 131, 131, 131]);
92
+ var testDest = new Uint8ClampedArray(3 * 3 * 3);
93
+ var expectedDest = new Uint8ClampedArray([27, 27, 27, 27, 27, 27, 125, 125, 125, 27, 27, 27, 27, 27, 27, 125, 125, 125, 250, 250, 250, 250, 250, 250, 131, 131, 131]);
84
94
  colorSpace.fillRgb(testDest, 2, 2, 3, 3, 3, 8, testSrc, 0);
85
- expect(colorSpace.getRgb(new Float32Array([0.2]), 0)).toEqual(new Uint8Array([51, 51, 51]));
95
+ expect(colorSpace.getRgb(new Float32Array([0.2]), 0)).toEqual(new Uint8ClampedArray([51, 51, 51]));
86
96
  expect(colorSpace.getOutputLength(3, 1)).toEqual(12);
87
97
  expect(colorSpace.isPassthrough(8)).toBeFalsy();
88
98
  expect(testDest).toEqual(expectedDest);
@@ -91,36 +101,46 @@ describe('colorspace', function () {
91
101
  describe('DeviceRgbCS', function () {
92
102
  it('should handle the case when cs is a Name object', function () {
93
103
  var cs = _primitives.Name.get('DeviceRGB');
104
+
94
105
  var xref = new _test_utils.XRefMock([{
95
- ref: new _primitives.Ref(10, 0),
106
+ ref: _primitives.Ref.get(10, 0),
96
107
  data: new _primitives.Dict()
97
108
  }]);
98
109
  var res = new _primitives.Dict();
99
- var pdfFunctionFactory = new _function.PDFFunctionFactory({ xref: xref });
110
+ var pdfFunctionFactory = new _function.PDFFunctionFactory({
111
+ xref: xref
112
+ });
113
+
100
114
  var colorSpace = _colorspace.ColorSpace.parse(cs, xref, res, pdfFunctionFactory);
115
+
101
116
  var testSrc = new Uint8Array([27, 125, 250, 131, 139, 140, 111, 25, 198, 21, 147, 255]);
102
- var testDest = new Uint8Array(4 * 4 * 3);
103
- var expectedDest = new Uint8Array([27, 125, 250, 27, 125, 250, 131, 139, 140, 131, 139, 140, 27, 125, 250, 27, 125, 250, 131, 139, 140, 131, 139, 140, 111, 25, 198, 111, 25, 198, 21, 147, 255, 21, 147, 255, 111, 25, 198, 111, 25, 198, 21, 147, 255, 21, 147, 255]);
117
+ var testDest = new Uint8ClampedArray(4 * 4 * 3);
118
+ var expectedDest = new Uint8ClampedArray([27, 125, 250, 27, 125, 250, 131, 139, 140, 131, 139, 140, 27, 125, 250, 27, 125, 250, 131, 139, 140, 131, 139, 140, 111, 25, 198, 111, 25, 198, 21, 147, 255, 21, 147, 255, 111, 25, 198, 111, 25, 198, 21, 147, 255, 21, 147, 255]);
104
119
  colorSpace.fillRgb(testDest, 2, 2, 4, 4, 4, 8, testSrc, 0);
105
- expect(colorSpace.getRgb(new Float32Array([0.1, 0.2, 0.3]), 0)).toEqual(new Uint8Array([25, 51, 76]));
120
+ expect(colorSpace.getRgb(new Float32Array([0.1, 0.2, 0.3]), 0)).toEqual(new Uint8ClampedArray([26, 51, 77]));
106
121
  expect(colorSpace.getOutputLength(4, 0)).toEqual(4);
107
122
  expect(colorSpace.isPassthrough(8)).toBeTruthy();
108
123
  expect(testDest).toEqual(expectedDest);
109
124
  });
110
125
  it('should handle the case when cs is an indirect object', function () {
111
- var cs = new _primitives.Ref(10, 0);
126
+ var cs = _primitives.Ref.get(10, 0);
127
+
112
128
  var xref = new _test_utils.XRefMock([{
113
129
  ref: cs,
114
130
  data: _primitives.Name.get('DeviceRGB')
115
131
  }]);
116
132
  var res = new _primitives.Dict();
117
- var pdfFunctionFactory = new _function.PDFFunctionFactory({ xref: xref });
133
+ var pdfFunctionFactory = new _function.PDFFunctionFactory({
134
+ xref: xref
135
+ });
136
+
118
137
  var colorSpace = _colorspace.ColorSpace.parse(cs, xref, res, pdfFunctionFactory);
138
+
119
139
  var testSrc = new Uint8Array([27, 125, 250, 131, 139, 140, 111, 25, 198, 21, 147, 255]);
120
- var testDest = new Uint8Array(3 * 3 * 3);
121
- var expectedDest = new Uint8Array([27, 125, 250, 27, 125, 250, 131, 139, 140, 27, 125, 250, 27, 125, 250, 131, 139, 140, 111, 25, 198, 111, 25, 198, 21, 147, 255]);
140
+ var testDest = new Uint8ClampedArray(3 * 3 * 3);
141
+ var expectedDest = new Uint8ClampedArray([27, 125, 250, 27, 125, 250, 131, 139, 140, 27, 125, 250, 27, 125, 250, 131, 139, 140, 111, 25, 198, 111, 25, 198, 21, 147, 255]);
122
142
  colorSpace.fillRgb(testDest, 2, 2, 3, 3, 3, 8, testSrc, 0);
123
- expect(colorSpace.getRgb(new Float32Array([0.1, 0.2, 0.3]), 0)).toEqual(new Uint8Array([25, 51, 76]));
143
+ expect(colorSpace.getRgb(new Float32Array([0.1, 0.2, 0.3]), 0)).toEqual(new Uint8ClampedArray([26, 51, 77]));
124
144
  expect(colorSpace.getOutputLength(4, 1)).toEqual(5);
125
145
  expect(colorSpace.isPassthrough(8)).toBeTruthy();
126
146
  expect(testDest).toEqual(expectedDest);
@@ -129,36 +149,46 @@ describe('colorspace', function () {
129
149
  describe('DeviceCmykCS', function () {
130
150
  it('should handle the case when cs is a Name object', function () {
131
151
  var cs = _primitives.Name.get('DeviceCMYK');
152
+
132
153
  var xref = new _test_utils.XRefMock([{
133
- ref: new _primitives.Ref(10, 0),
154
+ ref: _primitives.Ref.get(10, 0),
134
155
  data: new _primitives.Dict()
135
156
  }]);
136
157
  var res = new _primitives.Dict();
137
- var pdfFunctionFactory = new _function.PDFFunctionFactory({ xref: xref });
158
+ var pdfFunctionFactory = new _function.PDFFunctionFactory({
159
+ xref: xref
160
+ });
161
+
138
162
  var colorSpace = _colorspace.ColorSpace.parse(cs, xref, res, pdfFunctionFactory);
163
+
139
164
  var testSrc = new Uint8Array([27, 125, 250, 128, 131, 139, 140, 45, 111, 25, 198, 78, 21, 147, 255, 69]);
140
- var testDest = new Uint8Array(4 * 4 * 3);
141
- var expectedDest = new Uint8Array([135, 80, 18, 135, 80, 18, 113, 102, 97, 113, 102, 97, 135, 80, 18, 135, 80, 18, 113, 102, 97, 113, 102, 97, 112, 143, 75, 112, 143, 75, 188, 98, 27, 188, 98, 27, 112, 143, 75, 112, 143, 75, 188, 98, 27, 188, 98, 27]);
165
+ var testDest = new Uint8ClampedArray(4 * 4 * 3);
166
+ var expectedDest = new Uint8ClampedArray([135, 81, 18, 135, 81, 18, 114, 102, 97, 114, 102, 97, 135, 81, 18, 135, 81, 18, 114, 102, 97, 114, 102, 97, 112, 144, 75, 112, 144, 75, 188, 98, 27, 188, 98, 27, 112, 144, 75, 112, 144, 75, 188, 98, 27, 188, 98, 27]);
142
167
  colorSpace.fillRgb(testDest, 2, 2, 4, 4, 4, 8, testSrc, 0);
143
- expect(colorSpace.getRgb(new Float32Array([0.1, 0.2, 0.3, 1]), 0)).toEqual(new Uint8Array([31, 27, 20]));
168
+ expect(colorSpace.getRgb(new Float32Array([0.1, 0.2, 0.3, 1]), 0)).toEqual(new Uint8ClampedArray([32, 28, 21]));
144
169
  expect(colorSpace.getOutputLength(4, 0)).toEqual(3);
145
170
  expect(colorSpace.isPassthrough(8)).toBeFalsy();
146
171
  expect(testDest).toEqual(expectedDest);
147
172
  });
148
173
  it('should handle the case when cs is an indirect object', function () {
149
- var cs = new _primitives.Ref(10, 0);
174
+ var cs = _primitives.Ref.get(10, 0);
175
+
150
176
  var xref = new _test_utils.XRefMock([{
151
177
  ref: cs,
152
178
  data: _primitives.Name.get('DeviceCMYK')
153
179
  }]);
154
180
  var res = new _primitives.Dict();
155
- var pdfFunctionFactory = new _function.PDFFunctionFactory({ xref: xref });
181
+ var pdfFunctionFactory = new _function.PDFFunctionFactory({
182
+ xref: xref
183
+ });
184
+
156
185
  var colorSpace = _colorspace.ColorSpace.parse(cs, xref, res, pdfFunctionFactory);
186
+
157
187
  var testSrc = new Uint8Array([27, 125, 250, 128, 131, 139, 140, 45, 111, 25, 198, 78, 21, 147, 255, 69]);
158
- var testDest = new Uint8Array(3 * 3 * 3);
159
- var expectedDest = new Uint8Array([135, 80, 18, 135, 80, 18, 113, 102, 97, 135, 80, 18, 135, 80, 18, 113, 102, 97, 112, 143, 75, 112, 143, 75, 188, 98, 27]);
188
+ var testDest = new Uint8ClampedArray(3 * 3 * 3);
189
+ var expectedDest = new Uint8ClampedArray([135, 81, 18, 135, 81, 18, 114, 102, 97, 135, 81, 18, 135, 81, 18, 114, 102, 97, 112, 144, 75, 112, 144, 75, 188, 98, 27]);
160
190
  colorSpace.fillRgb(testDest, 2, 2, 3, 3, 3, 8, testSrc, 0);
161
- expect(colorSpace.getRgb(new Float32Array([0.1, 0.2, 0.3, 1]), 0)).toEqual(new Uint8Array([31, 27, 20]));
191
+ expect(colorSpace.getRgb(new Float32Array([0.1, 0.2, 0.3, 1]), 0)).toEqual(new Uint8ClampedArray([32, 28, 21]));
162
192
  expect(colorSpace.getOutputLength(4, 1)).toEqual(4);
163
193
  expect(colorSpace.isPassthrough(8)).toBeFalsy();
164
194
  expect(testDest).toEqual(expectedDest);
@@ -172,17 +202,21 @@ describe('colorspace', function () {
172
202
  params.set('Gamma', 2.0);
173
203
  var cs = [_primitives.Name.get('CalGray'), params];
174
204
  var xref = new _test_utils.XRefMock([{
175
- ref: new _primitives.Ref(10, 0),
205
+ ref: _primitives.Ref.get(10, 0),
176
206
  data: new _primitives.Dict()
177
207
  }]);
178
208
  var res = new _primitives.Dict();
179
- var pdfFunctionFactory = new _function.PDFFunctionFactory({ xref: xref });
209
+ var pdfFunctionFactory = new _function.PDFFunctionFactory({
210
+ xref: xref
211
+ });
212
+
180
213
  var colorSpace = _colorspace.ColorSpace.parse(cs, xref, res, pdfFunctionFactory);
214
+
181
215
  var testSrc = new Uint8Array([27, 125, 250, 131]);
182
- var testDest = new Uint8Array(4 * 4 * 3);
183
- var expectedDest = new Uint8Array([25, 25, 25, 25, 25, 25, 143, 143, 143, 143, 143, 143, 25, 25, 25, 25, 25, 25, 143, 143, 143, 143, 143, 143, 251, 251, 251, 251, 251, 251, 148, 148, 148, 148, 148, 148, 251, 251, 251, 251, 251, 251, 148, 148, 148, 148, 148, 148]);
216
+ var testDest = new Uint8ClampedArray(4 * 4 * 3);
217
+ var expectedDest = new Uint8ClampedArray([25, 25, 25, 25, 25, 25, 143, 143, 143, 143, 143, 143, 25, 25, 25, 25, 25, 25, 143, 143, 143, 143, 143, 143, 251, 251, 251, 251, 251, 251, 149, 149, 149, 149, 149, 149, 251, 251, 251, 251, 251, 251, 149, 149, 149, 149, 149, 149]);
184
218
  colorSpace.fillRgb(testDest, 2, 2, 4, 4, 4, 8, testSrc, 0);
185
- expect(colorSpace.getRgb(new Float32Array([1.0]), 0)).toEqual(new Uint8Array([255, 255, 255]));
219
+ expect(colorSpace.getRgb(new Float32Array([1.0]), 0)).toEqual(new Uint8ClampedArray([255, 255, 255]));
186
220
  expect(colorSpace.getOutputLength(4, 0)).toEqual(12);
187
221
  expect(colorSpace.isPassthrough(8)).toBeFalsy();
188
222
  expect(testDest).toEqual(expectedDest);
@@ -197,17 +231,21 @@ describe('colorspace', function () {
197
231
  params.set('Matrix', [1, 0, 0, 0, 1, 0, 0, 0, 1]);
198
232
  var cs = [_primitives.Name.get('CalRGB'), params];
199
233
  var xref = new _test_utils.XRefMock([{
200
- ref: new _primitives.Ref(10, 0),
234
+ ref: _primitives.Ref.get(10, 0),
201
235
  data: new _primitives.Dict()
202
236
  }]);
203
237
  var res = new _primitives.Dict();
204
- var pdfFunctionFactory = new _function.PDFFunctionFactory({ xref: xref });
238
+ var pdfFunctionFactory = new _function.PDFFunctionFactory({
239
+ xref: xref
240
+ });
241
+
205
242
  var colorSpace = _colorspace.ColorSpace.parse(cs, xref, res, pdfFunctionFactory);
243
+
206
244
  var testSrc = new Uint8Array([27, 125, 250, 131, 139, 140, 111, 25, 198, 21, 147, 255]);
207
- var testDest = new Uint8Array(3 * 3 * 3);
208
- var expectedDest = new Uint8Array([0, 238, 255, 0, 238, 255, 185, 196, 195, 0, 238, 255, 0, 238, 255, 185, 196, 195, 235, 0, 243, 235, 0, 243, 0, 255, 255]);
245
+ var testDest = new Uint8ClampedArray(3 * 3 * 3);
246
+ var expectedDest = new Uint8ClampedArray([0, 238, 255, 0, 238, 255, 185, 196, 195, 0, 238, 255, 0, 238, 255, 185, 196, 195, 235, 0, 243, 235, 0, 243, 0, 255, 255]);
209
247
  colorSpace.fillRgb(testDest, 2, 2, 3, 3, 3, 8, testSrc, 0);
210
- expect(colorSpace.getRgb(new Float32Array([0.1, 0.2, 0.3]), 0)).toEqual(new Uint8Array([0, 147, 151]));
248
+ expect(colorSpace.getRgb(new Float32Array([0.1, 0.2, 0.3]), 0)).toEqual(new Uint8ClampedArray([0, 147, 151]));
211
249
  expect(colorSpace.getOutputLength(4, 0)).toEqual(4);
212
250
  expect(colorSpace.isPassthrough(8)).toBeFalsy();
213
251
  expect(testDest).toEqual(expectedDest);
@@ -221,17 +259,21 @@ describe('colorspace', function () {
221
259
  params.set('Range', [-100, 100, -100, 100]);
222
260
  var cs = [_primitives.Name.get('Lab'), params];
223
261
  var xref = new _test_utils.XRefMock([{
224
- ref: new _primitives.Ref(10, 0),
262
+ ref: _primitives.Ref.get(10, 0),
225
263
  data: new _primitives.Dict()
226
264
  }]);
227
265
  var res = new _primitives.Dict();
228
- var pdfFunctionFactory = new _function.PDFFunctionFactory({ xref: xref });
266
+ var pdfFunctionFactory = new _function.PDFFunctionFactory({
267
+ xref: xref
268
+ });
269
+
229
270
  var colorSpace = _colorspace.ColorSpace.parse(cs, xref, res, pdfFunctionFactory);
271
+
230
272
  var testSrc = new Uint8Array([27, 25, 50, 31, 19, 40, 11, 25, 98, 21, 47, 55]);
231
- var testDest = new Uint8Array(3 * 3 * 3);
232
- var expectedDest = new Uint8Array([0, 49, 101, 0, 49, 101, 0, 53, 116, 0, 49, 101, 0, 49, 101, 0, 53, 116, 0, 40, 39, 0, 40, 39, 0, 43, 90]);
273
+ var testDest = new Uint8ClampedArray(3 * 3 * 3);
274
+ var expectedDest = new Uint8ClampedArray([0, 49, 101, 0, 49, 101, 0, 53, 117, 0, 49, 101, 0, 49, 101, 0, 53, 117, 0, 41, 40, 0, 41, 40, 0, 43, 90]);
233
275
  colorSpace.fillRgb(testDest, 2, 2, 3, 3, 3, 8, testSrc, 0);
234
- expect(colorSpace.getRgb([55, 25, 35], 0)).toEqual(new Uint8Array([188, 99, 61]));
276
+ expect(colorSpace.getRgb([55, 25, 35], 0)).toEqual(new Uint8ClampedArray([188, 100, 61]));
235
277
  expect(colorSpace.getOutputLength(4, 0)).toEqual(4);
236
278
  expect(colorSpace.isPassthrough(8)).toBeFalsy();
237
279
  expect(colorSpace.isDefaultDecode([0, 1])).toBeTruthy();
@@ -243,19 +285,23 @@ describe('colorspace', function () {
243
285
  var lookup = new Uint8Array([23, 155, 35, 147, 69, 93, 255, 109, 70]);
244
286
  var cs = [_primitives.Name.get('Indexed'), _primitives.Name.get('DeviceRGB'), 2, lookup];
245
287
  var xref = new _test_utils.XRefMock([{
246
- ref: new _primitives.Ref(10, 0),
288
+ ref: _primitives.Ref.get(10, 0),
247
289
  data: new _primitives.Dict()
248
290
  }]);
249
291
  var res = new _primitives.Dict();
250
- var pdfFunctionFactory = new _function.PDFFunctionFactory({ xref: xref });
292
+ var pdfFunctionFactory = new _function.PDFFunctionFactory({
293
+ xref: xref
294
+ });
295
+
251
296
  var colorSpace = _colorspace.ColorSpace.parse(cs, xref, res, pdfFunctionFactory);
297
+
252
298
  var testSrc = new Uint8Array([2, 2, 0, 1]);
253
- var testDest = new Uint8Array(3 * 3 * 3);
254
- var expectedDest = new Uint8Array([255, 109, 70, 255, 109, 70, 255, 109, 70, 255, 109, 70, 255, 109, 70, 255, 109, 70, 23, 155, 35, 23, 155, 35, 147, 69, 93]);
299
+ var testDest = new Uint8ClampedArray(3 * 3 * 3);
300
+ var expectedDest = new Uint8ClampedArray([255, 109, 70, 255, 109, 70, 255, 109, 70, 255, 109, 70, 255, 109, 70, 255, 109, 70, 23, 155, 35, 23, 155, 35, 147, 69, 93]);
255
301
  colorSpace.fillRgb(testDest, 2, 2, 3, 3, 3, 8, testSrc, 0);
256
- expect(colorSpace.getRgb([2], 0)).toEqual(new Uint8Array([255, 109, 70]));
302
+ expect(colorSpace.getRgb([2], 0)).toEqual(new Uint8ClampedArray([255, 109, 70]));
257
303
  expect(colorSpace.isPassthrough(8)).toBeFalsy();
258
- expect(colorSpace.isDefaultDecode([0, 1])).toBeTruthy();
304
+ expect(colorSpace.isDefaultDecode([0, 1], 1)).toBeTruthy();
259
305
  expect(testDest).toEqual(expectedDest);
260
306
  });
261
307
  });
@@ -268,20 +314,26 @@ describe('colorspace', function () {
268
314
  fnDict.set('Length', 58);
269
315
  var fn = new _stream.StringStream('{ dup 0.84 mul ' + 'exch 0.00 exch ' + 'dup 0.44 mul ' + 'exch 0.21 mul }');
270
316
  fn = new _stream.Stream(fn.bytes, 0, 58, fnDict);
271
- var fnRef = new _primitives.Ref(10, 0);
317
+
318
+ var fnRef = _primitives.Ref.get(10, 0);
319
+
272
320
  var cs = [_primitives.Name.get('Separation'), _primitives.Name.get('LogoGreen'), _primitives.Name.get('DeviceCMYK'), fnRef];
273
321
  var xref = new _test_utils.XRefMock([{
274
322
  ref: fnRef,
275
323
  data: fn
276
324
  }]);
277
325
  var res = new _primitives.Dict();
278
- var pdfFunctionFactory = new _function.PDFFunctionFactory({ xref: xref });
326
+ var pdfFunctionFactory = new _function.PDFFunctionFactory({
327
+ xref: xref
328
+ });
329
+
279
330
  var colorSpace = _colorspace.ColorSpace.parse(cs, xref, res, pdfFunctionFactory);
331
+
280
332
  var testSrc = new Uint8Array([27, 25, 50, 31]);
281
- var testDest = new Uint8Array(3 * 3 * 3);
282
- var expectedDest = new Uint8Array([227, 243, 242, 227, 243, 242, 228, 243, 242, 227, 243, 242, 227, 243, 242, 228, 243, 242, 203, 233, 229, 203, 233, 229, 222, 241, 239]);
333
+ var testDest = new Uint8ClampedArray(3 * 3 * 3);
334
+ var expectedDest = new Uint8ClampedArray([226, 242, 241, 226, 242, 241, 229, 244, 242, 226, 242, 241, 226, 242, 241, 229, 244, 242, 203, 232, 229, 203, 232, 229, 222, 241, 238]);
283
335
  colorSpace.fillRgb(testDest, 2, 2, 3, 3, 3, 8, testSrc, 0);
284
- expect(colorSpace.getRgb([0.1], 0)).toEqual(new Uint8Array([228, 243, 241]));
336
+ expect(colorSpace.getRgb([0.1], 0)).toEqual(new Uint8ClampedArray([228, 243, 242]));
285
337
  expect(colorSpace.isPassthrough(8)).toBeFalsy();
286
338
  expect(colorSpace.isDefaultDecode([0, 1])).toBeTruthy();
287
339
  expect(testDest).toEqual(expectedDest);
@@ -0,0 +1,191 @@
1
+ /**
2
+ * @licstart The following is the entire license notice for the
3
+ * Javascript code in this page
4
+ *
5
+ * Copyright 2019 Mozilla Foundation
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ *
19
+ * @licend The above is the entire license notice for the
20
+ * Javascript code in this page
21
+ */
22
+ "use strict";
23
+
24
+ var _primitives = require("../../core/primitives");
25
+
26
+ var _core_utils = require("../../core/core_utils");
27
+
28
+ var _test_utils = require("./test_utils");
29
+
30
+ describe('core_utils', function () {
31
+ describe('getInheritableProperty', function () {
32
+ it('handles non-dictionary arguments', function () {
33
+ expect((0, _core_utils.getInheritableProperty)({
34
+ dict: null,
35
+ key: 'foo'
36
+ })).toEqual(undefined);
37
+ expect((0, _core_utils.getInheritableProperty)({
38
+ dict: undefined,
39
+ key: 'foo'
40
+ })).toEqual(undefined);
41
+ });
42
+ it('handles dictionaries that do not contain the property', function () {
43
+ var emptyDict = new _primitives.Dict();
44
+ expect((0, _core_utils.getInheritableProperty)({
45
+ dict: emptyDict,
46
+ key: 'foo'
47
+ })).toEqual(undefined);
48
+ var filledDict = new _primitives.Dict();
49
+ filledDict.set('bar', 'baz');
50
+ expect((0, _core_utils.getInheritableProperty)({
51
+ dict: filledDict,
52
+ key: 'foo'
53
+ })).toEqual(undefined);
54
+ });
55
+ it('fetches the property if it is not inherited', function () {
56
+ var ref = _primitives.Ref.get(10, 0);
57
+
58
+ var xref = new _test_utils.XRefMock([{
59
+ ref: ref,
60
+ data: 'quux'
61
+ }]);
62
+ var dict = new _primitives.Dict(xref);
63
+ dict.set('foo', 'bar');
64
+ expect((0, _core_utils.getInheritableProperty)({
65
+ dict: dict,
66
+ key: 'foo'
67
+ })).toEqual('bar');
68
+ dict.set('baz', ['qux', ref]);
69
+ expect((0, _core_utils.getInheritableProperty)({
70
+ dict: dict,
71
+ key: 'baz',
72
+ getArray: true
73
+ })).toEqual(['qux', 'quux']);
74
+ });
75
+ it('fetches the property if it is inherited and present on one level', function () {
76
+ var ref = _primitives.Ref.get(10, 0);
77
+
78
+ var xref = new _test_utils.XRefMock([{
79
+ ref: ref,
80
+ data: 'quux'
81
+ }]);
82
+ var firstDict = new _primitives.Dict(xref);
83
+ var secondDict = new _primitives.Dict(xref);
84
+ firstDict.set('Parent', secondDict);
85
+ secondDict.set('foo', 'bar');
86
+ expect((0, _core_utils.getInheritableProperty)({
87
+ dict: firstDict,
88
+ key: 'foo'
89
+ })).toEqual('bar');
90
+ secondDict.set('baz', ['qux', ref]);
91
+ expect((0, _core_utils.getInheritableProperty)({
92
+ dict: firstDict,
93
+ key: 'baz',
94
+ getArray: true
95
+ })).toEqual(['qux', 'quux']);
96
+ });
97
+ it('fetches the property if it is inherited and present on multiple levels', function () {
98
+ var ref = _primitives.Ref.get(10, 0);
99
+
100
+ var xref = new _test_utils.XRefMock([{
101
+ ref: ref,
102
+ data: 'quux'
103
+ }]);
104
+ var firstDict = new _primitives.Dict(xref);
105
+ var secondDict = new _primitives.Dict(xref);
106
+ firstDict.set('Parent', secondDict);
107
+ firstDict.set('foo', 'bar1');
108
+ secondDict.set('foo', 'bar2');
109
+ expect((0, _core_utils.getInheritableProperty)({
110
+ dict: firstDict,
111
+ key: 'foo'
112
+ })).toEqual('bar1');
113
+ expect((0, _core_utils.getInheritableProperty)({
114
+ dict: firstDict,
115
+ key: 'foo',
116
+ getArray: false,
117
+ stopWhenFound: false
118
+ })).toEqual(['bar1', 'bar2']);
119
+ firstDict.set('baz', ['qux1', ref]);
120
+ secondDict.set('baz', ['qux2', ref]);
121
+ expect((0, _core_utils.getInheritableProperty)({
122
+ dict: firstDict,
123
+ key: 'baz',
124
+ getArray: true,
125
+ stopWhenFound: false
126
+ })).toEqual([['qux1', 'quux'], ['qux2', 'quux']]);
127
+ });
128
+ it('stops searching when the loop limit is reached', function () {
129
+ var dict = new _primitives.Dict();
130
+ var currentDict = dict;
131
+ var parentDict = null;
132
+
133
+ for (var i = 0; i < 150; i++) {
134
+ parentDict = new _primitives.Dict();
135
+ currentDict.set('Parent', parentDict);
136
+ currentDict = parentDict;
137
+ }
138
+
139
+ parentDict.set('foo', 'bar');
140
+ expect((0, _core_utils.getInheritableProperty)({
141
+ dict: dict,
142
+ key: 'foo'
143
+ })).toEqual(undefined);
144
+ dict.set('foo', 'baz');
145
+ expect((0, _core_utils.getInheritableProperty)({
146
+ dict: dict,
147
+ key: 'foo',
148
+ getArray: false,
149
+ stopWhenFound: false
150
+ })).toEqual(['baz']);
151
+ });
152
+ });
153
+ describe('toRomanNumerals', function () {
154
+ it('handles invalid arguments', function () {
155
+ var _loop = function _loop() {
156
+ var input = _arr[_i];
157
+ expect(function () {
158
+ (0, _core_utils.toRomanNumerals)(input);
159
+ }).toThrow(new Error('The number should be a positive integer.'));
160
+ };
161
+
162
+ for (var _i = 0, _arr = ['foo', -1, 0]; _i < _arr.length; _i++) {
163
+ _loop();
164
+ }
165
+ });
166
+ it('converts numbers to uppercase Roman numerals', function () {
167
+ expect((0, _core_utils.toRomanNumerals)(1)).toEqual('I');
168
+ expect((0, _core_utils.toRomanNumerals)(6)).toEqual('VI');
169
+ expect((0, _core_utils.toRomanNumerals)(7)).toEqual('VII');
170
+ expect((0, _core_utils.toRomanNumerals)(8)).toEqual('VIII');
171
+ expect((0, _core_utils.toRomanNumerals)(10)).toEqual('X');
172
+ expect((0, _core_utils.toRomanNumerals)(40)).toEqual('XL');
173
+ expect((0, _core_utils.toRomanNumerals)(100)).toEqual('C');
174
+ expect((0, _core_utils.toRomanNumerals)(500)).toEqual('D');
175
+ expect((0, _core_utils.toRomanNumerals)(1000)).toEqual('M');
176
+ expect((0, _core_utils.toRomanNumerals)(2019)).toEqual('MMXIX');
177
+ });
178
+ it('converts numbers to lowercase Roman numerals', function () {
179
+ expect((0, _core_utils.toRomanNumerals)(1, true)).toEqual('i');
180
+ expect((0, _core_utils.toRomanNumerals)(6, true)).toEqual('vi');
181
+ expect((0, _core_utils.toRomanNumerals)(7, true)).toEqual('vii');
182
+ expect((0, _core_utils.toRomanNumerals)(8, true)).toEqual('viii');
183
+ expect((0, _core_utils.toRomanNumerals)(10, true)).toEqual('x');
184
+ expect((0, _core_utils.toRomanNumerals)(40, true)).toEqual('xl');
185
+ expect((0, _core_utils.toRomanNumerals)(100, true)).toEqual('c');
186
+ expect((0, _core_utils.toRomanNumerals)(500, true)).toEqual('d');
187
+ expect((0, _core_utils.toRomanNumerals)(1000, true)).toEqual('m');
188
+ expect((0, _core_utils.toRomanNumerals)(2019, true)).toEqual('mmxix');
189
+ });
190
+ });
191
+ });
@@ -2,7 +2,7 @@
2
2
  * @licstart The following is the entire license notice for the
3
3
  * Javascript code in this page
4
4
  *
5
- * Copyright 2017 Mozilla Foundation
5
+ * Copyright 2019 Mozilla Foundation
6
6
  *
7
7
  * Licensed under the Apache License, Version 2.0 (the "License");
8
8
  * you may not use this file except in compliance with the License.
@@ -19,13 +19,13 @@
19
19
  * @licend The above is the entire license notice for the
20
20
  * Javascript code in this page
21
21
  */
22
- 'use strict';
22
+ "use strict";
23
23
 
24
- var _crypto = require('../../core/crypto');
24
+ var _crypto = require("../../core/crypto");
25
25
 
26
- var _primitives = require('../../core/primitives');
26
+ var _primitives = require("../../core/primitives");
27
27
 
28
- var _util = require('../../shared/util');
28
+ var _util = require("../../shared/util");
29
29
 
30
30
  describe('crypto', function () {
31
31
  function hex2binary(s) {
@@ -35,14 +35,17 @@ describe('crypto', function () {
35
35
  i,
36
36
  j;
37
37
  var result = new Uint8Array(n);
38
+
38
39
  for (i = 0, j = 0; i < n; ++i) {
39
40
  var d1 = s.charAt(j++);
40
41
  var d2 = s.charAt(j++);
41
42
  var value = digits.indexOf(d1) << 4 | digits.indexOf(d2);
42
43
  result[i] = value;
43
44
  }
45
+
44
46
  return result;
45
47
  }
48
+
46
49
  describe('calculateMD5', function () {
47
50
  it('should pass RFC 1321 test #1', function () {
48
51
  var input, result, expected;
@@ -357,11 +360,14 @@ describe('crypto', function () {
357
360
  describe('CipherTransformFactory', function () {
358
361
  function buildDict(map) {
359
362
  var dict = new _primitives.Dict();
363
+
360
364
  for (var key in map) {
361
365
  dict.set(key, map[key]);
362
366
  }
367
+
363
368
  return dict;
364
369
  }
370
+
365
371
  function ensurePasswordCorrect(done, dict, fileId, password) {
366
372
  try {
367
373
  var factory = new _crypto.CipherTransformFactory(dict, fileId, password);
@@ -370,8 +376,10 @@ describe('CipherTransformFactory', function () {
370
376
  done.fail('Password should be accepted: ' + ex);
371
377
  return;
372
378
  }
379
+
373
380
  done();
374
381
  }
382
+
375
383
  function ensurePasswordNeeded(done, dict, fileId, password) {
376
384
  try {
377
385
  new _crypto.CipherTransformFactory(dict, fileId, password);
@@ -381,8 +389,10 @@ describe('CipherTransformFactory', function () {
381
389
  done();
382
390
  return;
383
391
  }
392
+
384
393
  done.fail('Password should be rejected.');
385
394
  }
395
+
386
396
  function ensurePasswordIncorrect(done, dict, fileId, password) {
387
397
  try {
388
398
  new _crypto.CipherTransformFactory(dict, fileId, password);
@@ -392,8 +402,10 @@ describe('CipherTransformFactory', function () {
392
402
  done();
393
403
  return;
394
404
  }
405
+
395
406
  done.fail('Password should be rejected.');
396
407
  }
408
+
397
409
  var fileId1, fileId2, dict1, dict2;
398
410
  var aes256Dict, aes256IsoDict, aes256BlankDict, aes256IsoBlankDict;
399
411
  beforeAll(function (done) {