diff --git a/browser/base/content/test/general/browser_datareporting_notification.js b/browser/base/content/test/general/browser_datareporting_notification.js index aa8d5c21b74..c695a9fc21b 100644 --- a/browser/base/content/test/general/browser_datareporting_notification.js +++ b/browser/base/content/test/general/browser_datareporting_notification.js @@ -201,6 +201,11 @@ function test_multiple_windows() { ok(true, "Advanced preferences opened on info bar button press."); executeSoon(function soon() { prefWindowOpened = true; + // If the prefs are being displayed in a dialog we need to close it. + // If in a tab (ie, in-content prefs) it closes with the window. + if (!Services.prefs.getBoolPref("browser.preferences.inContent")) { + prefWin.close(); + } maybeFinish(); }); }, "advanced-pane-loaded", false);