Jonas Jenwald
52e0f51917
Enable the no-unused-vars
ESLint rule
...
Please see http://eslint.org/docs/rules/no-unused-vars ; note that this patch purposely uses the same rule options as in `mozilla-central`, such that it fixes part of issue 7957.
It wasn't, in my opinion, entirely straightforward to enable this rule compared to the already existing rules. In many cases a `var descriptiveName = ...` format was used (more or less) to document the code, and I choose to place the old variable name in a trailing comment to not lose that information.
I welcome feedback on these changes, since it wasn't always entirely easy to know what changes made the most sense in every situation.
2017-01-29 23:23:17 +01:00
Jonas Jenwald
3820946301
Fix (most) errors reported by the no-multi-spaces
ESLint rule
...
http://eslint.org/docs/rules/no-multi-spaces
2016-12-12 20:35:51 +01:00
Jonas Jenwald
3a105e37f4
Ensure that test/driver.js
actually takes the same Annotation
code-path as the viewer when running forms
tests (PR 7633 follow-up)
...
Unfortunately PR 7633 missed, and I didn't catch it during review, to update `test/driver.js` such that the `forms` tests takes the correct code-path.
This resultet in the `forms` reference test images looking better than they should, and more problematicly differing from the rendering in the viewer.
With this patch, the tests now correctly skip over any `Appearance` streams.
The `forms` tests now highlights quite clearly (e.g. look at `annotation-tx2.pdf`/`annotation-tx3.pdf`) that we cannot just skip the `Appearance` streams when rendering forms. Hence we're going to have to find a way to fix that *before* enabling forms by default, since both display *and* print would look completely wrong otherwise.
Finally, this patch also uncovers one more existing bug that still needs to be fixed, since the current `rasterizeAnnotationLayer` in `test/driver.js` isn't able to handle the contents of e.g. `<input>` and `<textarea>`.
2016-09-21 12:21:20 +02:00
Tim van der Meij
e281ce7c73
Enable regression testing for interactive forms
2016-09-07 16:50:44 +02:00
Jeremy Press
1ceeb4d17b
added text enhancement regression tests
2016-08-31 09:54:52 -07:00
Jeremy Press
6faa84abdb
Continuing fairexpand #6663
...
1. Expanding divs to improve text selection. (Yury)
2. Adding enhanceTextSelection as an option.
3. Moving feature functionality from text_layer_builder.js to text_layer.js.
4. Added expandTextDivs method to only load expanded divs on first click, and only show on subsequent clicks
2016-08-31 09:54:52 -07:00
Jonas Jenwald
f297e4d17c
[api-minor] Add a parameter to PDFPageProxy_getTextContent
that controls whether PartialEvaluator_getTextContent
will attempt to combine same line text items
...
From the discussion in issue 7445, it seems that there may be cases where an API consumer would want to get the text content as is, without combined text items.
2016-07-19 13:38:57 +02:00
Prakash Palanisamy
a25c29d98d
Remove combineUrl
and replace it with new URL
.
2016-04-15 21:33:10 +05:30
Brendan Dahl
fb47490648
Log uncaught global errors.
2016-03-22 15:49:32 -07:00
Tim van der Meij
b7217a2274
Implement annotation layer regression testing
2015-12-20 13:45:56 +01:00
Yury Delendik
6b60c8f4db
Adds UMD headers to core, display and shared files.
2015-12-15 13:24:39 -06:00
Jonas Jenwald
6dfe53b976
[api-minor] Add a parameter to PDFPageProxy_getTextContent
that enables replacing of all whitespace with standard spaces in the textLayer (issue 6612)
...
This patch goes a bit further than issue 6612 requires, and replaces all kinds of whitespace with standard spaces.
When testing this locally, it actually seemed to slightly improve two existing test-cases (`tracemonkey-text` and `taro-text`).
Fixes 6612.
2015-11-25 17:28:40 +01:00
Yury Delendik
bd7f121c83
Better "text" testing.
2015-11-19 11:03:52 -06:00
Yury Delendik
194994a289
Merge pull request #6551 from yurydelendik/subaa
...
[api-minor] Enables subpixel anti-aliasing for most of the content.
2015-11-17 19:45:32 -06:00
Yury Delendik
1d8800370a
Allow subpixel anti-aliasing for most of the content.
2015-11-16 10:50:02 -06:00
Manas
a2ba1b8189
Uses editorconfig to maintain consistent coding styles
...
Removes the following as they unnecessary
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
2015-11-14 07:32:18 +05:30
Rob Wu
b627a1a0d9
Add --testfilter (-t) flag to run a specific test
2015-07-18 17:31:56 +02:00
Tim van der Meij
e02ab9fb79
Implement an option to disable automatic scrolling
...
This adds a checkbox with which one can disable scrolling, for example to look back at output during testing. Note that the styles are inline because the test runner removes all <style> elements for each test.
2015-05-21 20:19:36 +02:00
Tim van der Meij
07ec736eb9
Improve driver code structure
...
- Improve variable names and move variables to the top of the method
- Use constants where possible
- Only print the delay text if there is an atual delay set
- Simplify continuation logic in _nextTask
- Do not pass anything to clearCanvas: we can get the context from this.canvas there.
- Remove innerHTML and replace it with textContent. Add a comment why insertAdjancentHTML is so important for performance and runtime.
- Merge _quit and _sendQuitRequest.
2015-05-21 20:19:32 +02:00
Tim van der Meij
ae8748edfb
Refactor test driver to be more class-like
...
- Extract NullTextLayerBuilder and SimpleTextLayerBuilder from the driver code and create classes for them.
- Move options to the constructor and pass in HTML elements instead of getting them in the driver.
- Remove unused masterMode variable.
- Minor method name updates.
The rest is only moving/indenting existing code and adding 'this'.
2015-05-21 20:19:02 +02:00
Tim van der Meij
d59660cfa6
Clean up the test driver
...
- Remove a hack for Chrome on Windows because we do not run Chrome on the Windows bot anymore, so it added unneeded complexity.
- Merge nextTask and continueNextTask functions. nextTask did nothing more than calling cleanup. This change also allows us to remove the callback for that function.
- Remove unnecessary one-line functions.
2015-05-15 23:21:20 +02:00
Tim van der Meij
58769fd3b9
Refactor test slave
...
- Improved names of elements
- Easier scrolling code
2015-05-15 23:20:14 +02:00
Brendan Dahl
4824baf31c
Merge pull request #5905 from timvandermeij/specialpowers
...
Remove SpecialPowers addon
2015-04-27 10:36:54 -07:00
Jonas Jenwald
36ac67583f
Remove commented out code about |disableWorker| in the test suite
...
Since the tests have run with workers enabled for a long time, these comments are no longer relevant.
2015-04-04 13:32:44 +02:00
Tim van der Meij
75d8f70d06
Remove SpecialPowers addon
2015-04-03 20:17:20 +02:00
Mitar
2f72ac1255
textLayer is not used anymore in render context.
...
It should be removed to prevent confusion when reading the code.
2014-09-19 15:13:01 -07:00
Tim van der Meij
e525902241
Use strict equalities in test/driver.js
2014-07-31 23:08:54 +02:00
Tim van der Meij
34728ee49b
Removing unused code
2014-07-18 22:34:50 +02:00
Brendan Dahl
339f8f0ac9
Call correct quit function and wait request sending.
2014-04-17 07:34:38 -05:00
Brendan Dahl
5bd8a83c9b
Build the text layer geometry on the worker.
2014-04-09 16:44:07 -07:00
Yury Delendik
4d3b15a486
Cools down Chrome/Windows during testing
2014-03-31 07:46:11 -05:00
Yury Delendik
567f1f4af0
Makes sure the results are send /handled in right order
2014-03-25 14:07:08 -05:00
Brendan Dahl
68be273c69
Merge pull request #4470 from yurydelendik/packcmap
...
CMaps binary packing
2014-03-17 12:27:35 -07:00
Yury Delendik
1d8f6cf0e7
Updates make.js for cmaps and make binary cmaps by default
2014-03-17 13:30:43 -05:00
Yury Delendik
69efd9cb96
CMaps binary packing
2014-03-14 16:46:35 -05:00
Jonas Jenwald
e808bf5736
Fix coding style in test/driver.js
2014-03-14 15:25:38 +01:00
Brendan Dahl
b5b94a4af3
Use built in CMaps and unify the glyph mapping.
2014-02-11 10:27:09 -08:00
Yury Delendik
96fff4cc74
Refactors getTextContent return value
2014-01-17 13:26:00 -06:00
Yury Delendik
0131101275
Takes ascent/descent in account in the text layer
2014-01-08 13:50:52 -06:00
Yury Delendik
5bf3e44e30
Introduces LegacyPromise; polyfills DOM Promise
2014-01-03 18:17:05 -06:00
Brendan Dahl
e697c598c2
Enable range requests in master mode.
2013-07-12 16:40:19 -07:00
Yury Delendik
ba87d2fe11
Merge pull request #3373 from SSk123/master
...
rotation causes textLayer to get messed up
2013-06-29 17:24:12 -07:00
Srishti
ee0705bcce
Reset Path
2013-06-30 04:22:25 +05:30
Srishti
21a8d62624
Fixes Text rotation issue #2095
2013-06-30 03:52:30 +05:30
Yury Delendik
27c8291ea1
Adds test for issue 3371 and enables testing with password.
2013-06-25 19:56:47 -05:00
Brendan Dahl
ae1f973204
Use A+ spec compatible promises.
2013-06-05 12:28:31 -07:00
Brendan Dahl
3b86ebeacb
Merge pull request #3310 from yurydelendik/ignore-bad-downloads
...
Skips failed-to-download tests
2013-05-30 21:47:33 -07:00
Brendan Dahl
732e6d0fbb
Wrap driver code in closure.
2013-05-30 16:33:05 -07:00
Yury Delendik
702da7f3ea
Skips failed-to-download tests
2013-05-30 17:58:48 -05:00
Mack Duan
6b2c6fc223
Changes to regression tests for progressive loading
2013-04-18 00:16:36 -07:00
Mack Duan
ef423ef30c
Implement progressive loading of PDFs
2013-04-12 16:13:22 -07:00
Brendan Dahl
95dd33d51a
Remove mozOpaque for driver.
2013-03-29 15:18:18 -07:00
Brendan Dahl
ec311f303b
Use white backdrop when possible.
2013-03-29 13:26:25 -07:00
Yury Delendik
81f8f92696
Adds web/* and test/* for jshint target
2013-02-04 12:01:19 -06:00
mduan
48c15b70db
Make firstPage work in test_manifest.json + rename pageLimit -> lastPage
2013-01-30 15:00:11 -05:00
Brendan Dahl
9e507063ca
Start of the stat utilities.
2012-12-10 10:19:02 -08:00
Brendan Dahl
50e21bb103
Log user agent for reference tests.
2012-12-04 10:28:25 -08:00
Brendan Dahl
a2b2ecaa29
Fix the initialization of the first page for multiple testing rounds.
2012-11-01 11:24:46 -07:00
Yury Delendik
b5f952a63a
Fixes font debugger; text builder api refactoring
2012-10-09 08:25:41 -05:00
Julian Viereck
f1e0edbaa9
Address Yurys review comments
2012-09-22 11:18:26 +02:00
Julian Viereck
e48530d391
Fix AppendText after API changes
2012-09-20 22:09:03 +02:00
Julian Viereck
049b19264c
Make lint happy again
2012-09-20 17:12:36 +02:00
Julian Viereck
e7894ca07d
Fix the driver.js file to handle new TextLayer infrastructure
2012-09-20 17:12:36 +02:00
Yury Delendik
ac7b6aeff4
Provides right fallback fonts for text layer
2012-09-14 11:17:35 -07:00
Yury Delendik
3fed93d808
Adds text layer testing
2012-09-12 15:57:24 -07:00
Brendan Dahl
332ae4ce41
Change to the Apache v2 license.
2012-08-31 15:48:21 -07:00
Yury Delendik
7a0e91af4b
removes expandUrl(url); fixes error message
2012-07-19 16:10:26 -05:00
Yury Delendik
00f1d6dbf1
Fetches pdf data in the worker
2012-06-23 14:48:33 -05:00
Yury Delendik
cff6c8db08
skip cached objects and has consistent font ids
2012-04-16 21:42:05 -05:00
Yury Delendik
357805696b
Fixing concurrency and test driver
2012-04-16 14:49:55 -05:00
Yury Delendik
e1b4fc5ac7
Enabled workers during testing
2012-04-13 16:04:57 -05:00
Brendan Dahl
b6c587bb98
Fix driver viewport.
2012-04-12 09:59:17 -07:00
Yury Delendik
b312719d7e
Fixes test driver and examples
2012-04-12 08:23:38 -07:00
Brendan Dahl
5608f8e445
Test refactoring for async api.
2012-04-11 18:05:43 -07:00
Artur Adib
bdc8a91778
Retry w/ JSON to avoid cross-object contamination
2012-04-04 18:25:22 -04:00
Artur Adib
6d9e045413
driver.js: retry POST until successful
2012-04-03 18:19:03 -04:00
notmasteryet
00664f5f0c
add liveprogramming as load test
2012-01-09 20:37:39 -06:00
notmasteryet
a52aacab5a
Fix the text layer testing
2011-12-18 16:15:53 -06:00
notmasteryet
d4e22f5a92
Clear canvas for skipped pages
2011-12-07 22:07:34 -06:00
notmasteryet
5909830d43
Fixing the textLayer parameter
2011-12-05 17:19:43 -06:00
notmasteryet
3ea81bf0a6
( #867 ) Set Type3 font encoding; enable text selection testing
2011-12-04 13:51:12 -06:00
Brendan Dahl
e0c231eec7
Merge upstream and change to error parameter for callback.
2011-12-02 10:19:43 -08:00
Brendan Dahl
d6925b13ba
Adding new errorback and code to display error messages.
2011-11-28 16:55:09 -08:00
Brendan Dahl
29c21843d6
Nits
2011-11-15 15:45:37 -08:00
Brendan Dahl
9830cb935e
Fix two memory leaks.
2011-11-15 14:43:05 -08:00
Julian Viereck
99254891e6
Disable work on firefox using feature detection
2011-11-10 18:38:22 +01:00
Artur Adib
1d4e3025b6
PDF --> PDFJS, global wrapper named
2011-10-26 14:46:57 -04:00
=
65ea07a3a2
Initial merge of master.
2011-10-19 11:14:13 -07:00
Kalervo Kujala
633baa881f
Make test_slave.html as valid html5.
...
Fix also warnings in the error console that appear from a test run.
2011-10-11 22:09:13 +02:00
Julian Viereck
3054102d3b
Merge worker_pull with master
2011-10-08 14:18:23 +02:00
Artur Adib
07b52bf1c6
Lint, extra space eol
2011-10-03 15:25:02 -04:00
Artur Adib
2f209a8e85
Oh, 80-char limit... super modern
2011-10-03 15:21:26 -04:00
Artur Adib
99f419fa6b
New test/ features, useful for bot
...
test.py:
added option --noPrompts
removed unnecessary warnings (masterMode)
removed unnecessary "Creating tmp failed" message when error is simply b/c it already exists
driver.js:
added per PDF manifest option "pageLimit", e.g. "pageLimit":100
2011-10-03 14:53:45 -04:00
Kalervo Kujala
de408dac70
Fix lint warnings.
...
And name anonymous functions.
2011-09-27 21:43:48 +03:00
Artur Adib
83854a085c
Implemented getPdf(). Closes #516
...
Conflicts:
examples/helloworld/hello.js
2011-09-27 13:30:47 -04:00
Kalervo Kujala
2094c29169
Use data directly in PDFDoc.
...
And create the Stream inside the PDFDoc constructor for a cleaner interface.
Also encapsulate unnecessary details from the user.
2011-09-26 20:58:18 +03:00
notmasteryet
39ba5324a7
Merge branch 'master' of https://github.com/andreasgal/pdf.js.git into invalidpdf-1
...
Conflicts:
test/test_manifest.json
2011-09-24 09:57:59 -05:00
notmasteryet
91a5f73708
Implement "skipPages" feature for reftests
2011-09-24 09:44:50 -05:00
Chris Jones
54e69d59bf
Merge pull request #517 from kkujala/master
...
Name anonymous functions for debugging purposes.
2011-09-23 16:46:04 -07:00
Kalervo Kujala
2d03f93fed
Name anonymous functions for debugging purposes.
...
It also makes profiling more convenient.
2011-09-23 20:25:24 +03:00