summaryrefslogtreecommitdiffstats
path: root/dom/manifest/test/common.js
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /dom/manifest/test/common.js
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'dom/manifest/test/common.js')
-rw-r--r--dom/manifest/test/common.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/dom/manifest/test/common.js b/dom/manifest/test/common.js
new file mode 100644
index 000000000..4f618be80
--- /dev/null
+++ b/dom/manifest/test/common.js
@@ -0,0 +1,22 @@
+/**
+ * Common infrastructure for manifest tests.
+ **/
+/*globals SpecialPowers, ManifestProcessor*/
+'use strict';
+const {
+ ManifestProcessor
+} = SpecialPowers.Cu.import('resource://gre/modules/ManifestProcessor.jsm');
+const processor = ManifestProcessor;
+const manifestURL = new URL(document.location.origin + '/manifest.json');
+const docURL = document.location;
+const seperators = '\u2028\u2029\u0020\u00A0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000';
+const lineTerminators = '\u000D\u000A\u2028\u2029';
+const whiteSpace = `${seperators}${lineTerminators}`;
+const typeTests = [1, null, {},
+ [], false
+];
+const data = {
+ jsonText: '{}',
+ manifestURL: manifestURL,
+ docURL: docURL
+};