зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1321218 - Remove legacy generator from dom/. r=smaug
This commit is contained in:
Родитель
674c6d8531
Коммит
515ef9ba45
|
@ -3,8 +3,6 @@
|
|||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
|
||||
var testGenerator;
|
||||
|
||||
function runTest()
|
||||
{
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
@ -12,8 +10,7 @@ function runTest()
|
|||
SpecialPowers.pushPrefEnv({'set': [ ["dom.archivereader.enabled", true] ]}, function() {
|
||||
SpecialPowers.createFiles(filesToCreate(),
|
||||
function (files) {
|
||||
testGenerator = testSteps(files);
|
||||
return testGenerator.next();
|
||||
testSteps(files);
|
||||
},
|
||||
function (msg) {
|
||||
ok(false, "File creation error: " + msg);
|
||||
|
@ -25,7 +22,6 @@ function runTest()
|
|||
function finishTest()
|
||||
{
|
||||
SpecialPowers.popPrefEnv(function() {
|
||||
testGenerator.close();
|
||||
SimpleTest.finish();
|
||||
});
|
||||
}
|
||||
|
|
|
@ -212,7 +212,6 @@
|
|||
ok(false, "ArchiveReader.getFiles() should not return an 'error'");
|
||||
markTestDone();
|
||||
}
|
||||
yield undefined;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
|
|
@ -51,7 +51,6 @@
|
|||
function testSteps(files)
|
||||
{
|
||||
test1(files[0]);
|
||||
yield undefined;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -25,8 +25,6 @@
|
|||
|
||||
// The input is 4 nested zip archives:
|
||||
doLoop(binaryFile, 4);
|
||||
|
||||
yield undefined;
|
||||
}
|
||||
|
||||
function doLoop(blob, loop)
|
||||
|
|
|
@ -83,7 +83,7 @@ add_task(function* () {
|
|||
let Telemetry = Cc["@mozilla.org/base/telemetry;1"].getService(Ci.nsITelemetry);
|
||||
Telemetry.canRecordExtended = gOldParentCanRecord;
|
||||
|
||||
yield ContentTask.spawn(gBrowser.selectedBrowser, { oldCanRecord: gOldContentCanRecord }, function (arg) {
|
||||
yield ContentTask.spawn(gBrowser.selectedBrowser, { oldCanRecord: gOldContentCanRecord }, function* (arg) {
|
||||
Cu.import("resource://gre/modules/PromiseUtils.jsm");
|
||||
yield new Promise(resolve => {
|
||||
let telemetry = Cc["@mozilla.org/base/telemetry;1"].getService(Ci.nsITelemetry);
|
||||
|
@ -127,7 +127,7 @@ function grabHistogramsFromContent(use_counter_middlefix, page_before = null) {
|
|||
}).then(gather, gather);
|
||||
}
|
||||
|
||||
var check_use_counter_iframe = Task.async(function* (file, use_counter_middlefix, check_documents=true) {
|
||||
var check_use_counter_iframe = async function(file, use_counter_middlefix, check_documents=true) {
|
||||
info("checking " + file + " with histogram " + use_counter_middlefix);
|
||||
|
||||
let newTab = gBrowser.addTab( "about:blank");
|
||||
|
@ -138,13 +138,13 @@ var check_use_counter_iframe = Task.async(function* (file, use_counter_middlefix
|
|||
// interested in.
|
||||
let [histogram_page_before, histogram_document_before,
|
||||
histogram_docs_before, histogram_toplevel_docs_before] =
|
||||
yield grabHistogramsFromContent(use_counter_middlefix);
|
||||
await grabHistogramsFromContent(use_counter_middlefix);
|
||||
|
||||
gBrowser.selectedBrowser.loadURI(gHttpTestRoot + "file_use_counter_outer.html");
|
||||
yield waitForPageLoad(gBrowser.selectedBrowser);
|
||||
await waitForPageLoad(gBrowser.selectedBrowser);
|
||||
|
||||
// Inject our desired file into the iframe of the newly-loaded page.
|
||||
yield ContentTask.spawn(gBrowser.selectedBrowser, { file: file }, function(opts) {
|
||||
await ContentTask.spawn(gBrowser.selectedBrowser, { file: file }, function(opts) {
|
||||
Cu.import("resource://gre/modules/PromiseUtils.jsm");
|
||||
let deferred = PromiseUtils.defer();
|
||||
|
||||
|
@ -174,12 +174,12 @@ var check_use_counter_iframe = Task.async(function* (file, use_counter_middlefix
|
|||
// The histograms only get recorded when the document actually gets
|
||||
// destroyed, which might not have happened yet due to GC/CC effects, etc.
|
||||
// Try to force document destruction.
|
||||
yield waitForDestroyedDocuments();
|
||||
await waitForDestroyedDocuments();
|
||||
|
||||
// Grab histograms again and compare.
|
||||
let [histogram_page_after, histogram_document_after,
|
||||
histogram_docs_after, histogram_toplevel_docs_after] =
|
||||
yield grabHistogramsFromContent(use_counter_middlefix, histogram_page_before);
|
||||
await grabHistogramsFromContent(use_counter_middlefix, histogram_page_before);
|
||||
|
||||
is(histogram_page_after, histogram_page_before + 1,
|
||||
"page counts for " + use_counter_middlefix + " after are correct");
|
||||
|
@ -189,9 +189,9 @@ var check_use_counter_iframe = Task.async(function* (file, use_counter_middlefix
|
|||
is(histogram_document_after, histogram_document_before + 1,
|
||||
"document counts for " + use_counter_middlefix + " after are correct");
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var check_use_counter_img = Task.async(function* (file, use_counter_middlefix) {
|
||||
var check_use_counter_img = async function(file, use_counter_middlefix) {
|
||||
info("checking " + file + " as image with histogram " + use_counter_middlefix);
|
||||
|
||||
let newTab = gBrowser.addTab("about:blank");
|
||||
|
@ -202,13 +202,13 @@ var check_use_counter_img = Task.async(function* (file, use_counter_middlefix) {
|
|||
// interested in.
|
||||
let [histogram_page_before, histogram_document_before,
|
||||
histogram_docs_before, histogram_toplevel_docs_before] =
|
||||
yield grabHistogramsFromContent(use_counter_middlefix);
|
||||
await grabHistogramsFromContent(use_counter_middlefix);
|
||||
|
||||
gBrowser.selectedBrowser.loadURI(gHttpTestRoot + "file_use_counter_outer.html");
|
||||
yield waitForPageLoad(gBrowser.selectedBrowser);
|
||||
await waitForPageLoad(gBrowser.selectedBrowser);
|
||||
|
||||
// Inject our desired file into the img of the newly-loaded page.
|
||||
yield ContentTask.spawn(gBrowser.selectedBrowser, { file: file }, function(opts) {
|
||||
await ContentTask.spawn(gBrowser.selectedBrowser, { file: file }, function*(opts) {
|
||||
Cu.import("resource://gre/modules/PromiseUtils.jsm");
|
||||
let deferred = PromiseUtils.defer();
|
||||
|
||||
|
@ -239,12 +239,12 @@ var check_use_counter_img = Task.async(function* (file, use_counter_middlefix) {
|
|||
// The histograms only get recorded when the document actually gets
|
||||
// destroyed, which might not have happened yet due to GC/CC effects, etc.
|
||||
// Try to force document destruction.
|
||||
yield waitForDestroyedDocuments();
|
||||
await waitForDestroyedDocuments();
|
||||
|
||||
// Grab histograms again and compare.
|
||||
let [histogram_page_after, histogram_document_after,
|
||||
histogram_docs_after, histogram_toplevel_docs_after] =
|
||||
yield grabHistogramsFromContent(use_counter_middlefix, histogram_page_before);
|
||||
await grabHistogramsFromContent(use_counter_middlefix, histogram_page_before);
|
||||
is(histogram_page_after, histogram_page_before + 1,
|
||||
"page counts for " + use_counter_middlefix + " after are correct");
|
||||
is(histogram_document_after, histogram_document_before + 1,
|
||||
|
@ -255,9 +255,9 @@ var check_use_counter_img = Task.async(function* (file, use_counter_middlefix) {
|
|||
// one for the SVG image itself.
|
||||
ok(histogram_docs_after >= histogram_docs_before + 2,
|
||||
"document counts are correct");
|
||||
});
|
||||
};
|
||||
|
||||
var check_use_counter_direct = Task.async(function* (file, use_counter_middlefix, xfail=false) {
|
||||
var check_use_counter_direct = async function(file, use_counter_middlefix, xfail=false) {
|
||||
info("checking " + file + " with histogram " + use_counter_middlefix);
|
||||
|
||||
let newTab = gBrowser.addTab( "about:blank");
|
||||
|
@ -268,10 +268,10 @@ var check_use_counter_direct = Task.async(function* (file, use_counter_middlefix
|
|||
// interested in.
|
||||
let [histogram_page_before, histogram_document_before,
|
||||
histogram_docs_before, histogram_toplevel_docs_before] =
|
||||
yield grabHistogramsFromContent(use_counter_middlefix);
|
||||
await grabHistogramsFromContent(use_counter_middlefix);
|
||||
|
||||
gBrowser.selectedBrowser.loadURI(gHttpTestRoot + file);
|
||||
yield ContentTask.spawn(gBrowser.selectedBrowser, null, function*() {
|
||||
await ContentTask.spawn(gBrowser.selectedBrowser, null, function*() {
|
||||
Cu.import("resource://gre/modules/PromiseUtils.jsm");
|
||||
yield new Promise(resolve => {
|
||||
let listener = () => {
|
||||
|
@ -292,12 +292,12 @@ var check_use_counter_direct = Task.async(function* (file, use_counter_middlefix
|
|||
// The histograms only get recorded when the document actually gets
|
||||
// destroyed, which might not have happened yet due to GC/CC effects, etc.
|
||||
// Try to force document destruction.
|
||||
yield waitForDestroyedDocuments();
|
||||
await waitForDestroyedDocuments();
|
||||
|
||||
// Grab histograms again and compare.
|
||||
let [histogram_page_after, histogram_document_after,
|
||||
histogram_docs_after, histogram_toplevel_docs_after] =
|
||||
yield grabHistogramsFromContent(use_counter_middlefix, histogram_page_before);
|
||||
await grabHistogramsFromContent(use_counter_middlefix, histogram_page_before);
|
||||
(xfail ? todo_is : is)(histogram_page_after, histogram_page_before + 1,
|
||||
"page counts for " + use_counter_middlefix + " after are correct");
|
||||
(xfail ? todo_is : is)(histogram_document_after, histogram_document_before + 1,
|
||||
|
@ -306,4 +306,4 @@ var check_use_counter_direct = Task.async(function* (file, use_counter_middlefix
|
|||
"top level document counts are correct");
|
||||
ok(histogram_docs_after >= histogram_docs_before + 1,
|
||||
"document counts are correct");
|
||||
});
|
||||
};
|
||||
|
|
|
@ -66,7 +66,7 @@ function resetState() {
|
|||
/**
|
||||
* testing if anchor and area referrer attributes are honoured (1174913)
|
||||
*/
|
||||
var tests = (function() {
|
||||
var tests = (function*() {
|
||||
|
||||
// enable referrer attribute
|
||||
yield SpecialPowers.pushPrefEnv({"set": [['network.http.enablePerElementReferrer', true]]}, advance);
|
||||
|
@ -97,6 +97,6 @@ var tests = (function() {
|
|||
};
|
||||
};
|
||||
|
||||
// complete. Be sure to yield so we don't call this twice.
|
||||
yield SimpleTest.finish();
|
||||
// complete.
|
||||
SimpleTest.finish();
|
||||
})();
|
|
@ -28,11 +28,7 @@ var observer = {
|
|||
};
|
||||
|
||||
function continueTest() {
|
||||
try {
|
||||
generator.next();
|
||||
} catch (e if e instanceof StopIteration) {
|
||||
error("Stop test because of exception!");
|
||||
}
|
||||
generator.next();
|
||||
}
|
||||
|
||||
function audioPlayingStart() {
|
||||
|
@ -58,12 +54,12 @@ function finish() {
|
|||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
function runTest() {
|
||||
function* runTest() {
|
||||
yield audioPlayingStart();
|
||||
|
||||
yield audioBecomeSilentDuringPlaying();
|
||||
|
||||
yield finish();
|
||||
finish();
|
||||
}
|
||||
|
||||
continueTest();
|
||||
|
|
|
@ -30,11 +30,7 @@ var observer = {
|
|||
};
|
||||
|
||||
function continueTest() {
|
||||
try {
|
||||
generator.next();
|
||||
} catch (e if e instanceof StopIteration) {
|
||||
error("Stop test because of exception!");
|
||||
}
|
||||
generator.next();
|
||||
}
|
||||
|
||||
function playOscillatorNode() {
|
||||
|
@ -86,14 +82,14 @@ function startAudioContext() {
|
|||
}
|
||||
}
|
||||
|
||||
function runTest() {
|
||||
function* runTest() {
|
||||
yield startAudioContext();
|
||||
|
||||
yield audioPlayingStart();
|
||||
|
||||
yield audioBecomeSilentDuringPlaying();
|
||||
|
||||
yield finish();
|
||||
finish();
|
||||
}
|
||||
|
||||
continueTest();
|
||||
|
|
|
@ -20,7 +20,7 @@ var advance = function() { tests.next(); };
|
|||
/**
|
||||
* testing legacy support for origin-when-crossorigin (1163743)
|
||||
*/
|
||||
var tests = (function() {
|
||||
var tests = (function*() {
|
||||
var iframe = document.getElementById("testframe");
|
||||
const sjs = "/tests/dom/base/test/bug704320.sjs?action=generate-policy-test";
|
||||
|
||||
|
@ -29,8 +29,8 @@ var tests = (function() {
|
|||
yield iframe.src = sjs + "&policy=" + escape(' origin-when-crossorigin');
|
||||
yield checkIndividualResults("origin-when-cross-origin", ["origin", "full"]);
|
||||
|
||||
// complete. Be sure to yield so we don't call this twice.
|
||||
yield SimpleTest.finish();
|
||||
// complete.
|
||||
SimpleTest.finish();
|
||||
})();
|
||||
|
||||
</script>
|
||||
|
|
|
@ -21,7 +21,7 @@ var advance = function() { tests.next(); };
|
|||
* testing if policy is overwritten if there are two meta statements (1165501)
|
||||
* XXX: would be nice to test this with CSP and meta as well
|
||||
*/
|
||||
var tests = (function() {
|
||||
var tests = (function*() {
|
||||
var iframe = document.getElementById("testframe");
|
||||
const sjs = "/tests/dom/base/test/bug704320.sjs?action=generate-policy-test";
|
||||
|
||||
|
@ -36,8 +36,8 @@ var tests = (function() {
|
|||
yield checkIndividualResults("no-referrer then default", ["full"]);
|
||||
|
||||
|
||||
// complete. Be sure to yield so we don't call this twice.
|
||||
yield SimpleTest.finish();
|
||||
// complete.
|
||||
SimpleTest.finish();
|
||||
})();
|
||||
|
||||
</script>
|
||||
|
|
|
@ -17,10 +17,10 @@ var gen = runTest();
|
|||
|
||||
addLoadEvent(function() { gen.next(); });
|
||||
|
||||
function runTest() {
|
||||
function* runTest() {
|
||||
var iframe = $('iframe');
|
||||
iframe.onerror = function() { gen.send("error"); };
|
||||
iframe.onload = function() { gen.send("load"); };
|
||||
iframe.onerror = function() { gen.next("error"); };
|
||||
iframe.onload = function() { gen.next("load"); };
|
||||
|
||||
iframe.src = "data:text/plain,hello";
|
||||
is((yield), "load", "plaintext data");
|
||||
|
@ -34,8 +34,6 @@ function runTest() {
|
|||
//is((yield), "error", "invalid http");
|
||||
|
||||
SimpleTest.finish();
|
||||
|
||||
yield undefined;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
|
|
@ -15,11 +15,11 @@
|
|||
<script class="testbody" type="application/javascript;version=1.8">
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
window.addEventListener("message", function(e) { gen.send(e.data) }, false);
|
||||
window.addEventListener("message", function(e) { gen.next(e.data) }, false);
|
||||
|
||||
var gen = runTest();
|
||||
|
||||
function runTest() {
|
||||
function* runTest() {
|
||||
var iframe = $('iframe');
|
||||
iframe.src = "http://noxul.example.com/tests/dom/base/test/file_bug590870.html";
|
||||
is((yield), true, "shouldn't be able to create XUL elements");
|
||||
|
@ -28,7 +28,6 @@ function runTest() {
|
|||
is((yield), false, "should be able to create XUL elements");
|
||||
|
||||
SimpleTest.finish();
|
||||
yield undefined;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
|
|
@ -51,14 +51,14 @@ var testFrame = document.getElementById("iframe-test");
|
|||
|
||||
refFrame.addEventListener("load", function() {
|
||||
testFrame.addEventListener("load", function() {
|
||||
try {
|
||||
tests.next();
|
||||
let {done} = tests.next();
|
||||
if (!done) {
|
||||
ok(compareSnapshots(snapshotWindow(testFrame.contentWindow),
|
||||
snapshotWindow(refFrame.contentWindow), true)[0],
|
||||
"bidi is not detected correctly");
|
||||
|
||||
testFrame.contentWindow.location.reload();
|
||||
} catch (err if err instanceof StopIteration) {
|
||||
} else {
|
||||
SimpleTest.finish();
|
||||
}
|
||||
}, false);
|
||||
|
@ -78,7 +78,7 @@ function strMult(aStr, aNumber) {
|
|||
return strMult(aStr, aNumber - 1) + aStr;
|
||||
}
|
||||
|
||||
function runTests () {
|
||||
function* runTests () {
|
||||
var ltr = "", prefix = null;
|
||||
var refContainer = refFrame.contentDocument.getElementById('content');
|
||||
var testContainer, textNode;
|
||||
|
|
|
@ -41,7 +41,7 @@ var advance = function() { tests.next(); };
|
|||
* This is the main test routine -- serialized by use of a generator.
|
||||
* It performs all tests in sequence using in the same iframe.
|
||||
*/
|
||||
var tests = (function() {
|
||||
var tests = (function*() {
|
||||
SimpleTest.requestLongerTimeout(4);
|
||||
var iframe = document.getElementById("testframe");
|
||||
iframe.onload = function() {
|
||||
|
@ -57,8 +57,8 @@ var tests = (function() {
|
|||
yield checkExpectedGlobalResults();
|
||||
}
|
||||
|
||||
// complete. Be sure to yield so we don't call this twice.
|
||||
yield SimpleTest.finish();
|
||||
// complete.
|
||||
SimpleTest.finish();
|
||||
})();
|
||||
|
||||
</script>
|
||||
|
|
|
@ -22,7 +22,7 @@ var advance = function() { tests.next(); };
|
|||
* It resets the counter, then performs two tests in sequence using
|
||||
* the same iframe.
|
||||
*/
|
||||
var tests = (function() {
|
||||
var tests = (function*() {
|
||||
var iframe = document.getElementById("testframe");
|
||||
const sjs = "/tests/dom/base/test/bug704320.sjs?action=generate-policy-test";
|
||||
|
||||
|
@ -89,8 +89,8 @@ var tests = (function() {
|
|||
yield iframe.src = sjs + "&policy=" + escape('\f OrigIn');
|
||||
yield checkIndividualResults("origin case insensitive", ["origin"]);
|
||||
|
||||
// complete. Be sure to yield so we don't call this twice.
|
||||
yield SimpleTest.finish();
|
||||
// complete.
|
||||
SimpleTest.finish();
|
||||
})();
|
||||
|
||||
</script>
|
||||
|
|
|
@ -22,7 +22,7 @@ var advance = function() { tests.next(); };
|
|||
* It resets the counter, then performs two tests in sequence using
|
||||
* the same iframe.
|
||||
*/
|
||||
var tests = (function() {
|
||||
var tests = (function*() {
|
||||
var iframe = document.getElementById("testframe");
|
||||
const sjs = "/tests/dom/base/test/bug704320.sjs?action=generate-policy-test";
|
||||
|
||||
|
@ -30,8 +30,8 @@ var tests = (function() {
|
|||
yield iframe.src = sjs + "&policy=" + escape(' \f\r\n\t ');
|
||||
yield checkIndividualResults("whitespace only policy", ["full"]);
|
||||
|
||||
// complete. Be sure to yield so we don't call this twice.
|
||||
yield SimpleTest.finish();
|
||||
// complete.
|
||||
SimpleTest.finish();
|
||||
})();
|
||||
|
||||
</script>
|
||||
|
|
|
@ -22,7 +22,7 @@ var advance = function() { tests.next(); };
|
|||
* It resets the counter, then performs two tests in sequence using
|
||||
* the same iframe.
|
||||
*/
|
||||
var tests = (function() {
|
||||
var tests = (function*() {
|
||||
var iframe = document.getElementById("testframe");
|
||||
|
||||
// reset the counter
|
||||
|
@ -47,8 +47,8 @@ var tests = (function() {
|
|||
// check the second test
|
||||
yield checkResults(finalizePreloadReuse);
|
||||
|
||||
// complete. Be sure to yield so we don't call this twice.
|
||||
yield SimpleTest.finish();
|
||||
// complete.
|
||||
SimpleTest.finish();
|
||||
})();
|
||||
|
||||
// Helper functions below.
|
||||
|
|
|
@ -78,7 +78,7 @@ function resetState() {
|
|||
* It resets the counter, then performs two tests in sequence using
|
||||
* the same iframe.
|
||||
*/
|
||||
var tests = (function() {
|
||||
var tests = (function*() {
|
||||
var iframe = document.getElementById("testframe");
|
||||
var sjs = "/tests/dom/base/test/referrer_change_server.sjs?action=generate-policy-test";
|
||||
|
||||
|
@ -114,8 +114,8 @@ var tests = (function() {
|
|||
yield iframe.src = sjs + "&policy=" + escape('unsafe-url') + "&name=" + name + "&newPolicy=" + escape('no-referrer');
|
||||
yield checkIndividualResults("no-referrer (changed) with unsafe-url first", ["none"], [name+'no-referrer']);
|
||||
|
||||
// complete. Be sure to yield so we don't call this twice.
|
||||
yield SimpleTest.finish();
|
||||
// complete.
|
||||
SimpleTest.finish();
|
||||
})();
|
||||
|
||||
</script>
|
||||
|
|
|
@ -82,7 +82,7 @@ function resetState() {
|
|||
/**
|
||||
* testing if img referrer attribute is honoured (1165501)
|
||||
*/
|
||||
var tests = (function() {
|
||||
var tests = (function*() {
|
||||
|
||||
// enable referrer attribute
|
||||
yield SpecialPowers.pushPrefEnv({"set": [['network.http.enablePerElementReferrer', true]]}, advance);
|
||||
|
@ -174,8 +174,8 @@ var tests = (function() {
|
|||
yield iframe.src = sjs + "&imgPolicy=" + escape('default') + "&policy=" + escape('unsafe-url') + "&name=" + name;
|
||||
yield checkIndividualResults("unsafe-url in meta, default in img", ["full"], [name]);
|
||||
|
||||
// complete. Be sure to yield so we don't call this twice.
|
||||
yield SimpleTest.finish();
|
||||
// complete.
|
||||
SimpleTest.finish();
|
||||
})();
|
||||
|
||||
</script>
|
||||
|
|
|
@ -4,7 +4,6 @@ SimpleTest.waitForExplicitFinish();
|
|||
browserElementTestHelpers.setEnabledPref(true);
|
||||
|
||||
var fileURL = 'chrome://mochitests/content/chrome/dom/browser-element/mochitest/file_browserElement_ActiveStateChange.html';
|
||||
var generator = runTests();
|
||||
var testFrame;
|
||||
var ac;
|
||||
|
||||
|
@ -17,55 +16,46 @@ function error(aMessage) {
|
|||
finish();
|
||||
}
|
||||
|
||||
function continueTest() {
|
||||
try {
|
||||
generator.next();
|
||||
} catch (e if e instanceof StopIteration) {
|
||||
error("Stop test because of exception!");
|
||||
}
|
||||
}
|
||||
|
||||
function finish() {
|
||||
document.body.removeChild(testFrame);
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
function setCommand(aArg) {
|
||||
assert(!!ac, "Audio channel doesn't exist!");
|
||||
info("# Command = " + aArg);
|
||||
return new Promise(resolve => {
|
||||
assert(!!ac, "Audio channel doesn't exist!");
|
||||
info("# Command = " + aArg);
|
||||
|
||||
testFrame.src = fileURL + '#' + aArg;
|
||||
var expectedActive = false;
|
||||
switch (aArg) {
|
||||
case 'play':
|
||||
expectedActive = true;
|
||||
break;
|
||||
case 'pause':
|
||||
expectedActive = false;
|
||||
break;
|
||||
default :
|
||||
error("Undefined command!");
|
||||
}
|
||||
|
||||
ac.onactivestatechanged = () => {
|
||||
ac.onactivestatechanged = null;
|
||||
ac.isActive().onsuccess = (e) => {
|
||||
is(expectedActive, e.target.result,
|
||||
"Correct active state = " + expectedActive);
|
||||
continueTest();
|
||||
testFrame.src = fileURL + '#' + aArg;
|
||||
var expectedActive = false;
|
||||
switch (aArg) {
|
||||
case 'play':
|
||||
expectedActive = true;
|
||||
break;
|
||||
case 'pause':
|
||||
expectedActive = false;
|
||||
break;
|
||||
default :
|
||||
error("Undefined command!");
|
||||
}
|
||||
};
|
||||
|
||||
ac.onactivestatechanged = () => {
|
||||
ac.onactivestatechanged = null;
|
||||
ac.isActive().onsuccess = (e) => {
|
||||
is(expectedActive, e.target.result,
|
||||
"Correct active state = " + expectedActive);
|
||||
resolve();
|
||||
};
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
function runTests() {
|
||||
setCommand('play');
|
||||
yield undefined;
|
||||
async function runTests() {
|
||||
await setCommand('play');
|
||||
|
||||
setCommand('pause');
|
||||
yield undefined;
|
||||
await setCommand('pause');
|
||||
|
||||
finish();
|
||||
yield undefined;
|
||||
}
|
||||
|
||||
function setupTestFrame() {
|
||||
|
@ -74,7 +64,6 @@ function setupTestFrame() {
|
|||
testFrame.src = fileURL;
|
||||
|
||||
function loadend() {
|
||||
testFrame.removeEventListener('mozbrowserloadend', loadend);
|
||||
ok("allowedAudioChannels" in testFrame, "allowedAudioChannels exist");
|
||||
var channels = testFrame.allowedAudioChannels;
|
||||
is(channels.length, 9, "9 audio channel by default");
|
||||
|
@ -85,7 +74,7 @@ function setupTestFrame() {
|
|||
ok("isActive" in ac, "isActive exists");
|
||||
ok("onactivestatechanged" in ac, "onactivestatechanged exists");
|
||||
|
||||
generator.next();
|
||||
runTests();
|
||||
}
|
||||
|
||||
function alertError(e) {
|
||||
|
@ -94,7 +83,7 @@ function setupTestFrame() {
|
|||
error(message);
|
||||
}
|
||||
|
||||
testFrame.addEventListener('mozbrowserloadend', loadend);
|
||||
testFrame.addEventListener('mozbrowserloadend', loadend, {once: true});
|
||||
testFrame.addEventListener('mozbrowsershowmodalprompt', alertError);
|
||||
document.body.appendChild(testFrame);
|
||||
}
|
||||
|
|
|
@ -32,11 +32,7 @@ function error(aMessage) {
|
|||
}
|
||||
|
||||
function continueTest() {
|
||||
try {
|
||||
generator.next();
|
||||
} catch (e if e instanceof StopIteration) {
|
||||
error("Stop test because of exception!");
|
||||
}
|
||||
generator.next();
|
||||
}
|
||||
|
||||
function finish() {
|
||||
|
@ -74,7 +70,7 @@ function setCommand(aArg) {
|
|||
}
|
||||
}
|
||||
|
||||
function runTests() {
|
||||
function* runTests() {
|
||||
setCommand('play');
|
||||
yield undefined;
|
||||
|
||||
|
@ -91,7 +87,6 @@ function runTests() {
|
|||
yield undefined;
|
||||
|
||||
finish();
|
||||
yield undefined;
|
||||
}
|
||||
|
||||
function setupTestFrame() {
|
||||
|
|
|
@ -25,11 +25,7 @@ function error(aMessage) {
|
|||
}
|
||||
|
||||
function continueTest() {
|
||||
try {
|
||||
generator.next();
|
||||
} catch (e if e instanceof StopIteration) {
|
||||
error("Stop test because of exception!");
|
||||
}
|
||||
generator.next();
|
||||
}
|
||||
|
||||
function finish() {
|
||||
|
@ -45,7 +41,7 @@ function setCommand(aArg) {
|
|||
testFrame.src = fileURL + '#' + aArg;
|
||||
}
|
||||
|
||||
function runTests() {
|
||||
function* runTests() {
|
||||
setCommand('play');
|
||||
yield undefined;
|
||||
|
||||
|
@ -54,7 +50,6 @@ function runTests() {
|
|||
yield undefined;
|
||||
|
||||
finish();
|
||||
yield undefined;
|
||||
}
|
||||
|
||||
function setupTestFrame() {
|
||||
|
|
|
@ -432,7 +432,7 @@ function testComplete(iframe, data) {
|
|||
}
|
||||
}
|
||||
|
||||
function runTest() {
|
||||
function* runTest() {
|
||||
while (gData.length > 0) {
|
||||
var iframe = document.createElement('iframe');
|
||||
var data = gData.pop();
|
||||
|
|
|
@ -550,7 +550,7 @@ function testComplete(iframe, data) {
|
|||
}
|
||||
}
|
||||
|
||||
function runTest() {
|
||||
function* runTest() {
|
||||
while (gData.length > 0) {
|
||||
let iframe = document.createElement('iframe');
|
||||
let data = gData.shift();
|
||||
|
|
|
@ -61,19 +61,20 @@ var gNeedsPaint = false;
|
|||
function executeTests() {
|
||||
var testYielder = tests();
|
||||
function execNext() {
|
||||
try {
|
||||
if (!gNeedsPaint) {
|
||||
testYielder.next();
|
||||
button.getBoundingClientRect(); // Flush.
|
||||
gNeedsPaint = true;
|
||||
if (!gNeedsPaint) {
|
||||
let {done} = testYielder.next();
|
||||
if (done) {
|
||||
return;
|
||||
}
|
||||
SimpleTest.executeSoon(execNext);
|
||||
} catch (e) {}
|
||||
button.getBoundingClientRect(); // Flush.
|
||||
gNeedsPaint = true;
|
||||
}
|
||||
SimpleTest.executeSoon(execNext);
|
||||
}
|
||||
execNext();
|
||||
}
|
||||
|
||||
function tests() {
|
||||
function* tests() {
|
||||
window.addEventListener("MozAfterPaint", paintListener, false);
|
||||
normalButtonCanvas = takeSnapshot();
|
||||
// Press the button.
|
||||
|
|
|
@ -77,19 +77,20 @@ var gNeedsPaint = false;
|
|||
function executeTests() {
|
||||
var testYielder = tests();
|
||||
function execNext() {
|
||||
try {
|
||||
if (!gNeedsPaint) {
|
||||
testYielder.next();
|
||||
button.getBoundingClientRect(); // Flush.
|
||||
gNeedsPaint = true;
|
||||
if (!gNeedsPaint) {
|
||||
let {done} = testYielder.next();
|
||||
if (done) {
|
||||
return;
|
||||
}
|
||||
SimpleTest.executeSoon(execNext);
|
||||
} catch (e) {}
|
||||
button.getBoundingClientRect(); // Flush.
|
||||
gNeedsPaint = true;
|
||||
}
|
||||
SimpleTest.executeSoon(execNext);
|
||||
}
|
||||
execNext();
|
||||
}
|
||||
|
||||
function tests() {
|
||||
function* tests() {
|
||||
window.addEventListener("MozAfterPaint", paintListener, false);
|
||||
normalButtonCanvas = takeSnapshot();
|
||||
// Press the button.
|
||||
|
|
|
@ -52,12 +52,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=415498
|
|||
}
|
||||
|
||||
function nextTest() {
|
||||
try {
|
||||
gTestsIterator.next();
|
||||
} catch (err) {
|
||||
ok(err instanceof StopIteration,
|
||||
"Some other exception was thrown than what we expected!");
|
||||
|
||||
let {done} = gTestsIterator.next();
|
||||
if (done) {
|
||||
if (gConsole && gConsoleListener) {
|
||||
gConsole.unregisterListener(gConsoleListener);
|
||||
}
|
||||
|
@ -65,7 +61,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=415498
|
|||
}
|
||||
}
|
||||
|
||||
function testsIterator() {
|
||||
function* testsIterator() {
|
||||
|
||||
var browser = $("browser");
|
||||
browser.addEventListener("load", function() {
|
||||
|
|
|
@ -30,7 +30,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=656379
|
|||
|
||||
/** Test for Bug 656379 **/
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
function tests() {
|
||||
function* tests() {
|
||||
synthesizeMouseAtCenter($("label1"), { type: "mousemove" });
|
||||
yield undefined;
|
||||
is($("button1").matches(":hover"), true,
|
||||
|
@ -67,10 +67,11 @@ function tests() {
|
|||
function executeTests() {
|
||||
var testYielder = tests();
|
||||
function execNext() {
|
||||
try {
|
||||
testYielder.next();
|
||||
SimpleTest.executeSoon(execNext);
|
||||
} catch(e) {}
|
||||
let {done} = testYielder.next();
|
||||
if (done) {
|
||||
return;
|
||||
}
|
||||
SimpleTest.executeSoon(execNext);
|
||||
}
|
||||
execNext();
|
||||
}
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
<p id="display">
|
||||
<iframe id=inner></iframe>
|
||||
<iframe id=iframe></iframe>
|
||||
<img id=img onload="gen.send(event);">
|
||||
<audio id=audio onloadeddata="gen.send(event);">
|
||||
<img id=img onload="gen.next(event);">
|
||||
<audio id=audio onloadeddata="gen.next(event);">
|
||||
</p>
|
||||
<div id="content" style="display: none">
|
||||
|
||||
|
@ -24,7 +24,7 @@ try {
|
|||
} catch(e) { }
|
||||
|
||||
window.addEventListener("message", function(e) {
|
||||
gen.send(JSON.parse(e.data));
|
||||
gen.next(JSON.parse(e.data));
|
||||
}, false);
|
||||
|
||||
const innerSameSiteURI = "file_mozfiledataurl_inner.html";
|
||||
|
@ -59,12 +59,12 @@ function start() {
|
|||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
function runTest([imgFile, audioFile, docFile, xhrFile]) {
|
||||
function* runTest([imgFile, audioFile, docFile, xhrFile]) {
|
||||
inner = document.getElementById('inner');
|
||||
img = document.getElementById('img');
|
||||
audio = document.getElementById('audio');
|
||||
iframe = document.getElementById('iframe');
|
||||
inner.onload = function() { gen.send("inner loaded"); };
|
||||
inner.onload = function() { gen.next("inner loaded"); };
|
||||
|
||||
// Attempt to load a image in this document
|
||||
var fileurl = URL.createObjectURL(imgFile);
|
||||
|
@ -194,7 +194,7 @@ function runTest([imgFile, audioFile, docFile, xhrFile]) {
|
|||
// Attempt to load file url using XHR
|
||||
fileurl = URL.createObjectURL(xhrFile);
|
||||
xhr = new XMLHttpRequest;
|
||||
xhr.onload = function() { gen.send("XHR finished"); };
|
||||
xhr.onload = function() { gen.next("XHR finished"); };
|
||||
xhr.open("GET", fileurl);
|
||||
xhr.send();
|
||||
is((yield), "XHR finished", "correct gen.next()");
|
||||
|
@ -216,8 +216,6 @@ function runTest([imgFile, audioFile, docFile, xhrFile]) {
|
|||
is(res.didError, true, "load failed successfully");
|
||||
|
||||
SimpleTest.finish();
|
||||
|
||||
yield undefined;
|
||||
}
|
||||
</script>
|
||||
</pre>
|
||||
|
|
|
@ -25,7 +25,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=885996
|
|||
test.next();
|
||||
});
|
||||
|
||||
function runTest() {
|
||||
function* runTest() {
|
||||
MockColorPicker.init(window);
|
||||
var element = null;
|
||||
|
||||
|
@ -100,7 +100,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=885996
|
|||
|
||||
MockColorPicker.cleanup();
|
||||
SimpleTest.finish();
|
||||
yield undefined;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
|
|
@ -24,7 +24,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=885996
|
|||
test.next();
|
||||
});
|
||||
|
||||
function runTest() {
|
||||
function* runTest() {
|
||||
MockColorPicker.init(window);
|
||||
var element = null;
|
||||
|
||||
|
@ -47,7 +47,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=885996
|
|||
|
||||
MockColorPicker.cleanup();
|
||||
SimpleTest.finish();
|
||||
yield undefined;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
|
|
@ -45,7 +45,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=885996
|
|||
test.next();
|
||||
});
|
||||
|
||||
function runTest() {
|
||||
function* runTest() {
|
||||
MockColorPicker.init(window);
|
||||
var element = null;
|
||||
|
||||
|
@ -112,7 +112,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=885996
|
|||
|
||||
MockColorPicker.cleanup();
|
||||
SimpleTest.finish();
|
||||
yield undefined;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
|
|
@ -26,7 +26,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=885996
|
|||
test.next();
|
||||
});
|
||||
|
||||
function runTest() {
|
||||
function* runTest() {
|
||||
MockColorPicker.init(window);
|
||||
var element = null;
|
||||
|
||||
|
@ -68,7 +68,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=885996
|
|||
|
||||
MockColorPicker.cleanup();
|
||||
SimpleTest.finish();
|
||||
yield undefined;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
|
|
@ -89,7 +89,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=829606
|
|||
}, 0);
|
||||
}
|
||||
|
||||
function runTest()
|
||||
function* runTest()
|
||||
{
|
||||
test('input');
|
||||
yield undefined;
|
||||
|
@ -98,7 +98,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=829606
|
|||
testCorrectUpdateOnScroll();
|
||||
yield undefined;
|
||||
SimpleTest.finish();
|
||||
yield undefined;
|
||||
}
|
||||
|
||||
gTestRunner = runTest();
|
||||
|
|
|
@ -49,14 +49,9 @@ function urlify(aStr) {
|
|||
|
||||
function runTestsForNextInputType()
|
||||
{
|
||||
try {
|
||||
testRunner.next();
|
||||
} catch (e) {
|
||||
if (e.toString() == '[object StopIteration]') {
|
||||
SimpleTest.finish();
|
||||
} else {
|
||||
throw StopIteration;
|
||||
}
|
||||
let {done} = testRunner.next();
|
||||
if (done) {
|
||||
SimpleTest.finish();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -116,7 +111,7 @@ var submitMethod = submitForm;
|
|||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
function runTest()
|
||||
function* runTest()
|
||||
{
|
||||
SimpleTest.requestLongerTimeout(4);
|
||||
|
||||
|
|
|
@ -23,11 +23,11 @@ Cu.import("resource://gre/modules/Promise.jsm");
|
|||
Cu.import("resource://gre/modules/Task.jsm");
|
||||
|
||||
addLoadEvent(function () {
|
||||
Task.spawn(function run_tests() {
|
||||
Task.spawn(function* run_tests() {
|
||||
while (tests.length) {
|
||||
let test = tests.shift();
|
||||
info("-- running " + test.name);
|
||||
yield Task.spawn(test);
|
||||
yield* test();
|
||||
}
|
||||
|
||||
SimpleTest.finish();
|
||||
|
|
|
@ -100,7 +100,7 @@ function continueTest() {
|
|||
var iframe = document.getElementById("iframe");
|
||||
var iframeCw = iframe.contentWindow;
|
||||
|
||||
function run() {
|
||||
function* run() {
|
||||
var iframe = document.getElementById("iframe");
|
||||
var iframeCw = iframe.contentWindow;
|
||||
|
||||
|
@ -245,7 +245,6 @@ function run() {
|
|||
"Wrong href after document.open().");
|
||||
|
||||
SimpleTest.finish();
|
||||
yield undefined;
|
||||
}
|
||||
|
||||
window.addEventListener("load", function() {
|
||||
|
|
|
@ -62,7 +62,7 @@ function checkLinkColor(aElmId, aExpectedColor, aMessage) {
|
|||
return true;
|
||||
}
|
||||
|
||||
function testIterator() {
|
||||
function* testIterator() {
|
||||
// After first load
|
||||
$("newparent").appendChild($("t"));
|
||||
is($("t").href, "http://www.example.com/" + rand,
|
||||
|
@ -106,7 +106,6 @@ function testIterator() {
|
|||
yield undefined;
|
||||
}
|
||||
SimpleTest.finish();
|
||||
yield undefined;
|
||||
}
|
||||
|
||||
addLoadEvent(function() {
|
||||
|
|
|
@ -686,7 +686,7 @@ function onFilesSet() {
|
|||
});
|
||||
}
|
||||
|
||||
function runTest() {
|
||||
function* runTest() {
|
||||
// Set up the expectedSub array
|
||||
fileReader1 = new FileReader;
|
||||
fileReader1.readAsBinaryString(myFile1);
|
||||
|
@ -816,7 +816,6 @@ function runTest() {
|
|||
expectedSub.concat(expectedAugment), "send augmented FormData");
|
||||
|
||||
SimpleTest.finish();
|
||||
yield undefined;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
|
|
@ -162,7 +162,7 @@ function clickImage(aTarget, aX, aY)
|
|||
aTarget.style.left = "";
|
||||
}
|
||||
|
||||
function runTest() {
|
||||
function* runTest() {
|
||||
// Make normal submission
|
||||
var form = $("form");
|
||||
var iframe = $("target_iframe");
|
||||
|
@ -212,7 +212,6 @@ function runTest() {
|
|||
}
|
||||
|
||||
SimpleTest.finish();
|
||||
yield undefined;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
|
|
@ -16,7 +16,7 @@ function runTest()
|
|||
function finishTestNow()
|
||||
{
|
||||
if (testGenerator) {
|
||||
testGenerator.close();
|
||||
testGenerator.return();
|
||||
testGenerator = undefined;
|
||||
}
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ function finishTest()
|
|||
|
||||
function grabEventAndContinueHandler(event)
|
||||
{
|
||||
testGenerator.send(event);
|
||||
testGenerator.next(event);
|
||||
}
|
||||
|
||||
function errorHandler(event)
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<title>Indexed Database Test</title>
|
||||
|
||||
<script type="text/javascript;version=1.7">
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
let request = indexedDB.open("browser_forgetThisSite.js", 11);
|
||||
request.onerror = grabEventAndContinueHandler;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<title>Indexed Database Test</title>
|
||||
|
||||
<script type="text/javascript;version=1.7">
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
let request = indexedDB.open("browser_forgetThisSite.js");
|
||||
request.onerror = grabEventAndContinueHandler;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<title>Indexed Database Test</title>
|
||||
|
||||
<script type="text/javascript;version=1.7">
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
const name = window.location.pathname;
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ function promiseMessage(aMessage, browser) {
|
|||
});
|
||||
}
|
||||
|
||||
add_task(function test1() {
|
||||
add_task(function* test1() {
|
||||
removePermission(testPageURL, "indexedDB");
|
||||
|
||||
info("creating tab");
|
||||
|
@ -51,7 +51,7 @@ add_task(function test1() {
|
|||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
||||
add_task(function test2() {
|
||||
add_task(function* test2() {
|
||||
info("creating private window");
|
||||
let win = yield BrowserTestUtils.openNewBrowserWindow({ private : true });
|
||||
|
||||
|
@ -81,7 +81,7 @@ add_task(function test2() {
|
|||
win.close();
|
||||
});
|
||||
|
||||
add_task(function test3() {
|
||||
add_task(function* test3() {
|
||||
info("creating tab");
|
||||
gBrowser.selectedTab = gBrowser.addTab();
|
||||
|
||||
|
|
|
@ -19,14 +19,14 @@ if (!window.runTest) {
|
|||
function finishTest()
|
||||
{
|
||||
SimpleTest.executeSoon(function() {
|
||||
testGenerator.close();
|
||||
testGenerator.return();
|
||||
SimpleTest.finish();
|
||||
});
|
||||
}
|
||||
|
||||
function grabEventAndContinueHandler(event)
|
||||
{
|
||||
testGenerator.send(event);
|
||||
testGenerator.next(event);
|
||||
}
|
||||
|
||||
function continueToNextStep()
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
}
|
||||
|
||||
function grabEventAndContinueHandler(event) {
|
||||
testGenerator.send(event);
|
||||
testGenerator.next(event);
|
||||
}
|
||||
|
||||
function errorHandler(event) {
|
||||
|
@ -38,7 +38,6 @@
|
|||
// Let window.onerror have a chance to fire
|
||||
setTimeout(function() {
|
||||
setTimeout(function() {
|
||||
testGenerator.close();
|
||||
window.parent.postMessage("SimpleTest.finish();", "*");
|
||||
}, 0);
|
||||
}, 0);
|
||||
|
@ -48,7 +47,7 @@
|
|||
is(message, "ConstraintError", "Expect a constraint error");
|
||||
};
|
||||
|
||||
function testSteps() {
|
||||
function* testSteps() {
|
||||
window.parent.SpecialPowers.addPermission("indexedDB", true, document);
|
||||
|
||||
let request = indexedDB.open(window.location.pathname, 1);
|
||||
|
@ -230,7 +229,6 @@
|
|||
event.preventDefault();
|
||||
|
||||
finishTest();
|
||||
yield undefined;
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
}
|
||||
|
||||
function grabEventAndContinueHandler(event) {
|
||||
testGenerator.send(event);
|
||||
testGenerator.next(event);
|
||||
}
|
||||
|
||||
function errorHandler(event) {
|
||||
|
@ -29,7 +29,7 @@
|
|||
// Let window.onerror have a chance to fire
|
||||
setTimeout(function() {
|
||||
setTimeout(function() {
|
||||
testGenerator.close();
|
||||
testGenerator.return();
|
||||
ok(windowErrorCount == 1, "Good window.onerror count");
|
||||
window.parent.postMessage("SimpleTest.finish();", "*");
|
||||
}, 0);
|
||||
|
@ -86,7 +86,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
function testSteps() {
|
||||
function* testSteps() {
|
||||
window.parent.SpecialPowers.addPermission("indexedDB", true, document);
|
||||
|
||||
let request = indexedDB.open(window.location.pathname, 1);
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
}
|
||||
|
||||
function grabEventAndContinueHandler(event) {
|
||||
testGenerator.send(event);
|
||||
testGenerator.next(event);
|
||||
}
|
||||
|
||||
function errorHandler(event) {
|
||||
|
@ -40,7 +40,7 @@
|
|||
// Let window.onerror have a chance to fire
|
||||
setTimeout(function() {
|
||||
setTimeout(function() {
|
||||
testGenerator.close();
|
||||
testGenerator.return();
|
||||
window.parent.postMessage("SimpleTest.finish();", "*");
|
||||
}, 0);
|
||||
}, 0);
|
||||
|
@ -50,7 +50,7 @@
|
|||
return false;
|
||||
};
|
||||
|
||||
function testSteps() {
|
||||
function* testSteps() {
|
||||
window.parent.SpecialPowers.addPermission("indexedDB", true, document);
|
||||
|
||||
// Test 1: Throwing an exception in an upgradeneeded handler should
|
||||
|
|
|
@ -90,7 +90,7 @@ function getWasmBinary(text)
|
|||
{
|
||||
let binary = getWasmBinarySync(text);
|
||||
SimpleTest.executeSoon(function() {
|
||||
testGenerator.send(binary);
|
||||
testGenerator.next(binary);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -220,7 +220,7 @@ function verifyWasmModule(module1, module2)
|
|||
|
||||
function grabFileUsageAndContinueHandler(request)
|
||||
{
|
||||
testGenerator.send(request.fileUsage);
|
||||
testGenerator.next(request.fileUsage);
|
||||
}
|
||||
|
||||
function getUsage(usageHandler)
|
||||
|
|
|
@ -46,7 +46,7 @@ testHarnessGenerator.next();
|
|||
|
||||
function testHarnessSteps() {
|
||||
function nextTestHarnessStep(val) {
|
||||
testHarnessGenerator.send(val);
|
||||
testHarnessGenerator.next(val);
|
||||
}
|
||||
|
||||
let testScriptPath;
|
||||
|
@ -222,8 +222,6 @@ function finishTest()
|
|||
"free");
|
||||
|
||||
SimpleTest.executeSoon(function() {
|
||||
testGenerator.close();
|
||||
testHarnessGenerator.close();
|
||||
clearAllDatabases(function() { SimpleTest.finish(); });
|
||||
});
|
||||
}
|
||||
|
@ -235,12 +233,11 @@ function browserRunTest()
|
|||
|
||||
function browserFinishTest()
|
||||
{
|
||||
setTimeout(function() { testGenerator.close(); }, 0);
|
||||
}
|
||||
|
||||
function grabEventAndContinueHandler(event)
|
||||
{
|
||||
testGenerator.send(event);
|
||||
testGenerator.next(event);
|
||||
}
|
||||
|
||||
function continueToNextStep()
|
||||
|
@ -442,7 +439,7 @@ function workerScript() {
|
|||
};
|
||||
|
||||
self.grabEventAndContinueHandler = function(_event_) {
|
||||
testGenerator.send(_event_);
|
||||
testGenerator.next(_event_);
|
||||
};
|
||||
|
||||
self.continueToNextStep = function() {
|
||||
|
@ -608,7 +605,7 @@ function workerScript() {
|
|||
|
||||
case "getWasmBinaryDone":
|
||||
info("Worker: get wasm binary done");
|
||||
testGenerator.send(message.wasmBinary);
|
||||
testGenerator.next(message.wasmBinary);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
var iframe = $("iframe");
|
||||
setCachePref(true);
|
||||
|
@ -53,7 +53,6 @@
|
|||
|
||||
setCachePref(false);
|
||||
finishTest();
|
||||
yield undefined;
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript;version=1.7" src="helpers.js"></script>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
<script type="text/javascript;version=1.7">
|
||||
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
const BLOB_DATA =
|
||||
"504B03040A00000000002E6BF14000000000000000000000000005001C00746573742F" +
|
||||
|
@ -115,7 +115,6 @@
|
|||
ok(event.target.result == TEST_FILE_2_CONTENTS, "Correct text");
|
||||
|
||||
finishTest();
|
||||
yield undefined;
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript;version=1.7" src="helpers.js"></script>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript;version=1.7">
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
info("Setting up test fixtures: create an IndexedDB database and object store.");
|
||||
|
||||
|
@ -269,7 +269,6 @@
|
|||
|
||||
|
||||
finishTest();
|
||||
yield undefined;
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript;version=1.7" src="helpers.js"></script>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
* test. Doing it out here is no good.
|
||||
*/
|
||||
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
info("Open iframe, wait for it to do its IndexedDB stuff.");
|
||||
|
||||
|
@ -49,7 +49,6 @@
|
|||
ok('Did not crash / trigger an assert!');
|
||||
|
||||
finishTest();
|
||||
yield undefined;
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript;version=1.7" src="helpers.js"></script>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript;version=1.7">
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
const BLOB_DATA = ["fun ", "times ", "all ", "around!"];
|
||||
const BLOB_TYPE = "text/plain";
|
||||
|
@ -101,7 +101,6 @@
|
|||
URL.revokeObjectURL(workerScriptUrl);
|
||||
|
||||
finishTest();
|
||||
yield undefined;
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript;version=1.7" src="helpers.js"></script>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* instead generate the expected 404. This test is basically the same as
|
||||
* test_blob_worker_xhr_post.html except for the composite Blob.
|
||||
*/
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
const BLOB_DATA = ["fun ", "times ", "all ", "around!"];
|
||||
const BLOB_TYPE = "text/plain";
|
||||
|
@ -101,7 +101,6 @@
|
|||
URL.revokeObjectURL(workerScriptUrl);
|
||||
|
||||
finishTest();
|
||||
yield undefined;
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript;version=1.7" src="helpers.js"></script>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* contents of the Blob from the worker using an XHR. Ideally, we don't
|
||||
* deadlock the main thread.
|
||||
*/
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
const BLOB_DATA = ["Green"];
|
||||
const BLOB_TYPE = "text/plain";
|
||||
|
@ -102,7 +102,6 @@
|
|||
URL.revokeObjectURL(workerScriptUrl);
|
||||
|
||||
finishTest();
|
||||
yield undefined;
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript;version=1.7" src="helpers.js"></script>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* (as of the time of writing this) basically the same as
|
||||
* test_blob_worker_xhr_read.html but with slicing added.
|
||||
*/
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
const BLOB_DATA = ["Green"];
|
||||
const BLOB_TYPE = "text/plain";
|
||||
|
@ -104,7 +104,6 @@
|
|||
URL.revokeObjectURL(workerScriptUrl);
|
||||
|
||||
finishTest();
|
||||
yield undefined;
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript;version=1.7" src="helpers.js"></script>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript;version=1.7">
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
const name = window.location.pathname;
|
||||
|
||||
|
@ -74,7 +74,6 @@
|
|||
is(bufferCache.length, 11, "Correct length");
|
||||
|
||||
finishTest();
|
||||
yield undefined;
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript;version=1.7" src="file.js"></script>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript;version=1.7">
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
const READ_WRITE = "readwrite";
|
||||
|
||||
|
@ -95,7 +95,6 @@
|
|||
is(bufferCache.length, 2, "Correct length");
|
||||
|
||||
finishTest();
|
||||
yield undefined;
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript;version=1.7" src="file.js"></script>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript;version=1.7">
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
const READ_WRITE = "readwrite";
|
||||
|
||||
|
@ -124,7 +124,6 @@
|
|||
ok(!hasFileInfo(name, 3), "Correct ref count");
|
||||
|
||||
finishTest();
|
||||
yield undefined;
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript;version=1.7" src="file.js"></script>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript;version=1.7">
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
const READ_WRITE = "readwrite";
|
||||
|
||||
|
@ -96,7 +96,6 @@
|
|||
is(endUsage, startUsage, "OS files deleted");
|
||||
|
||||
finishTest();
|
||||
yield undefined;
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript;version=1.7" src="file.js"></script>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript;version=1.7">
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
const READ_WRITE = "readwrite";
|
||||
|
||||
|
@ -77,7 +77,6 @@
|
|||
yield undefined;
|
||||
|
||||
finishTest();
|
||||
yield undefined;
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript;version=1.7" src="file.js"></script>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript;version=1.7">
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
const READ_WRITE = "readwrite";
|
||||
|
||||
|
@ -91,7 +91,6 @@
|
|||
is(bufferCache.length, 2, "Correct length");
|
||||
|
||||
finishTest();
|
||||
yield undefined;
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript;version=1.7" src="file.js"></script>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript;version=1.7">
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
const name = window.location.pathname;
|
||||
|
||||
|
@ -57,7 +57,6 @@
|
|||
}
|
||||
|
||||
finishTest();
|
||||
yield undefined;
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript;version=1.7" src="file.js"></script>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript;version=1.7">
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
const READ_WRITE = "readwrite";
|
||||
|
||||
|
@ -120,7 +120,6 @@
|
|||
is(getFileRefCount(name, 1), 0, "Correct ref count");
|
||||
|
||||
finishTest();
|
||||
yield undefined;
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript;version=1.7" src="file.js"></script>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript;version=1.7">
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
const READ_WRITE = "readwrite";
|
||||
|
||||
|
@ -79,7 +79,6 @@
|
|||
is(getFileRefCount(name, 1), 0, "Correct ref count");
|
||||
|
||||
finishTest();
|
||||
yield undefined;
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript;version=1.7" src="file.js"></script>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript;version=1.7">
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
const READ_WRITE = "readwrite";
|
||||
|
||||
|
@ -90,7 +90,6 @@
|
|||
is(bufferCache.length, 2, "Correct length");
|
||||
|
||||
finishTest();
|
||||
yield undefined;
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript;version=1.7" src="file.js"></script>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript;version=1.7">
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
const READ_WRITE = "readwrite";
|
||||
|
||||
|
@ -64,7 +64,6 @@
|
|||
ok(!hasFileInfo(name, 1), "Correct ref count");
|
||||
|
||||
finishTest();
|
||||
yield undefined;
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript;version=1.7" src="file.js"></script>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
|
||||
<script type="text/javascript;version=1.7">
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
const name = window.location.pathname;
|
||||
|
||||
|
@ -40,7 +40,6 @@
|
|||
event = yield undefined;
|
||||
|
||||
finishTest();
|
||||
yield undefined;
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript;version=1.7" src="helpers.js"></script>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript;version=1.7">
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
const databaseName = window.location.pathname;
|
||||
const databaseVersion = 1;
|
||||
|
@ -190,7 +190,6 @@
|
|||
yield undefined;
|
||||
|
||||
finishTest();
|
||||
yield undefined;
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
|
||||
<script type="text/javascript;version=1.7">
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
const name = window.location.pathname;
|
||||
|
||||
|
@ -41,7 +41,6 @@
|
|||
ok(request.onprogress === undefined, "Property should not exist");
|
||||
|
||||
finishTest();
|
||||
yield undefined;
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript;version=1.7" src="helpers.js"></script>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript;version=1.7">
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
const dbName = window.location.pathname;
|
||||
const dbVersion = 1;
|
||||
|
@ -65,7 +65,6 @@
|
|||
is(seenEntryCount, entryCount, "Correct entry count");
|
||||
|
||||
finishTest();
|
||||
yield undefined;
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript;version=1.7" src="helpers.js"></script>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript;version=1.7">
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
const name = window.location.pathname;
|
||||
|
||||
|
@ -45,7 +45,6 @@
|
|||
}
|
||||
|
||||
finishTest();
|
||||
yield undefined;
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript;version=1.7" src="helpers.js"></script>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript;version=1.7">
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
const name = window.location.pathname;
|
||||
|
||||
|
@ -57,7 +57,6 @@
|
|||
yield undefined;
|
||||
|
||||
finishTest();
|
||||
yield undefined;
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript;version=1.7" src="helpers.js"></script>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript;version=1.7">
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
const name = window.location.pathname;
|
||||
|
||||
|
@ -92,7 +92,6 @@
|
|||
is(fileHandle.location, 0, "Correct location");
|
||||
|
||||
finishTest();
|
||||
yield undefined;
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript;version=1.7" src="helpers.js"></script>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript;version=1.7">
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
const name = window.location.pathname;
|
||||
|
||||
|
@ -50,7 +50,6 @@
|
|||
is(event.target.result, "2", "File handles were ordered properly.");
|
||||
|
||||
finishTest();
|
||||
yield undefined;
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript;version=1.7" src="helpers.js"></script>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript;version=1.7">
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
const name = window.location.pathname;
|
||||
|
||||
|
@ -61,7 +61,6 @@
|
|||
}
|
||||
|
||||
finishTest();
|
||||
yield undefined;
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript;version=1.7" src="helpers.js"></script>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript;version=1.7">
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
const name = window.location.pathname;
|
||||
|
||||
|
@ -66,7 +66,6 @@
|
|||
is(sum, testBuffer.byteLength, "Correct loaded progress sum");
|
||||
|
||||
finishTest();
|
||||
yield undefined;
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript;version=1.7" src="file.js"></script>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript;version=1.7">
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
const name = window.location.pathname;
|
||||
|
||||
|
@ -69,7 +69,6 @@
|
|||
}
|
||||
|
||||
finishTest();
|
||||
yield undefined;
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript;version=1.7" src="helpers.js"></script>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript;version=1.7">
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
const name = window.location.pathname;
|
||||
|
||||
|
@ -57,7 +57,6 @@
|
|||
is(request.readyState, "done", "Correct readyState");
|
||||
|
||||
finishTest();
|
||||
yield undefined;
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript;version=1.7" src="helpers.js"></script>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript;version=1.7">
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
const READ_WRITE = "readwrite";
|
||||
|
||||
|
@ -88,7 +88,6 @@
|
|||
}
|
||||
|
||||
finishTest();
|
||||
yield undefined;
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript;version=1.7" src="file.js"></script>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript;version=1.7">
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
const READ_WRITE = "readwrite";
|
||||
|
||||
|
@ -85,7 +85,6 @@
|
|||
yield undefined;
|
||||
|
||||
finishTest();
|
||||
yield undefined;
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript;version=1.7" src="file.js"></script>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript;version=1.7">
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
const name = window.location.pathname;
|
||||
|
||||
|
@ -99,7 +99,6 @@
|
|||
ok(compareBuffers(resultBuffer2, testBuffer), "Correct data");
|
||||
|
||||
finishTest();
|
||||
yield undefined;
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript;version=1.7" src="file.js"></script>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript;version=1.7">
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
const name = window.location.pathname;
|
||||
|
||||
|
@ -62,7 +62,6 @@
|
|||
}
|
||||
|
||||
finishTest();
|
||||
yield undefined;
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript;version=1.7" src="helpers.js"></script>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript;version=1.7">
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
const name = window.location.pathname;
|
||||
|
||||
|
@ -78,7 +78,6 @@
|
|||
}
|
||||
|
||||
finishTest();
|
||||
yield undefined;
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript;version=1.7" src="file.js"></script>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
|
||||
<script type="text/javascript;version=1.7">
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
const name = window.location.pathname;
|
||||
|
||||
|
@ -136,7 +136,6 @@
|
|||
worker.terminate();
|
||||
|
||||
finishTest();
|
||||
yield undefined;
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript;version=1.7" src="file.js"></script>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript;version=1.7">
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
const name = window.location.pathname;
|
||||
|
||||
|
@ -97,7 +97,6 @@
|
|||
is(result.size, location, "Correct size");
|
||||
|
||||
finishTest();
|
||||
yield undefined;
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript;version=1.7" src="file.js"></script>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
<script type="application/javascript;version=1.7">
|
||||
<![CDATA[
|
||||
function testSteps() {
|
||||
function* testSteps() {
|
||||
const name = window.location.pathname;
|
||||
|
||||
// Test for IDBKeyRange and indexedDB availability in chrome windows.
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript;version=1.7">
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
const name = window.location.pathname;
|
||||
|
||||
|
@ -27,7 +27,6 @@
|
|||
ok(db, "Got database");
|
||||
|
||||
finishTest();
|
||||
yield undefined;
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript;version=1.7" src="helpers.js"></script>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
<script type="application/javascript;version=1.7">
|
||||
<![CDATA[
|
||||
function testSteps() {
|
||||
function* testSteps() {
|
||||
// Test for IDBKeyRange and indexedDB availability in bootstrap files.
|
||||
let test = Cc["@mozilla.org/dom/indexeddb/GlobalObjectsComponent;1"].
|
||||
createInstance(Ci.nsISupports).wrappedJSObject;
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
ok(false, "gotmessage: " + e.data);
|
||||
}
|
||||
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
var iframe = $("inner");
|
||||
iframe.src = "leaving_page_iframe.html";
|
||||
|
@ -42,7 +42,6 @@
|
|||
is(event.target.result.hello, "world", "second modification rolled back");
|
||||
|
||||
finishTest();
|
||||
yield undefined;
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript;version=1.7" src="helpers.js"></script>
|
||||
|
|
|
@ -51,7 +51,7 @@ function childFrameScript() {
|
|||
}
|
||||
|
||||
function grabAndContinue(arg) {
|
||||
testGenerator.send(arg);
|
||||
testGenerator.next(arg);
|
||||
}
|
||||
|
||||
function errorHandler(event) {
|
||||
|
@ -61,7 +61,7 @@ function childFrameScript() {
|
|||
finish();
|
||||
}
|
||||
|
||||
function testSteps() {
|
||||
function* testSteps() {
|
||||
addMessageListener(mmName, grabAndContinue);
|
||||
let message = yield undefined;
|
||||
|
||||
|
@ -195,8 +195,6 @@ function childFrameScript() {
|
|||
|
||||
info("Sending blob and slice from database to message manager");
|
||||
finish([blob, slice]);
|
||||
|
||||
yield undefined;
|
||||
}
|
||||
|
||||
let testGenerator = testSteps();
|
||||
|
@ -211,10 +209,10 @@ function parentFrameScript(mm) {
|
|||
const blob = new Blob(blobData, { type: blobType });
|
||||
|
||||
function grabAndContinue(arg) {
|
||||
testGenerator.send(arg);
|
||||
testGenerator.next(arg);
|
||||
}
|
||||
|
||||
function testSteps() {
|
||||
function* testSteps() {
|
||||
let result = yield undefined;
|
||||
|
||||
is(Array.isArray(result), true, "Child delivered an array of results");
|
||||
|
@ -264,7 +262,6 @@ function parentFrameScript(mm) {
|
|||
is(reader.result, blobData[0], "Second slice has correct data");
|
||||
|
||||
SimpleTest.finish();
|
||||
yield undefined;
|
||||
}
|
||||
|
||||
let testGenerator = testSteps();
|
||||
|
@ -284,7 +281,7 @@ function parentFrameScript(mm) {
|
|||
}
|
||||
|
||||
case "done": {
|
||||
testGenerator.send(data.result);
|
||||
testGenerator.next(data.result);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript;version=1.7">
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
is("open" in indexedDB, true, "open() defined");
|
||||
is("openForPrincipal" in indexedDB, false, "openForPrincipal() not defined");
|
||||
|
@ -19,7 +19,6 @@
|
|||
is("deleteForPrincipal" in indexedDB, false, "deleteForPrincipal() not defined");
|
||||
|
||||
finishTest();
|
||||
yield undefined;
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript;version=1.7" src="helpers.js"></script>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript;version=1.7">
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
const name = window.location.pathname;
|
||||
const version = 1;
|
||||
|
@ -81,7 +81,6 @@
|
|||
}
|
||||
|
||||
finishTest();
|
||||
yield undefined;
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript;version=1.7" src="helpers.js"></script>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
var testGenerator = testSteps();
|
||||
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
const name = this.window ? window.location.pathname : "Splendid Test";
|
||||
const storeName = "test store";
|
||||
|
@ -74,5 +74,4 @@ function testSteps()
|
|||
}
|
||||
|
||||
finishTest();
|
||||
yield undefined;
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
var testGenerator = testSteps();
|
||||
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
const name = this.window ? window.location.pathname : "Splendid Test";
|
||||
const storeName_ToBeDeleted = "test store to be deleted";
|
||||
|
@ -70,5 +70,4 @@ function testSteps()
|
|||
}
|
||||
|
||||
finishTest();
|
||||
yield undefined;
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
var testGenerator = testSteps();
|
||||
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
const name = this.window ? window.location.pathname : "Splendid Test";
|
||||
let openRequest = indexedDB.open(name, 1);
|
||||
|
@ -161,5 +161,4 @@ function testSteps()
|
|||
yield undefined;
|
||||
|
||||
finishTest();
|
||||
yield undefined;
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
var testGenerator = testSteps();
|
||||
|
||||
function testSteps()
|
||||
function* testSteps()
|
||||
{
|
||||
const name = this.window ? window.location.pathname : "Splendid Test";
|
||||
|
||||
|
@ -38,6 +38,5 @@ function testSteps()
|
|||
yield undefined;
|
||||
|
||||
finishTest();
|
||||
yield undefined;
|
||||
}
|
||||
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче