mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 941137 followup - fix xpcshell test which expects the test plugin to be click-to-activate to actually set the state it desires.
This commit is contained in:
parent
0d3ff8e8c6
commit
c1d7e0f7f3
@ -5,11 +5,25 @@
|
||||
// This verifies that plugins exist and can be enabled and disabled.
|
||||
var gID = null;
|
||||
|
||||
function setTestPluginState(state) {
|
||||
let tags = AM_Cc["@mozilla.org/plugin/host;1"].getService(AM_Ci.nsIPluginHost)
|
||||
.getPluginTags();
|
||||
for (let tag of tags) {
|
||||
if (tag.name == "Test Plug-in") {
|
||||
tag.enabledState = state;
|
||||
return;
|
||||
}
|
||||
}
|
||||
throw Error("No plugin tag found for the test plugin");
|
||||
}
|
||||
|
||||
function run_test() {
|
||||
do_test_pending();
|
||||
createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9.2");
|
||||
Services.prefs.setBoolPref("plugins.click_to_play", true);
|
||||
|
||||
setTestPluginState(AM_Ci.nsIPluginTag.STATE_CLICKTOPLAY);
|
||||
|
||||
startupManager();
|
||||
AddonManager.addAddonListener(AddonListener);
|
||||
AddonManager.addInstallListener(InstallListener);
|
||||
|
Loading…
Reference in New Issue
Block a user