summaryrefslogtreecommitdiffstats
path: root/dom/archivereader/test/helpers.js
diff options
context:
space:
mode:
Diffstat (limited to 'dom/archivereader/test/helpers.js')
-rw-r--r--dom/archivereader/test/helpers.js31
1 files changed, 31 insertions, 0 deletions
diff --git a/dom/archivereader/test/helpers.js b/dom/archivereader/test/helpers.js
new file mode 100644
index 000000000..3ba430436
--- /dev/null
+++ b/dom/archivereader/test/helpers.js
@@ -0,0 +1,31 @@
+/**
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/publicdomain/zero/1.0/
+ */
+
+var testGenerator;
+
+function runTest()
+{
+ SimpleTest.waitForExplicitFinish();
+
+ SpecialPowers.pushPrefEnv({'set': [ ["dom.archivereader.enabled", true] ]}, function() {
+ SpecialPowers.createFiles(filesToCreate(),
+ function (files) {
+ testGenerator = testSteps(files);
+ return testGenerator.next();
+ },
+ function (msg) {
+ ok(false, "File creation error: " + msg);
+ finishTest();
+ });
+ });
+}
+
+function finishTest()
+{
+ SpecialPowers.popPrefEnv(function() {
+ testGenerator.close();
+ SimpleTest.finish();
+ });
+}