зеркало из https://github.com/mozilla/gecko-dev.git
Backed out 2 changesets (bug 1624802) for test_listOrigins.js failures CLOSED TREE
Backed out changeset e374ffe2e05e (bug 1624802) Backed out changeset 8e2da4b3c32b (bug 1624802)
This commit is contained in:
Родитель
52c65880a4
Коммит
dc69f70165
|
@ -11,16 +11,9 @@ const NS_ERROR_FILE_NO_DEVICE_SPACE = Cr.NS_ERROR_FILE_NO_DEVICE_SPACE;
|
|||
const loggingEnabled = false;
|
||||
|
||||
var testGenerator;
|
||||
var childScriptPaths = [];
|
||||
|
||||
loadScript("dom/quota/test/common/xpcshell.js");
|
||||
|
||||
// Adds a test that will run in a child process (besides the main test that will
|
||||
// run in the main process).
|
||||
function loadChildScript(path) {
|
||||
childScriptPaths.push(depth + path);
|
||||
}
|
||||
|
||||
function log(msg) {
|
||||
if (loggingEnabled) {
|
||||
info(msg);
|
||||
|
@ -40,35 +33,16 @@ function todo(cond, msg) {
|
|||
}
|
||||
|
||||
function run_test() {
|
||||
let testHarnessGenerator;
|
||||
runTest();
|
||||
}
|
||||
|
||||
function nextTestHarnessStep(val) {
|
||||
testHarnessGenerator.next(val);
|
||||
}
|
||||
|
||||
function* testHarnessSteps() {
|
||||
do_test_pending("testHarnessSteps");
|
||||
|
||||
if (Services.appinfo.processType == Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT) {
|
||||
if (!this.runTest) {
|
||||
this.runTest = function() {
|
||||
do_get_profile();
|
||||
|
||||
enableStorageTesting();
|
||||
enableTesting();
|
||||
|
||||
registerCleanupFunction(function() {
|
||||
resetStorageTesting();
|
||||
resetTesting();
|
||||
});
|
||||
|
||||
if (childScriptPaths.length) {
|
||||
// We currently allow defining multiple child tests by calling
|
||||
// loadChildScript multiple times, but run_test_in_child supports
|
||||
// loading of one test only.
|
||||
run_test_in_child(childScriptPaths[0]).then(nextTestHarnessStep);
|
||||
yield undefined;
|
||||
}
|
||||
}
|
||||
|
||||
Cu.importGlobalProperties(["indexedDB", "File", "Blob", "FileReader"]);
|
||||
|
||||
// In order to support converting tests to using async functions from using
|
||||
|
@ -79,6 +53,13 @@ function run_test() {
|
|||
"There should be a testSteps function"
|
||||
);
|
||||
if (testSteps.constructor.name === "AsyncFunction") {
|
||||
// Do run our existing cleanup function that would normally be called by
|
||||
// the generator's call to finishTest().
|
||||
registerCleanupFunction(function() {
|
||||
resetStorageTesting();
|
||||
resetTesting();
|
||||
});
|
||||
|
||||
add_task(testSteps);
|
||||
|
||||
// Since we defined run_test, we must invoke run_next_test() to start the
|
||||
|
@ -90,22 +71,20 @@ function run_test() {
|
|||
"Unsupported function type"
|
||||
);
|
||||
|
||||
do_test_pending("testSteps");
|
||||
do_test_pending();
|
||||
|
||||
testGenerator = testSteps();
|
||||
testGenerator.next();
|
||||
}
|
||||
|
||||
do_test_finished("testHarnessSteps");
|
||||
}
|
||||
|
||||
testHarnessGenerator = testHarnessSteps();
|
||||
testHarnessGenerator.next();
|
||||
};
|
||||
}
|
||||
|
||||
function finishTest() {
|
||||
resetStorageTesting();
|
||||
resetTesting();
|
||||
|
||||
executeSoon(function() {
|
||||
do_test_finished("testSteps");
|
||||
do_test_finished();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
|
||||
loadChildScript("dom/quota/test/xpcshell/test_listOrigins.js");
|
||||
|
||||
async function testSteps() {
|
||||
const origins = [
|
||||
"https://example.com",
|
||||
|
|
|
@ -5,8 +5,6 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
loadChildScript("dom/quota/test/xpcshell/test_originWithCaret.js");
|
||||
|
||||
async function testSteps() {
|
||||
Assert.throws(
|
||||
() => {
|
||||
|
|
|
@ -3,7 +3,4 @@
|
|||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
|
||||
const commonScriptPath = "dom/quota/test/common/test_simpledb.js";
|
||||
|
||||
loadScript(commonScriptPath);
|
||||
loadChildScript(commonScriptPath);
|
||||
loadScript("dom/quota/test/common/test_simpledb.js");
|
||||
|
|
Загрузка…
Ссылка в новой задаче