mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 44dbd2276837 (bug 926830) for mochitest memory leak on a CLOSED TREE
This commit is contained in:
parent
eaa4884681
commit
9402413367
@ -35,7 +35,8 @@ function test() {
|
||||
waitForExplicitFinish();
|
||||
Services.prefs.setBoolPref("plugins.click_to_play", true);
|
||||
Services.prefs.setBoolPref("extensions.blocklist.suppressUI", true);
|
||||
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_CLICKTOPLAY);
|
||||
let pluginTag = getTestPluginTag();
|
||||
pluginTag.enabledState = Ci.nsIPluginTag.STATE_CLICKTOPLAY;
|
||||
open_manager("addons://list/plugin", part1);
|
||||
}
|
||||
|
||||
@ -218,6 +219,8 @@ function part13() {
|
||||
function end_test() {
|
||||
Services.prefs.clearUserPref("plugins.click_to_play");
|
||||
Services.prefs.clearUserPref("extensions.blocklist.suppressUI");
|
||||
let pluginTag = getTestPluginTag();
|
||||
pluginTag.enabledState = Ci.nsIPluginTag.STATE_ENABLED;
|
||||
resetBlocklist();
|
||||
close_manager(gManagerWindow, function() {
|
||||
finish();
|
||||
|
@ -1268,17 +1268,3 @@ function getTestPluginTag() {
|
||||
ok(false, "Unable to find plugin");
|
||||
return null;
|
||||
}
|
||||
|
||||
// Call this to set the test plugin(s) initially expected enabled state.
|
||||
// It will automatically be reset to it's previous value after the test
|
||||
// ends
|
||||
function setTestPluginEnabledState(newEnabledState, pluginTag) {
|
||||
if (!pluginTag) {
|
||||
pluginTag = getTestPluginTag();
|
||||
}
|
||||
var oldEnabledState = pluginTag.enabledState;
|
||||
pluginTag.enabledState = newEnabledState;
|
||||
SimpleTest.registerCleanupFunction(function() {
|
||||
pluginTag.enabledState = oldEnabledState;
|
||||
});
|
||||
}
|
Loading…
Reference in New Issue
Block a user