summaryrefslogtreecommitdiffstats
path: root/dom/tests/mochitest/ajax/lib/AJAX_setup.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/tests/mochitest/ajax/lib/AJAX_setup.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/tests/mochitest/ajax/lib/AJAX_setup.js')
-rw-r--r--dom/tests/mochitest/ajax/lib/AJAX_setup.js35
1 files changed, 35 insertions, 0 deletions
diff --git a/dom/tests/mochitest/ajax/lib/AJAX_setup.js b/dom/tests/mochitest/ajax/lib/AJAX_setup.js
new file mode 100644
index 000000000..e94531db0
--- /dev/null
+++ b/dom/tests/mochitest/ajax/lib/AJAX_setup.js
@@ -0,0 +1,35 @@
+var AJAXtests = [];
+
+function runAJAXTest() {
+ if (AJAXtests.length == 0) {
+ SimpleTest.finish();
+ return;
+ }
+
+ var test = AJAXtests.shift();
+ var testframe = document.getElementById("testframe");
+ testframe.src = test;
+}
+
+function onManifestLoad(manifest) {
+ if (manifest.testcases) {
+ AJAXtests = manifest.testcases;
+ runAJAXTest();
+ } else {
+ ok(false, "manifest check", "no manifest!?!");
+ SimpleTest.finish();
+ }
+}
+
+function fetchManifest() {
+ var d = loadJSONDoc("manifest.json");
+ d.addBoth(onManifestLoad);
+}
+
+// Double timeout duration. Since this test case takes longer than 300 seconds
+// on B2G emulator.
+// See bug 968783.
+SimpleTest.requestLongerTimeout(2);
+
+SimpleTest.waitForExplicitFinish();
+addLoadEvent(fetchManifest);