mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1016389 - Fix uncaught async error in test_healthreporter.js. r=rnewman
This commit is contained in:
parent
a48eeffc85
commit
d94352ccd6
@ -175,12 +175,18 @@ add_task(function test_shutdown_when_provider_manager_errors() {
|
|||||||
let reporter = yield getHealthReporter("shutdown_when_provider_manager_errors",
|
let reporter = yield getHealthReporter("shutdown_when_provider_manager_errors",
|
||||||
DUMMY_URI, true);
|
DUMMY_URI, true);
|
||||||
|
|
||||||
|
let error = new Error("Fake error during provider manager initialization.");
|
||||||
reporter.onInitializeProviderManagerFinished = function () {
|
reporter.onInitializeProviderManagerFinished = function () {
|
||||||
print("Throwing fake error.");
|
print("Throwing fake error.");
|
||||||
throw new Error("Fake error during provider manager initialization.");
|
throw error;
|
||||||
};
|
};
|
||||||
|
|
||||||
reporter.init();
|
try {
|
||||||
|
yield reporter.init();
|
||||||
|
do_throw("The error was not reported by init()");
|
||||||
|
} catch (ex if ex == error) {
|
||||||
|
do_print("The error was reported by init()");
|
||||||
|
}
|
||||||
|
|
||||||
// This will hang if shutdown logic is busted.
|
// This will hang if shutdown logic is busted.
|
||||||
yield reporter._promiseShutdown;
|
yield reporter._promiseShutdown;
|
||||||
|
Loading…
Reference in New Issue
Block a user