diff --git a/ipc/glue/test/browser/browser_utility_filepicker_crashed.js b/ipc/glue/test/browser/browser_utility_filepicker_crashed.js index 1cfbb9e59184..6d087d5ff5c1 100644 --- a/ipc/glue/test/browser/browser_utility_filepicker_crashed.js +++ b/ipc/glue/test/browser/browser_utility_filepicker_crashed.js @@ -94,11 +94,19 @@ function makeTask(description, Describe, action) { // file dialog open to fail. // // (We shouldn't be running two such tests in parallel on the same Fx - // instance, but that's not obvious at this level.) + // instance, but it's not obvious at this level that we're not.) ok(false, "another test has a file dialog open; aborting"); return; } + // the file-picker-crashed notification should be shown after the process + // dies, but we must set up the listener before the notification is shown + let notificationAppeared = BrowserTestUtils.waitForNotificationBar( + gBrowser, + undefined, + "file-picker-crashed" + ); + const { process, file } = openFileDialog(); const pid = await process; const untilDead = untilChildProcessDead(pid); @@ -113,6 +121,10 @@ function makeTask(description, Describe, action) { const delta = _after - _before; info(`file callback resolved after ${description} after ${delta}ms`); + let notification = await notificationAppeared; + ok(notification, "file-picker notification should appear"); + notification.close(); + // depending on the test configuration, this may take some time while // cleanup occurs await untilDead;