pdf.js/test
Jonas Jenwald 642d8621ef Replace direct lookup of uniquePrefix/idCounters, in Page instances, with an idFactory containing an createObjId method instead
We're currently making use of `uniquePrefix`/`idCounters` in multiple files, to create unique object id's, and adding a new occurrence of them requires some care to ensure that an object id isn't accidentally reused.
Furthermore, having to pass around multiple parameters as we currently do seem like something you want to avoid.

Instead, this patch adds a factory which means that there's only *one* thing that needs to be passed around. And since it's now only necessary to call a method in order to obtain a unique object id, the details are thus abstracted away at the call-sites which avoids accidental reuse of object id's.

To test that this works as expected a very simple `Page` unit-test is added, and the existing `Annotation layer` tests are also adjusted slightly.
2017-01-09 23:16:25 +01:00
..
chromium Add opt-out telemetry to the Chrome extension 2016-06-03 20:36:57 +02:00
features Remove the deprecated mozDash/mozDashOffset canvas 2D context methods 2016-09-15 10:05:40 +02:00
font Remove globals that are now unnecessary thanks to the use of various ESLint environments (e.g. Node, ShellJS, Jasmine) 2016-12-16 21:09:55 +01:00
pdfs Merge pull request #7879 from rossj/highlight-fix 2016-12-19 09:18:13 -06:00
resources Remove 'use strict'; causing failure and unused prefs. 2016-01-14 13:23:48 -08:00
stats Switch to using ESLint, instead of JSHint, for linting 2016-12-16 21:06:36 +01:00
ttx Update fonttools location and version (issue 6223) 2015-07-17 12:51:09 +02:00
unit Replace direct lookup of uniquePrefix/idCounters, in Page instances, with an idFactory containing an createObjId method instead 2017-01-09 23:16:25 +01:00
.eslintrc Switch to using ESLint, instead of JSHint, for linting 2016-12-16 21:06:36 +01:00
.gitignore Ignore test snapshots directory. 2013-03-15 11:24:08 -07:00
annotation_layer_test.css Button widget annotations: improve unit tests, simplify code and remove labels 2016-12-17 20:38:48 +01:00
downloadutils.js Switch to using ESLint, instead of JSHint, for linting 2016-12-16 21:06:36 +01:00
driver.js Fix (most) errors reported by the no-multi-spaces ESLint rule 2016-12-12 20:35:51 +01:00
test_manifest.json Merge pull request #7879 from rossj/highlight-fix 2016-12-19 09:18:13 -06:00
test_slave.html Move all PDFJS.xxx settings into display/global. 2016-04-07 13:46:07 -05:00
test.js Switch to using ESLint, instead of JSHint, for linting 2016-12-16 21:06:36 +01:00
testutils.js Switch to using ESLint, instead of JSHint, for linting 2016-12-16 21:06:36 +01:00
text_layer_test.css Better "text" testing. 2015-11-19 11:03:52 -06:00
webbrowser.js Switch to using ESLint, instead of JSHint, for linting 2016-12-16 21:06:36 +01:00
webserver.js Switch to using ESLint, instead of JSHint, for linting 2016-12-16 21:06:36 +01:00