diff options
author | Matt A. Tobin <email@mattatobin.com> | 2018-02-03 06:00:38 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2018-02-03 06:00:38 -0500 |
commit | 8148615da179fdd60f19018e13b4e94b95609cc6 (patch) | |
tree | 771fccdd99fa3adf35fdd2c81d8197b415a89b91 /browser/base/content/test/plugins/browser_CTP_zoom.js | |
parent | 494802c1be7888025b95260d23db187467d2b9dd (diff) | |
download | UXP-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_CTP_zoom.js')
-rw-r--r-- | browser/base/content/test/plugins/browser_CTP_zoom.js | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/browser/base/content/test/plugins/browser_CTP_zoom.js b/browser/base/content/test/plugins/browser_CTP_zoom.js deleted file mode 100644 index 8b353232d..000000000 --- a/browser/base/content/test/plugins/browser_CTP_zoom.js +++ /dev/null @@ -1,62 +0,0 @@ -"use strict"; - -var rootDir = getRootDirectory(gTestPath); -const gTestRoot = rootDir.replace("chrome://mochitests/content/", "http://127.0.0.1:8888/"); - -var gTestBrowser = null; - -add_task(function* () { - registerCleanupFunction(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"); - FullZoom.reset(); // must be called before closing the tab we zoomed! - gBrowser.removeCurrentTab(); - window.focus(); - gTestBrowser = null; - }); -}); - -add_task(function* () { - Services.prefs.setBoolPref("plugins.click_to_play", true); - Services.prefs.setBoolPref("extensions.blocklist.suppressUI", true); - - gBrowser.selectedTab = gBrowser.addTab(); - gTestBrowser = gBrowser.selectedBrowser; - - setTestPluginEnabledState(Ci.nsIPluginTag.STATE_CLICKTOPLAY, "Test Plug-in"); - - let popupNotification = PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser); - ok(!popupNotification, "Test 1, Should not have a click-to-play notification"); - - yield promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_zoom.html"); - - // Work around for delayed PluginBindingAttached - yield promiseUpdatePluginBindings(gTestBrowser); - - yield promisePopupNotification("click-to-play-plugins"); -}); - -// Enlarges the zoom level 4 times and tests that the overlay is -// visible after each enlargement. -add_task(function* () { - for (let count = 0; count < 4; count++) { - - FullZoom.enlarge(); - - // Reload the page - yield promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_zoom.html"); - yield promiseUpdatePluginBindings(gTestBrowser); - yield ContentTask.spawn(gTestBrowser, { count }, function* (args) { - let doc = content.document; - let plugin = doc.getElementById("test"); - let overlay = doc.getAnonymousElementByAttribute(plugin, "anonid", "main"); - Assert.ok(overlay && overlay.classList.contains("visible"), - "Overlay should be visible for zoom change count " + args.count); - }); - } -}); - - |