Bug 937380 - Fix forgetaboutsite/test/browser/browser_clearplugindata.js failure when browser-chrome tests are split into chunks. r=bsmedberg

This commit is contained in:
Drew Willcoxon 2013-11-19 14:47:43 -08:00
parent efd80c139c
commit f385cd36c2

View File

@ -29,6 +29,14 @@ function stored(needles) {
return true;
}
function setTestPluginEnabledState(newEnabledState, plugin) {
var oldEnabledState = plugin.enabledState;
plugin.enabledState = newEnabledState;
SimpleTest.registerCleanupFunction(function() {
plugin.enabledState = oldEnabledState;
});
}
function test() {
waitForExplicitFinish();
@ -42,6 +50,11 @@ function test() {
pluginTag = tags[i];
}
}
if (!pluginTag) {
ok(false, "Test Plug-in not available, can't run test");
finish();
}
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, pluginTag);
executeSoon(do_test);
}