summaryrefslogtreecommitdiffstats
path: root/browser/base/content/test/plugins/browser_bug744745.js
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2018-02-03 06:00:38 -0500
committerMatt A. Tobin <email@mattatobin.com>2018-02-03 06:00:38 -0500
commit8148615da179fdd60f19018e13b4e94b95609cc6 (patch)
tree771fccdd99fa3adf35fdd2c81d8197b415a89b91 /browser/base/content/test/plugins/browser_bug744745.js
parent494802c1be7888025b95260d23db187467d2b9dd (diff)
downloadUXP-8148615da179fdd60f19018e13b4e94b95609cc6.tar
UXP-8148615da179fdd60f19018e13b4e94b95609cc6.tar.gz
UXP-8148615da179fdd60f19018e13b4e94b95609cc6.tar.lz
UXP-8148615da179fdd60f19018e13b4e94b95609cc6.tar.xz
UXP-8148615da179fdd60f19018e13b4e94b95609cc6.zip
Remove browser tests - Part 1: The Tests (except for experiments)
Diffstat (limited to 'browser/base/content/test/plugins/browser_bug744745.js')
-rw-r--r--browser/base/content/test/plugins/browser_bug744745.js50
1 files changed, 0 insertions, 50 deletions
diff --git a/browser/base/content/test/plugins/browser_bug744745.js b/browser/base/content/test/plugins/browser_bug744745.js
deleted file mode 100644
index c9f552a4e..000000000
--- a/browser/base/content/test/plugins/browser_bug744745.js
+++ /dev/null
@@ -1,50 +0,0 @@
-var gTestRoot = getRootDirectory(gTestPath).replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
-var gTestBrowser = null;
-var gNumPluginBindingsAttached = 0;
-
-function pluginBindingAttached() {
- gNumPluginBindingsAttached++;
- if (gNumPluginBindingsAttached != 1) {
- ok(false, "if we've gotten here, something is quite wrong");
- }
-}
-
-add_task(function* () {
- registerCleanupFunction(function () {
- gTestBrowser.removeEventListener("PluginBindingAttached", pluginBindingAttached, true, true);
- clearAllPluginPermissions();
- Services.prefs.clearUserPref("plugins.click_to_play");
- setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
- setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
- gBrowser.removeCurrentTab();
- window.focus();
- gTestBrowser = null;
- });
-});
-
-add_task(function* () {
- gBrowser.selectedTab = gBrowser.addTab();
- gTestBrowser = gBrowser.selectedBrowser;
-
- Services.prefs.setBoolPref("plugins.click_to_play", true);
-
- setTestPluginEnabledState(Ci.nsIPluginTag.STATE_CLICKTOPLAY, "Test Plug-in");
-
- gTestBrowser.addEventListener("PluginBindingAttached", pluginBindingAttached, true, true);
-
- let testRoot = getRootDirectory(gTestPath).replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
- yield promiseTabLoadEvent(gBrowser.selectedTab, testRoot + "plugin_bug744745.html");
-
- yield promiseForCondition(function () { return gNumPluginBindingsAttached == 1; });
-
- yield ContentTask.spawn(gTestBrowser, {}, function* () {
- let plugin = content.document.getElementById("test");
- if (!plugin) {
- Assert.ok(false, "plugin element not available.");
- return;
- }
- // We can't use MochiKit's routine
- let style = content.getComputedStyle(plugin);
- Assert.ok(("opacity" in style) && style.opacity == 1, "plugin style properly configured.");
- });
-});