Skip to content
Snippets Groups Projects
Commit 61d903ae authored by timdream's avatar timdream
Browse files

Bug 1509291 - Wait for window to unload before ending the test r=Felipe

Differential Revision: https://phabricator.services.mozilla.com/D13446

--HG--
extra : moz-landing-system : lando
parent 6ea2cab4
No related branches found
No related tags found
No related merge requests found
......@@ -2,13 +2,14 @@ var gTestRoot = getRootDirectory(gTestPath).replace("chrome://mochitests/content
var gNewWindow = null;
add_task(async function() {
registerCleanupFunction(function() {
registerCleanupFunction(async function() {
clearAllPluginPermissions();
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
Services.prefs.clearUserPref("plugins.click_to_play");
Services.prefs.clearUserPref("extensions.blocklist.suppressUI");
gNewWindow.close();
await BrowserTestUtils.waitForEvent(gNewWindow, "unload", true);
gNewWindow = null;
window.focus();
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment