mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset a3d6ad2faa3a (bug 996652) for checktest bustage.
This commit is contained in:
parent
9427cb67ed
commit
da54b2402e
@ -10,7 +10,6 @@
|
||||
* for more information.
|
||||
*/
|
||||
|
||||
(function(exports) {
|
||||
var _quit = false;
|
||||
var _passed = true;
|
||||
var _tests_pending = 0;
|
||||
@ -196,7 +195,7 @@ _Timer.prototype = {
|
||||
};
|
||||
|
||||
function _do_main() {
|
||||
if (exports._quit)
|
||||
if (_quit)
|
||||
return;
|
||||
|
||||
_testLogger.info("running event loop");
|
||||
@ -204,7 +203,7 @@ function _do_main() {
|
||||
var thr = Components.classes["@mozilla.org/thread-manager;1"]
|
||||
.getService().currentThread;
|
||||
|
||||
while (!exports._quit)
|
||||
while (!_quit)
|
||||
thr.processNextEvent(true);
|
||||
|
||||
while (thr.hasPendingEvents())
|
||||
@ -214,7 +213,7 @@ function _do_main() {
|
||||
function _do_quit() {
|
||||
_testLogger.info("exiting test");
|
||||
_Promise.Debugging.flushUncaughtErrors();
|
||||
exports._quit = true;
|
||||
_quit = true;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -494,6 +493,12 @@ function _execute_test() {
|
||||
// _TEST_FILE is dynamically defined by <runxpcshelltests.py>.
|
||||
_load_files(_TEST_FILE);
|
||||
|
||||
// Tack Assert.jsm methods to the current scope.
|
||||
this.Assert = Assert;
|
||||
for (let func in Assert) {
|
||||
this[func] = Assert[func].bind(Assert);
|
||||
}
|
||||
|
||||
try {
|
||||
do_test_pending("MAIN run_test");
|
||||
// Check if run_test() is defined. If defined, run it.
|
||||
@ -508,12 +513,12 @@ function _execute_test() {
|
||||
_do_main();
|
||||
} catch (e) {
|
||||
_passed = false;
|
||||
// do_check failures are already logged and set exports._quit to true and throw
|
||||
// do_check failures are already logged and set _quit to true and throw
|
||||
// NS_ERROR_ABORT. If both of those are true it is likely this exception
|
||||
// has already been logged so there is no need to log it again. It's
|
||||
// possible that this will mask an NS_ERROR_ABORT that happens after a
|
||||
// do_check failure though.
|
||||
if (!exports._quit || e != Components.results.NS_ERROR_ABORT) {
|
||||
if (!_quit || e != Components.results.NS_ERROR_ABORT) {
|
||||
let extra = {};
|
||||
if (e.fileName) {
|
||||
extra.source_file = e.fileName;
|
||||
@ -647,12 +652,12 @@ function do_execute_soon(callback, aName) {
|
||||
try {
|
||||
callback();
|
||||
} catch (e) {
|
||||
// do_check failures are already logged and set exports._quit to true and throw
|
||||
// do_check failures are already logged and set _quit to true and throw
|
||||
// NS_ERROR_ABORT. If both of those are true it is likely this exception
|
||||
// has already been logged so there is no need to log it again. It's
|
||||
// possible that this will mask an NS_ERROR_ABORT that happens after a
|
||||
// do_check failure though.
|
||||
if (!exports._quit || e != Components.results.NS_ERROR_ABORT) {
|
||||
if (!_quit || e != Components.results.NS_ERROR_ABORT) {
|
||||
let stack = e.stack ? _format_stack(e.stack) : null;
|
||||
_testLogger.testStatus(_TEST_NAME,
|
||||
funcName,
|
||||
@ -1493,58 +1498,3 @@ try {
|
||||
prefs.deleteBranch("browser.devedition.theme.enabled");
|
||||
}
|
||||
} catch (e) { }
|
||||
|
||||
exports._execute_test = _execute_test;
|
||||
exports._setupDebuggerServer = _setupDebuggerServer;
|
||||
exports._quit = _quit;
|
||||
exports._testLogger = _testLogger;
|
||||
exports._wrap_with_quotes_if_necessary = _wrap_with_quotes_if_necessary;
|
||||
exports.Assert = Assert;
|
||||
exports.add_task = add_task;
|
||||
exports.add_test = add_test;
|
||||
exports.do_await_remote_message = do_await_remote_message;
|
||||
exports.do_check_eq = do_check_eq;
|
||||
exports.do_check_false = do_check_false;
|
||||
exports.do_check_instanceof = do_check_instanceof;
|
||||
exports.do_check_matches = do_check_matches;
|
||||
exports.do_check_neq = do_check_neq;
|
||||
exports.do_check_null = do_check_null;
|
||||
exports.do_check_throws_nsIException = do_check_throws_nsIException;
|
||||
exports.do_check_true = do_check_true;
|
||||
exports.do_execute_soon = do_execute_soon;
|
||||
exports.do_get_cwd = do_get_cwd;
|
||||
exports.do_get_file = do_get_file;
|
||||
exports.do_get_idle = do_get_idle;
|
||||
exports.do_get_minidumpdir = do_get_minidumpdir;
|
||||
exports.do_get_profile = do_get_profile;
|
||||
exports.do_get_tempdir = do_get_tempdir;
|
||||
exports.do_load_child_test_harness = do_load_child_test_harness;
|
||||
exports.do_load_manifest = do_load_manifest;
|
||||
exports.do_note_exception = do_note_exception;
|
||||
exports.do_parse_document = do_parse_document;
|
||||
exports.do_print = do_print;
|
||||
exports.do_register_cleanup = do_register_cleanup;
|
||||
exports.do_report_result = do_report_result;
|
||||
exports.do_report_unexpected_exception = do_report_unexpected_exception;
|
||||
exports.do_send_remote_message = do_send_remote_message;
|
||||
exports.do_test_finished = do_test_finished;
|
||||
exports.do_test_pending = do_test_pending;
|
||||
exports.do_throw = do_throw;
|
||||
exports.do_timeout = do_timeout;
|
||||
exports.legible_exception = legible_exception;
|
||||
exports.run_next_test = run_next_test;
|
||||
exports.run_test_in_child = run_test_in_child;
|
||||
exports.runningInParent = runningInParent;
|
||||
exports.todo_check_eq = todo_check_eq;
|
||||
exports.todo_check_false = todo_check_false;
|
||||
exports.todo_check_instanceof = todo_check_instanceof;
|
||||
exports.todo_check_neq = todo_check_neq;
|
||||
exports.todo_check_null = todo_check_null;
|
||||
exports.todo_check_true = todo_check_true;
|
||||
|
||||
// Tack Assert.jsm methods to the current scope.
|
||||
exports.Assert = Assert;
|
||||
for (let func in Assert) {
|
||||
exports[func] = Assert[func].bind(Assert);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user