Bug 1239354: Replace old-style generator function with star functions. r?asuth
--- a/storage/test/unit/test_connection_asyncClose.js
+++ b/storage/test/unit/test_connection_asyncClose.js
@@ -48,17 +48,17 @@ add_task(function* test_asyncClose_does_
/**
* Open an async database (ensures the async thread is created) and then invoke
* AsyncClose() twice without yielding control flow. The first will initiate
* the actual async close after calling setClosedState which synchronously
* impacts what the second call will observe. The second call will then see the
* async thread is not available and fall back to invoking Close() which will
* notice the mDBConn is already gone.
*/
-add_task(function test_double_asyncClose_throws() {
+add_task(function* test_double_asyncClose_throws() {
let db = yield openAsyncDatabase(getTestDB());
// (Don't yield control flow yet, save the promise for after we make the
// second call.)
// Branch coverage: (asyncThread && mDBConn)
let realClosePromise = yield asyncClose(db);
try {
// Branch coverage: (!asyncThread && !mDBConn)
@@ -110,16 +110,16 @@ add_task(function* test_asyncClose_faile
});
// THE TEST BELOW WANTS TO BE THE LAST TEST WE RUN. DO NOT MAKE IT SAD.
/**
* Verify that asyncClose without a callback does not explode. Without a
* callback the shutdown is not actually observable, so we run this test last
* in order to avoid weird overlaps.
*/
-add_task(function test_asyncClose_does_not_throw_without_callback() {
+add_task(function* test_asyncClose_does_not_throw_without_callback() {
let db = yield openAsyncDatabase(getTestDB());
// Branch coverage: (asyncThread && mDBConn)
db.asyncClose();
ok(true, 'if we shutdown cleanly and do not crash, then we succeeded');
});
// OBEY SHOUTING UPPER-CASE COMMENTS.
// ADD TESTS ABOVE THE FORMER TEST, NOT BELOW IT.