diff --git a/.eslintrc.js b/.eslintrc.js index 25fc8a269b6d..73a31539a781 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -455,16 +455,6 @@ module.exports = { "dom/ipc/test.xhtml", "dom/ipc/tests/test_process_error.xhtml", "dom/notification/test/chrome/test_notification_system_principal.xhtml", - "dom/plugins/test/mochitest/test_busy_hang.xhtml", - "dom/plugins/test/mochitest/test_convertpoint.xhtml", - "dom/plugins/test/mochitest/test_crash_notify.xhtml", - "dom/plugins/test/mochitest/test_crash_notify_no_report.xhtml", - "dom/plugins/test/mochitest/test_crash_submit.xhtml", - "dom/plugins/test/mochitest/test_hang_submit.xhtml", - "dom/plugins/test/mochitest/test_hangui.xhtml", - "dom/plugins/test/mochitest/test_idle_hang.xhtml", - "dom/plugins/test/mochitest/test_xulbrowser_plugin_visibility.xhtml", - "dom/plugins/test/mochitest/xulbrowser_plugin_visibility.xhtml", "dom/security/test/general/test_bug1277803.xhtml", "dom/serviceworkers/test/test_serviceworkerinfo.xhtml", "dom/serviceworkers/test/test_serviceworkermanager.xhtml", diff --git a/dom/plugins/test/crashtests/crashtests.list b/dom/plugins/test/crashtests/crashtests.list index 0b604b983a50..4cc18e13a030 100644 --- a/dom/plugins/test/crashtests/crashtests.list +++ b/dom/plugins/test/crashtests/crashtests.list @@ -3,12 +3,12 @@ HTTP load 48856-1.html HTTP load 110650-1.html skip-if(!haveTestPlugin) HTTP script 539897-1.html asserts-if(winWidget&&browserIsRemote,0-1) skip-if(!haveTestPlugin) HTTP script 540114-1.html -HTTP load 570884.html +skip-if(!haveTestPlugin) HTTP load 570884.html # This test relies on the reading of screenX/Y forcing a round trip to # the X server, which is a bad assumption for . # Plugin arch is going to change anyway with OOP content so skipping # this test for now is OK. skip-if(!haveTestPlugin||http.platform!="X11") HTTP load 598862.html -HTTP load 626602-1.html +skip-if(!haveTestPlugin) HTTP load 626602-1.html HTTP load 752340.html HTTP load 843086.xhtml diff --git a/dom/plugins/test/mochitest/1028200-subpageA.html b/dom/plugins/test/mochitest/1028200-subpageA.html deleted file mode 100644 index d6ab2b144c86..000000000000 --- a/dom/plugins/test/mochitest/1028200-subpageA.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - - -

1028200 subpageA

- - - diff --git a/dom/plugins/test/mochitest/1028200-subpageA1.html b/dom/plugins/test/mochitest/1028200-subpageA1.html deleted file mode 100644 index 2b2d9abc22b8..000000000000 --- a/dom/plugins/test/mochitest/1028200-subpageA1.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - - -

1028200 subpageA1

- - - diff --git a/dom/plugins/test/mochitest/1028200-subpageB.html b/dom/plugins/test/mochitest/1028200-subpageB.html deleted file mode 100644 index 8943ad05230d..000000000000 --- a/dom/plugins/test/mochitest/1028200-subpageB.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - - -

1028200 subpageB

- - - diff --git a/dom/plugins/test/mochitest/1028200-subpageB1.html b/dom/plugins/test/mochitest/1028200-subpageB1.html deleted file mode 100644 index 02b9f96da7c7..000000000000 --- a/dom/plugins/test/mochitest/1028200-subpageB1.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - -

1028200 subpageB1

-
- -
- - diff --git a/dom/plugins/test/mochitest/1028200-subpageC.html b/dom/plugins/test/mochitest/1028200-subpageC.html deleted file mode 100644 index e10870761621..000000000000 --- a/dom/plugins/test/mochitest/1028200-subpageC.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - - -

1028200 subpageC

-
- - diff --git a/dom/plugins/test/mochitest/block_all_plugins.html b/dom/plugins/test/mochitest/block_all_plugins.html new file mode 100644 index 000000000000..3ccdda1373ce --- /dev/null +++ b/dom/plugins/test/mochitest/block_all_plugins.html @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/dom/plugins/test/mochitest/browser.ini b/dom/plugins/test/mochitest/browser.ini index 0001ad6583b9..32aaf9b57642 100644 --- a/dom/plugins/test/mochitest/browser.ini +++ b/dom/plugins/test/mochitest/browser.ini @@ -2,19 +2,16 @@ prefs = plugin.load_flash_only=false support-files = + block_all_plugins.html head.js - plugin_data_url_test.html plugin_test.html plugin_subframe_test.html plugin_no_scroll_div.html +[browser_blockallplugins.js] [browser_bug1163570.js] skip-if = true # Bug 1249878 -[browser_bug1196539.js] -skip-if = (!e10s || os != "win" || webrender) # plugin painting test doesn't work with WR [browser_tabswitchbetweenplugins.js] skip-if = true #Bug 1538425 [browser_pluginscroll.js] skip-if = (true || !e10s || os != "win") # Bug 1213631 -[browser_bug1335475.js] -[browser_data_url_plugin.js] diff --git a/dom/plugins/test/mochitest/browser_blockallplugins.js b/dom/plugins/test/mochitest/browser_blockallplugins.js new file mode 100644 index 000000000000..e847f2cd237a --- /dev/null +++ b/dom/plugins/test/mochitest/browser_blockallplugins.js @@ -0,0 +1,66 @@ +var gTestRoot = getRootDirectory(gTestPath).replace( + "chrome://mochitests/content/", + "http://127.0.0.1:8888/" +); + +add_task(async function() { + registerCleanupFunction(function() { + gBrowser.removeCurrentTab(); + window.focus(); + }); +}); + +// simple tab load helper, pilfered from browser plugin tests +function promiseTabLoadEvent(tab, url) { + info("Wait tab event: load"); + + function handle(loadedUrl) { + if (loadedUrl === "about:blank" || (url && loadedUrl !== url)) { + info(`Skipping spurious load event for ${loadedUrl}`); + return false; + } + + info("Tab event received: load"); + return true; + } + + let loaded = BrowserTestUtils.browserLoaded(tab.linkedBrowser, false, handle); + + if (url) { + BrowserTestUtils.loadURI(tab.linkedBrowser, url); + } + + return loaded; +} + +add_task(async function() { + let pluginTab = (gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser)); + await promiseTabLoadEvent(pluginTab, gTestRoot + "block_all_plugins.html"); + await SpecialPowers.spawn(gBrowser.selectedBrowser, [], async function() { + let doc = content.document; + + let objectElt = doc.getElementById("object"); + Assert.ok(!!objectElt, "object should exist"); + Assert.ok( + objectElt instanceof Ci.nsIObjectLoadingContent, + "object should be an nsIObjectLoadingContent" + ); + Assert.ok( + objectElt.pluginFallbackType == + Ci.nsIObjectLoadingContent.PLUGIN_BLOCK_ALL, + "object should be blocked" + ); + + let embedElt = doc.getElementById("embed"); + Assert.ok(!!embedElt, "embed should exist"); + Assert.ok( + embedElt instanceof Ci.nsIObjectLoadingContent, + "embed should be an nsIObjectLoadingContent" + ); + Assert.ok( + embedElt.pluginFallbackType == + Ci.nsIObjectLoadingContent.PLUGIN_BLOCK_ALL, + "embed should be blocked" + ); + }); +}); diff --git a/dom/plugins/test/mochitest/browser_bug1196539.js b/dom/plugins/test/mochitest/browser_bug1196539.js deleted file mode 100644 index 03d83be0c7bd..000000000000 --- a/dom/plugins/test/mochitest/browser_bug1196539.js +++ /dev/null @@ -1,167 +0,0 @@ -var gTestRoot = getRootDirectory(gTestPath).replace( - "chrome://mochitests/content/", - "http://127.0.0.1:8888/" -); - -function checkPaintCount(aCount) { - ok( - aCount != 0, - "paint count can't be greater than zero, count was " + aCount - ); - ok( - aCount < kMaxPaints, - "paint count should be within limits, count was " + aCount - ); -} - -// maximum number of paints we allow before failing. The test plugin doesn't -// animate so this should really be just 1, but operating systems can -// occasionally fire a few of these so we give these tests a fudge factor. -// A bad regression would either be 0, or 100+. -const kMaxPaints = 10; - -add_task(async function() { - let result, tabSwitchedPromise; - - // We want to make sure that we will paint in cases where we need to. The - // tab layer cache just gets in the way of measuring that. - await SpecialPowers.pushPrefEnv({ - set: [["browser.tabs.remote.tabCacheSize", 0]], - }); - - setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in"); - - let pluginTab = await BrowserTestUtils.openNewForegroundTab( - gBrowser, - gTestRoot + "plugin_test.html" - ); - let homeTab = await BrowserTestUtils.openNewForegroundTab( - gBrowser, - "about:home" - ); - - result = await SpecialPowers.spawn( - pluginTab.linkedBrowser, - [], - async function() { - let doc = content.document; - let plugin = doc.getElementById("testplugin"); - return !!plugin; - } - ); - is(result, true, "plugin is loaded"); - - result = await SpecialPowers.spawn( - pluginTab.linkedBrowser, - [], - async function() { - let doc = content.document; - let plugin = doc.getElementById("testplugin"); - return !XPCNativeWrapper.unwrap(plugin).nativeWidgetIsVisible(); - } - ); - is(result, true, "plugin is hidden"); - - // reset plugin paint count - await SpecialPowers.spawn(pluginTab.linkedBrowser, [], async function() { - let doc = content.document; - let plugin = doc.getElementById("testplugin"); - XPCNativeWrapper.unwrap(plugin).resetPaintCount(); - }); - - // select plugin tab - tabSwitchedPromise = waitTabSwitched(); - gBrowser.selectedTab = pluginTab; - await tabSwitchedPromise; - - // wait a bit for spurious paints - await waitForMs(100); - - result = await SpecialPowers.spawn( - pluginTab.linkedBrowser, - [], - async function() { - let doc = content.document; - let plugin = doc.getElementById("testplugin"); - return XPCNativeWrapper.unwrap(plugin).nativeWidgetIsVisible(); - } - ); - is(result, true, "plugin is visible"); - - // check for good paint count - result = await SpecialPowers.spawn( - pluginTab.linkedBrowser, - [], - async function() { - let doc = content.document; - let plugin = doc.getElementById("testplugin"); - return XPCNativeWrapper.unwrap(plugin).getPaintCount(); - } - ); - checkPaintCount(result); - - // select home tab - tabSwitchedPromise = waitTabSwitched(); - gBrowser.selectedTab = homeTab; - await tabSwitchedPromise; - - // reset paint count - await SpecialPowers.spawn(pluginTab.linkedBrowser, [], async function() { - let doc = content.document; - let plugin = doc.getElementById("testplugin"); - XPCNativeWrapper.unwrap(plugin).resetPaintCount(); - }); - - // wait a bit for spurious paints - await waitForMs(100); - - // check for no paint count - result = await SpecialPowers.spawn( - pluginTab.linkedBrowser, - [], - async function() { - let doc = content.document; - let plugin = doc.getElementById("testplugin"); - return XPCNativeWrapper.unwrap(plugin).getPaintCount(); - } - ); - is(result, 0, "no paints, this is correct."); - - result = await SpecialPowers.spawn( - pluginTab.linkedBrowser, - [], - async function() { - let doc = content.document; - let plugin = doc.getElementById("testplugin"); - return !XPCNativeWrapper.unwrap(plugin).nativeWidgetIsVisible(); - } - ); - is(result, true, "plugin is hidden"); - - // reset paint count - await SpecialPowers.spawn(pluginTab.linkedBrowser, [], async function() { - let doc = content.document; - let plugin = doc.getElementById("testplugin"); - XPCNativeWrapper.unwrap(plugin).resetPaintCount(); - }); - - // select plugin tab - tabSwitchedPromise = waitTabSwitched(); - gBrowser.selectedTab = pluginTab; - await tabSwitchedPromise; - - // check paint count - result = await SpecialPowers.spawn( - pluginTab.linkedBrowser, - [], - async function() { - let doc = content.document; - let plugin = doc.getElementById("testplugin"); - return XPCNativeWrapper.unwrap(plugin).getPaintCount(); - } - ); - checkPaintCount(result); - - gBrowser.removeTab(homeTab); - gBrowser.removeTab(pluginTab); -}); diff --git a/dom/plugins/test/mochitest/browser_bug1335475.js b/dom/plugins/test/mochitest/browser_bug1335475.js deleted file mode 100644 index fd4ea35061d5..000000000000 --- a/dom/plugins/test/mochitest/browser_bug1335475.js +++ /dev/null @@ -1,96 +0,0 @@ -var rootDir = getRootDirectory(gTestPath); -const gTestRoot = rootDir.replace( - "chrome://mochitests/content/", - "http://127.0.0.1:8888/" -); - -add_task(async function() { - is( - navigator.plugins.length, - 0, - "plugins should not be available to chrome-privilege pages" - ); - ok( - !("application/x-test" in navigator.mimeTypes), - "plugins should not be available to chrome-privilege pages" - ); - - await BrowserTestUtils.withNewTab( - { gBrowser, url: "about:blank" }, - async function(browser) { - // about:blank triggered from a toplevel load should not inherit permissions - await SpecialPowers.spawn(browser, [], async function() { - is( - content.window.navigator.plugins.length, - 0, - "plugins should not be available to null-principal about:blank" - ); - ok( - !("application/x-test" in content.window.navigator.mimeTypes), - "plugins should not be available to null-principal about:blank" - ); - }); - - let promise = BrowserTestUtils.browserLoaded(browser); - BrowserTestUtils.loadURI(browser, gTestRoot + "plugin_test.html"); - await promise; - - await SpecialPowers.spawn(browser, [], async function() { - ok( - content.window.navigator.plugins.length > 0, - "plugins should be available to HTTP-loaded pages" - ); - ok( - "application/x-test" in content.window.navigator.mimeTypes, - "plugins should be available to HTTP-loaded pages" - ); - - let subwindow = content.document.getElementById("subf").contentWindow; - - ok( - "application/x-test" in subwindow.navigator.mimeTypes, - "plugins should be available to an about:blank subframe loaded from a site" - ); - }); - - // navigate from the HTTP page to an about:blank page which ought to - // inherit permissions - promise = BrowserTestUtils.browserLoaded(browser); - await SpecialPowers.spawn(browser, [], async function() { - content.document.getElementById("aboutlink").click(); - }); - await promise; - - await SpecialPowers.spawn(browser, [], async function() { - is( - content.window.location.href, - "about:blank", - "sanity-check about:blank load" - ); - ok( - "application/x-test" in content.window.navigator.mimeTypes, - "plugins should be available when a site triggers an about:blank load" - ); - }); - - // navigate to the file: URI, which shouldn't allow plugins. This might - // be wrapped in jar:, but that shouldn't matter for this test - promise = BrowserTestUtils.browserLoaded(browser); - let converteduri = Cc["@mozilla.org/chrome/chrome-registry;1"] - .getService(Ci.nsIChromeRegistry) - .convertChromeURL(Services.io.newURI(rootDir + "plugin_test.html")); - BrowserTestUtils.loadURI(browser, converteduri.spec); - await promise; - - await SpecialPowers.spawn(browser, [], async function() { - ok( - !("application/x-test" in content.window.navigator.mimeTypes), - "plugins should not be available to file: URI content" - ); - }); - } - ); - - // As much as it would be nice, this doesn't actually check ftp:// because - // we don't have a synthetic server. -}); diff --git a/dom/plugins/test/mochitest/browser_data_url_plugin.js b/dom/plugins/test/mochitest/browser_data_url_plugin.js deleted file mode 100644 index 6e4fee4c6fd6..000000000000 --- a/dom/plugins/test/mochitest/browser_data_url_plugin.js +++ /dev/null @@ -1,32 +0,0 @@ -var rootDir = getRootDirectory(gTestPath); -const gTestRoot = rootDir.replace( - "chrome://mochitests/content/", - "http://127.0.0.1:8888/" -); - -add_task(async function() { - is( - navigator.plugins.length, - 0, - "plugins should not be available to chrome-privilege pages" - ); - - await BrowserTestUtils.withNewTab( - { gBrowser, url: gTestRoot + "plugin_data_url_test.html" }, - async function(browser) { - await SpecialPowers.spawn(browser, [], async function() { - ok( - content.window.navigator.plugins.length > 0, - "plugins should be available to HTTP-loaded pages" - ); - let dataFrameWin = content.document.getElementById("dataFrame") - .contentWindow; - is( - dataFrameWin.navigator.plugins.length, - 0, - "plugins should not be available to data: URI in iframe on a site" - ); - }); - } - ); -}); diff --git a/dom/plugins/test/mochitest/chrome.ini b/dom/plugins/test/mochitest/chrome.ini deleted file mode 100644 index 3e0598a912f6..000000000000 --- a/dom/plugins/test/mochitest/chrome.ini +++ /dev/null @@ -1,35 +0,0 @@ -[DEFAULT] -prefs = - plugin.load_flash_only=false -support-files = - hang_test.js - privatemode_perwindowpb.xhtml - plugin-utils.js - -[test_bug479979.xhtml] -[test_bug751809.html] -[test_busy_hang.xhtml] -skip-if = (!crashreporter) || (os != "win") -[test_clear_site_data.html] -[test_convertpoint.xhtml] -skip-if = toolkit != "cocoa" -[test_crash_notify.xhtml] -skip-if = !crashreporter -[test_crash_notify_no_report.xhtml] -skip-if = !crashreporter -[test_crash_submit.xhtml] -skip-if = !crashreporter -[test_hang_submit.xhtml] -skip-if = !crashreporter -[test_hangui.xhtml] -skip-if = (!crashreporter) || (os != "win") || verify -support-files = hangui_subpage.html hangui_common.js hangui_iface.js dialog_watcher.js -[test_idle_hang.xhtml] -skip-if = (!crashreporter) || (os != "win") -[test_npruntime.xhtml] -[test_plugin_tag_clicktoplay.html] -[test_privatemode_perwindowpb.xhtml] -[test_xulbrowser_plugin_visibility.xhtml] -skip-if = (toolkit == "cocoa") || (os == "win") -support-files = xulbrowser_plugin_visibility.xhtml plugin_visibility_loader.html -[test_wmode.xhtml] diff --git a/dom/plugins/test/mochitest/cocoa_focus.html b/dom/plugins/test/mochitest/cocoa_focus.html deleted file mode 100644 index 2e701f84c51c..000000000000 --- a/dom/plugins/test/mochitest/cocoa_focus.html +++ /dev/null @@ -1,142 +0,0 @@ - - - NPCocoaEventFocusChanged Tests - - - - - - - diff --git a/dom/plugins/test/mochitest/cocoa_window_focus.html b/dom/plugins/test/mochitest/cocoa_window_focus.html deleted file mode 100644 index 8305b19a4bf6..000000000000 --- a/dom/plugins/test/mochitest/cocoa_window_focus.html +++ /dev/null @@ -1,95 +0,0 @@ - - - NPCocoaEventWindowFocusChanged Tests - - - - - - - diff --git a/dom/plugins/test/mochitest/crashing_subpage.html b/dom/plugins/test/mochitest/crashing_subpage.html deleted file mode 100644 index 7c00f25c4c6a..000000000000 --- a/dom/plugins/test/mochitest/crashing_subpage.html +++ /dev/null @@ -1,4 +0,0 @@ - - -

Crashing subpage

- diff --git a/dom/plugins/test/mochitest/dialog_watcher.js b/dom/plugins/test/mochitest/dialog_watcher.js deleted file mode 100644 index d5f4c5f48f13..000000000000 --- a/dom/plugins/test/mochitest/dialog_watcher.js +++ /dev/null @@ -1,245 +0,0 @@ -/* eslint-env mozilla/chrome-worker */ - -const EVENT_OBJECT_SHOW = 0x8002; -const EVENT_OBJECT_HIDE = 0x8003; -const WINEVENT_OUTOFCONTEXT = 0; -const WINEVENT_SKIPOWNPROCESS = 2; -const QS_ALLINPUT = 0x04ff; -const INFINITE = 0xffffffff; -const WAIT_OBJECT_0 = 0; -const WAIT_TIMEOUT = 258; -const PM_NOREMOVE = 0; -var user32; - -function DialogWatcher(titleText, onDialogStart, onDialogEnd) { - this.titleText = titleText; - this.onDialogStart = onDialogStart; - this.onDialogEnd = onDialogEnd; -} - -DialogWatcher.prototype.init = function() { - this.hwnd = undefined; - if (!this.user32) { - this.user32 = ctypes.open("user32.dll"); - } - if (!this.findWindow) { - this.findWindow = user32.declare( - "FindWindowW", - ctypes.winapi_abi, - ctypes.uintptr_t, - ctypes.char16_t.ptr, - ctypes.char16_t.ptr - ); - } - if (!this.winEventProcType) { - this.winEventProcType = ctypes.FunctionType( - ctypes.stdcall_abi, - ctypes.void_t, - [ - ctypes.uintptr_t, - ctypes.uint32_t, - ctypes.uintptr_t, - ctypes.long, - ctypes.long, - ctypes.uint32_t, - ctypes.uint32_t, - ] - ).ptr; - } - if (!this.setWinEventHook) { - this.setWinEventHook = user32.declare( - "SetWinEventHook", - ctypes.winapi_abi, - ctypes.uintptr_t, - ctypes.uint32_t, - ctypes.uint32_t, - ctypes.uintptr_t, - this.winEventProcType, - ctypes.uint32_t, - ctypes.uint32_t, - ctypes.uint32_t - ); - } - if (!this.unhookWinEvent) { - this.unhookWinEvent = user32.declare( - "UnhookWinEvent", - ctypes.winapi_abi, - ctypes.int, - ctypes.uintptr_t - ); - } - if (!this.pointType) { - this.pointType = ctypes.StructType("tagPOINT", [ - { x: ctypes.long }, - { y: ctypes.long }, - ]); - } - if (!this.msgType) { - this.msgType = ctypes.StructType("tagMSG", [ - { hwnd: ctypes.uintptr_t }, - { message: ctypes.uint32_t }, - { wParam: ctypes.uintptr_t }, - { lParam: ctypes.intptr_t }, - { time: ctypes.uint32_t }, - { pt: this.pointType }, - ]); - } - if (!this.peekMessage) { - this.peekMessage = user32.declare( - "PeekMessageW", - ctypes.winapi_abi, - ctypes.int, - this.msgType.ptr, - ctypes.uintptr_t, - ctypes.uint32_t, - ctypes.uint32_t, - ctypes.uint32_t - ); - } - if (!this.msgWaitForMultipleObjects) { - this.msgWaitForMultipleObjects = user32.declare( - "MsgWaitForMultipleObjects", - ctypes.winapi_abi, - ctypes.uint32_t, - ctypes.uint32_t, - ctypes.uintptr_t.ptr, - ctypes.int, - ctypes.uint32_t, - ctypes.uint32_t - ); - } - if (!this.getWindowTextW) { - this.getWindowTextW = user32.declare( - "GetWindowTextW", - ctypes.winapi_abi, - ctypes.int, - ctypes.uintptr_t, - ctypes.char16_t.ptr, - ctypes.int - ); - } - if (!this.messageBox) { - // Handy for debugging this code - this.messageBox = user32.declare( - "MessageBoxW", - ctypes.winapi_abi, - ctypes.int, - ctypes.uintptr_t, - ctypes.char16_t.ptr, - ctypes.char16_t.ptr, - ctypes.uint32_t - ); - } -}; - -DialogWatcher.prototype.getWindowText = function(hwnd) { - var bufType = ctypes.ArrayType(ctypes.char16_t); - var buffer = new bufType(256); - - if (this.getWindowTextW(hwnd, buffer, buffer.length)) { - return buffer.readString(); - } - return undefined; -}; - -DialogWatcher.prototype.processWindowEvents = function(timeout) { - var onWinEvent = function( - self, - hook, - event, - hwnd, - idObject, - idChild, - dwEventThread, - dwmsEventTime - ) { - var nhwnd = Number(hwnd); - if (event == EVENT_OBJECT_SHOW) { - if (nhwnd == self.hwnd) { - // We've already picked up this event via FindWindow - return; - } - var windowText = self.getWindowText(hwnd); - if (windowText == self.titleText && self.onDialogStart) { - self.hwnd = nhwnd; - self.onDialogStart(nhwnd); - } - } else if ( - event == EVENT_OBJECT_HIDE && - nhwnd == self.hwnd && - self.onDialogEnd - ) { - self.onDialogEnd(); - self.hwnd = null; - } - }; - var self = this; - var callback = this.winEventProcType(function( - hook, - event, - hwnd, - idObject, - idChild, - dwEventThread, - dwmsEventTime - ) { - onWinEvent( - self, - hook, - event, - hwnd, - idObject, - idChild, - dwEventThread, - dwmsEventTime - ); - }); - var hook = this.setWinEventHook( - EVENT_OBJECT_SHOW, - EVENT_OBJECT_HIDE, - 0, - callback, - 0, - 0, - WINEVENT_OUTOFCONTEXT | WINEVENT_SKIPOWNPROCESS - ); - if (!hook) { - return null; - } - // Check if the window is already showing - var hwnd = this.findWindow(null, this.titleText); - if (hwnd && hwnd > 0) { - this.hwnd = Number(hwnd); - if (this.onDialogStart) { - this.onDialogStart(this.hwnd); - } - } - - if (!timeout) { - timeout = INFINITE; - } - - var waitStatus = WAIT_OBJECT_0; - var expectingStart = this.onDialogStart && this.hwnd === undefined; - var startWaitTime = Date.now(); - while (this.hwnd === undefined || (this.onDialogEnd && this.hwnd)) { - waitStatus = this.msgWaitForMultipleObjects( - 0, - null, - 0, - expectingStart ? INFINITE : timeout, - 0 - ); - if (waitStatus == WAIT_OBJECT_0) { - var msg = new this.msgType(); - this.peekMessage(msg.address(), 0, 0, 0, PM_NOREMOVE); - } - if (waitStatus == WAIT_TIMEOUT || Date.now() - startWaitTime >= timeout) { - break; - } - } - - this.unhookWinEvent(hook); - // Returns true if the hook was successful, something was found, and we never timed out - return this.hwnd !== undefined && waitStatus == WAIT_OBJECT_0; -}; diff --git a/dom/plugins/test/mochitest/file_bug1245545.js b/dom/plugins/test/mochitest/file_bug1245545.js deleted file mode 100644 index 89218feda6dd..000000000000 --- a/dom/plugins/test/mochitest/file_bug1245545.js +++ /dev/null @@ -1,22 +0,0 @@ -/* eslint-env mozilla/frame-script */ -/* Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ */ - -const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm"); - -function getTestPlugin(pluginName) { - var ph = Cc["@mozilla.org/plugin/host;1"].getService(Ci.nsIPluginHost); - var tags = ph.getPluginTags(); - var name = pluginName || "Test Plug-in"; - for (var tag of tags) { - if (tag.name == name) { - return tag; - } - } - return null; -} - -addMessageListener("check-plugin-unload", function(message) { - var tag = getTestPlugin(); - sendAsyncMessage("check-plugin-unload", tag.loaded); -}); diff --git a/dom/plugins/test/mochitest/hang_test.js b/dom/plugins/test/mochitest/hang_test.js deleted file mode 100644 index ca4fd4dfbf51..000000000000 --- a/dom/plugins/test/mochitest/hang_test.js +++ /dev/null @@ -1,117 +0,0 @@ -const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm"); -const { OS } = ChromeUtils.import("resource://gre/modules/osfile.jsm"); - -var success = false; -var observerFired = false; -var observerPromise = null; - -var testObserver = { - idleHang: true, - - observe(subject, topic, data) { - observerFired = true; - ok(true, "Observer fired"); - is(topic, "plugin-crashed", "Checking correct topic"); - is(data, null, "Checking null data"); - ok(subject instanceof Ci.nsIPropertyBag2, "got Propbag"); - ok(subject instanceof Ci.nsIWritablePropertyBag2, "got writable Propbag"); - - var pluginId = subject.getPropertyAsAString("pluginDumpID"); - isnot(pluginId, "", "got a non-empty plugin crash id"); - - var additionalDumps = subject.getPropertyAsACString("additionalMinidumps"); - isnot(additionalDumps, "", "got a non-empty additionalDumps field"); - - // check plugin dump and extra files - let profD = Services.dirsvc.get("ProfD", Ci.nsIFile); - profD.append("minidumps"); - let pluginDumpFile = profD.clone(); - pluginDumpFile.append(pluginId + ".dmp"); - ok(pluginDumpFile.exists(), "plugin minidump exists"); - - let pluginExtraFile = profD.clone(); - pluginExtraFile.append(pluginId + ".extra"); - ok(pluginExtraFile.exists(), "plugin extra file exists"); - - observerPromise = OS.File.read(pluginExtraFile.path, { - encoding: "utf-8", - }).then(json => { - let extraData = JSON.parse(json); - - // check additional dumps - ok( - "additional_minidumps" in extraData, - "got field for additional minidumps" - ); - is( - additionalDumps, - extraData.additional_minidumps, - "the annotation matches the propbag entry" - ); - let dumpNames = extraData.additional_minidumps.split(","); - ok(dumpNames.includes("browser"), "browser in additional_minidumps"); - - for (let name of dumpNames) { - let file = profD.clone(); - file.append(pluginId + "-" + name + ".dmp"); - ok(file.exists(), "additional dump '" + name + "' exists"); - } - - // check cpu usage field - ok("PluginCpuUsage" in extraData, "got extra field for plugin cpu usage"); - let cpuUsage = parseFloat(extraData.PluginCpuUsage); - if (this.idleHang) { - ok(cpuUsage == 0, "plugin cpu usage is 0%"); - } else { - ok(cpuUsage > 0, "plugin cpu usage is >0%"); - } - }); - }, - - QueryInterface: ChromeUtils.generateQI([ - "nsIObserver", - "nsISupportsWeakReference", - ]), -}; - -function onPluginCrashed(aEvent) { - ok(true, "Plugin crashed notification received"); - ok(observerFired, "Observer should have fired first"); - is(aEvent.type, "PluginCrashed", "event is correct type"); - - var pluginElement = document.getElementById("plugin1"); - is( - pluginElement, - aEvent.target, - "Plugin crashed event target is plugin element" - ); - - ok( - aEvent instanceof PluginCrashedEvent, - "plugin crashed event has the right interface" - ); - - is(typeof aEvent.pluginDumpID, "string", "pluginDumpID is correct type"); - isnot(aEvent.pluginDumpID, "", "got a non-empty dump ID"); - is(typeof aEvent.pluginName, "string", "pluginName is correct type"); - is(aEvent.pluginName, "Test Plug-in", "got correct plugin name"); - is(typeof aEvent.pluginFilename, "string", "pluginFilename is correct type"); - isnot(aEvent.pluginFilename, "", "got a non-empty filename"); - // The app itself may or may not have decided to submit the report, so - // allow either true or false here. - ok( - "submittedCrashReport" in aEvent, - "submittedCrashReport is a property of event" - ); - is( - typeof aEvent.submittedCrashReport, - "boolean", - "submittedCrashReport is correct type" - ); - - Services.obs.removeObserver(testObserver, "plugin-crashed"); - - observerPromise.then(() => { - SimpleTest.finish(); - }); -} diff --git a/dom/plugins/test/mochitest/hangui_common.js b/dom/plugins/test/mochitest/hangui_common.js deleted file mode 100644 index f5f93d56ab08..000000000000 --- a/dom/plugins/test/mochitest/hangui_common.js +++ /dev/null @@ -1,19 +0,0 @@ -// Plugin Hang UI constants -const HANGUIOP_NOTHING = 0; -const HANGUIOP_CANCEL = 1; -const HANGUIOP_COMMAND = 2; -const IDC_CONTINUE = 1001; -const IDC_STOP = 1002; -const IDC_NOFUTURE = 1003; - -// Windows constants -const WM_CLOSE = 0x0010; -const WM_COMMAND = 0x0111; -const BM_GETCHECK = 0x00f0; -const BM_SETCHECK = 0x00f1; -const BN_CLICKED = 0; -const BST_CHECKED = 1; - -// Test-specific constants -const EPSILON_MS = 1000; -const STALL_DURATION = 2; diff --git a/dom/plugins/test/mochitest/hangui_iface.js b/dom/plugins/test/mochitest/hangui_iface.js deleted file mode 100644 index 9fd100bf2f98..000000000000 --- a/dom/plugins/test/mochitest/hangui_iface.js +++ /dev/null @@ -1,147 +0,0 @@ -/* eslint-env mozilla/chrome-worker */ - -var user32; -var sendMessage; -var getDlgItem; -var messageBox; -var watcher; - -/* import-globals-from hangui_common.js */ -importScripts("hangui_common.js"); -/* import-globals-from dialog_watcher.js */ -importScripts("dialog_watcher.js"); - -function initCTypes() { - if (!user32) { - user32 = ctypes.open("user32.dll"); - } - if (!getDlgItem) { - getDlgItem = user32.declare( - "GetDlgItem", - ctypes.winapi_abi, - ctypes.uintptr_t, - ctypes.uintptr_t, - ctypes.int - ); - } - if (!sendMessage) { - sendMessage = user32.declare( - "SendMessageW", - ctypes.winapi_abi, - ctypes.intptr_t, - ctypes.uintptr_t, - ctypes.uint32_t, - ctypes.uintptr_t, - ctypes.intptr_t - ); - } - if (!messageBox) { - // Handy for debugging the test itself - messageBox = user32.declare( - "MessageBoxW", - ctypes.winapi_abi, - ctypes.int, - ctypes.uintptr_t, - ctypes.char16_t.ptr, - ctypes.char16_t.ptr, - ctypes.uint32_t - ); - } - if (!watcher) { - watcher = new DialogWatcher("Warning: Unresponsive plugin"); - } -} - -function postSuccess(params) { - self.postMessage({ status: true, params }); -} - -function postFail(params, msg) { - self.postMessage({ status: false, params, msg }); -} - -function onDialogStart(inparams, hwnd) { - var params = Object.create(inparams); - params.testName += " (Start)"; - params.callback = null; - if (!params.expectToFind) { - postFail(params, "Dialog showed when we weren't expecting it to!"); - return; - } - if (params.opCode == HANGUIOP_CANCEL) { - sendMessage(hwnd, WM_CLOSE, 0, 0); - } else if (params.opCode == HANGUIOP_COMMAND) { - if (params.check) { - var checkbox = getDlgItem(hwnd, IDC_NOFUTURE); - if (!checkbox) { - postFail(params, "Couldn't find checkbox"); - return; - } - sendMessage(checkbox, BM_SETCHECK, BST_CHECKED, 0); - sendMessage( - hwnd, - WM_COMMAND, - (BN_CLICKED << 16) | IDC_NOFUTURE, - checkbox - ); - } - var button = getDlgItem(hwnd, params.commandId); - if (!button) { - postFail( - params, - "GetDlgItem failed to find button with ID " + params.commandId - ); - return; - } - sendMessage( - hwnd, - WM_COMMAND, - (BN_CLICKED << 16) | params.commandId, - button - ); - } - postSuccess(params); -} - -function onDialogEnd(inparams) { - var params = Object.create(inparams); - params.testName += " (End)"; - params.callback = inparams.callback; - postSuccess(params); -} - -self.onmessage = function(event) { - initCTypes(); - watcher.init(); - var params = event.data; - var timeout = params.timeoutMs; - if (params.expectToFind) { - watcher.onDialogStart = function(hwnd) { - onDialogStart(params, hwnd); - }; - if (params.expectToClose) { - watcher.onDialogEnd = function() { - onDialogEnd(params); - }; - } - } else { - watcher.onDialogStart = null; - watcher.onDialogEnd = null; - } - var result = watcher.processWindowEvents(timeout); - if (result === null) { - postFail(params, "Hook failed"); - } else if (!result) { - if (params.expectToFind) { - postFail(params, "The dialog didn't show but we were expecting it to"); - } else { - postSuccess(params); - } - } -}; - -self.onerror = function(event) { - var msg = - "Error: " + event.message + " at " + event.filename + ":" + event.lineno; - postFail(null, msg); -}; diff --git a/dom/plugins/test/mochitest/hangui_subpage.html b/dom/plugins/test/mochitest/hangui_subpage.html deleted file mode 100644 index 401912f68e07..000000000000 --- a/dom/plugins/test/mochitest/hangui_subpage.html +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/dom/plugins/test/mochitest/mixed_case_mime.sjs b/dom/plugins/test/mochitest/mixed_case_mime.sjs index 3c29b8289e73..1901bb74d8f8 100644 --- a/dom/plugins/test/mochitest/mixed_case_mime.sjs +++ b/dom/plugins/test/mochitest/mixed_case_mime.sjs @@ -1,7 +1,7 @@ function handleRequest(request, response) { response.processAsync(); - response.setHeader("Content-Type", "application/x-Second-Test", false); + response.setHeader("Content-Type", "image/pNG", false); response.write("Hello world.\n"); response.finish(); diff --git a/dom/plugins/test/mochitest/mochitest.ini b/dom/plugins/test/mochitest/mochitest.ini index 911b44ff98b5..79ed62167a17 100644 --- a/dom/plugins/test/mochitest/mochitest.ini +++ b/dom/plugins/test/mochitest/mochitest.ini @@ -4,16 +4,9 @@ prefs = skip-if = headless # crash on shutdown, no other failures support-files = 307-xo-redirect.sjs - crashing_subpage.html - 1028200-subpageA.html - 1028200-subpageA1.html - 1028200-subpageB.html - 1028200-subpageB1.html - 1028200-subpageC.html file_authident.js file_bug771202.html file_bug863792.html - file_bug1245545.js large-pic.jpg loremipsum.txt loremipsum.xtest @@ -30,134 +23,23 @@ support-files = post.sjs plugin-utils.js -[test_bug1028200-1.html] -skip-if = !crashreporter -fail-if = (xorigin && fission) # Element is no longer fullscreen -[test_bug1028200-2.html] -skip-if = !crashreporter -[test_bug1028200-3.html] -skip-if = !crashreporter -fail-if = (xorigin && fission) # Element is no longer fullscreen -[test_bug1028200-4.html] -skip-if = !crashreporter -fail-if = (xorigin && fission) # Element is no longer fullscreen -[test_bug1028200-5.html] -skip-if = !crashreporter -fail-if = (xorigin && fission) # Element is no longer fullscreen -[test_bug1028200-6.html] -skip-if = !crashreporter -[test_bug1028200-7.html] -skip-if = !crashreporter -[test_bug532208.html] -[test_bug539565-1.html] -[test_bug539565-2.html] -[test_bug771202.html] -[test_bug777098.html] -[test_bug784131.html] -[test_bug813906.html] -[test_bug852315.html] -[test_bug854082.html] -[test_bug863792.html] -[test_bug967694.html] -[test_bug985859.html] -[test_bug986930.html] -[test_bug1092842.html] -skip-if = (verify && (os == 'win')) || (os == "win" && webrender) # win/webrender bug 1296400 -[test_bug1165981.html] -skip-if = - processor == 'aarch64' && os == 'win' - xorigin && !fission # JavaScript error: test_bug1165981.html:line 51: TypeError: pluginElement.identifierToStringTest is not a function; this test incorrectly passes when fission is enabled because the permission is being checked for the frame site rather than the top-level site. -reason = Plugins are not supported on Windows/AArch64 -[test_bug1245545.html] -[test_bug1307694.html] -skip-if = verify || (processor == 'aarch64' && os == 'win') # aarch64 due to 1541241 -fail-if = (xorigin && !fission) -[test_cocoa_focus.html] -skip-if = toolkit != "cocoa" || e10s # Bug 1194534 -support-files = cocoa_focus.html -[test_cocoa_window_focus.html] -skip-if = toolkit != "cocoa" # Bug 1194534 -support-files = cocoa_window_focus.html -[test_copyText.html] -skip-if = toolkit != "gtk" -[test_crash_nested_loop.html] -skip-if = toolkit != "gtk" -[test_crashing.html] -skip-if = !crashreporter -[test_crashing2.html] -skip-if = (!crashreporter) || true # Bug 566049 -[test_CrashService_crash.html] -skip-if = !crashreporter || e10s -[test_CrashService_hang.html] -skip-if = !crashreporter || e10s -[test_defaultValue.html] -skip-if = (verify && !debug && (os == 'linux')) -[test_enumerate.html] [test_hanging.html] skip-if = !crashreporter || e10s -[test_hidden_plugin.html] -[test_instance_re-parent.html] -[test_instance_unparent1.html] -[test_instance_unparent2.html] -[test_instance_unparent3.html] -[test_instantiation.html] [test_mixed_case_mime.html] skip-if = (processor == 'aarch64' && os == 'win') reason = Plugins are not supported on Windows/AArch64 -[test_multipleinstanceobjects.html] -[test_newstreamondestroy.html] -[test_npn_timers.html] -[test_npobject_getters.html] -[test_NPNVdocumentOrigin.html] -[test_NPPVpluginWantsAllNetworkStreams.html] -[test_npruntime_construct.html] -[test_npruntime_identifiers.html] -[test_npruntime_npnevaluate.html] -[test_npruntime_npninvoke.html] -[test_npruntime_npninvokedefault.html] -[test_object.html] -[test_painting.html] -skip-if = (toolkit == "cocoa" && e10s) # bug 1252230 +[test_plugin_fallback_focus.html] [test_plugin_scroll_painting.html] skip-if = true # Bug 596491 -[test_pluginstream_err.html] [test_pluginstream_geturl.html] skip-if = true # Bug 1267432 [test_pluginstream_geturlnotify.html] skip-if = true # Bug 1267432 -[test_pluginstream_post.html] -[test_pluginstream_poststream.html] -[test_pluginstream_referer.html] -fail-if = xorigin -[test_pluginstream_src.html] -[test_pluginstream_src_dynamic.html] -[test_pluginstream_src_referer.html] -fail-if = xorigin [test_positioning.html] skip-if = true # disabled due to oddness, perhaps scrolling of the mochitest window? -[test_propertyAndMethod.html] -[test_queryCSSZoomFactor.html] [test_queryContentsScaleFactor.html] skip-if = (toolkit != "cocoa") || (os != "win") [test_queryContentsScaleFactorWindowed.html] skip-if = (toolkit != "cocoa") || (os != "win") -[test_redirect_handling.html] [test_refresh_navigator_plugins.html] skip-if = e10s # Bug 1090576 -[test_secondPlugin.html] -[test_src_url_change.html] -[test_streamatclose.html] -[test_streamNotify.html] -[test_stringHandling.html] -[test_visibility.html] -skip-if = toolkit == "cocoa" -[test_windowed_invalidate.html] -skip-if = os != "win" || webrender # win/webrender bug 1296400 -[test_windowless_flash.html] -skip-if = !(os == "win" && processor == "x86_64") || verify -[test_windowless_ime.html] -skip-if = os != "win" || (os == "win" && processor == "aarch64") # aarch64 due to 1536350 -[test_x11_error_crash.html] -skip-if = !crashreporter || e10s || toolkit != "gtk" -[test_zero_opacity.html] -skip-if = os == "win" && webrender # win/webrender bug 1296400 diff --git a/dom/plugins/test/mochitest/plugin_data_url_test.html b/dom/plugins/test/mochitest/plugin_data_url_test.html deleted file mode 100644 index 49ee4b1057ba..000000000000 --- a/dom/plugins/test/mochitest/plugin_data_url_test.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - -
- - - - - diff --git a/dom/plugins/test/mochitest/plugin_visibility_loader.html b/dom/plugins/test/mochitest/plugin_visibility_loader.html deleted file mode 100644 index 22802d9a5158..000000000000 --- a/dom/plugins/test/mochitest/plugin_visibility_loader.html +++ /dev/null @@ -1,6 +0,0 @@ - - - -

This Page Has a Solid Plugin

- -

diff --git a/dom/plugins/test/mochitest/privatemode_perwindowpb.xhtml b/dom/plugins/test/mochitest/privatemode_perwindowpb.xhtml deleted file mode 100644 index ab7f06395c0d..000000000000 --- a/dom/plugins/test/mochitest/privatemode_perwindowpb.xhtml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - diff --git a/dom/plugins/test/mochitest/test_CrashService_crash.html b/dom/plugins/test/mochitest/test_CrashService_crash.html deleted file mode 100644 index 2d11fedb6c8f..000000000000 --- a/dom/plugins/test/mochitest/test_CrashService_crash.html +++ /dev/null @@ -1,27 +0,0 @@ - - nsICrashService plugin crash - - - - - - diff --git a/dom/plugins/test/mochitest/test_CrashService_hang.html b/dom/plugins/test/mochitest/test_CrashService_hang.html deleted file mode 100644 index 17968b8b391d..000000000000 --- a/dom/plugins/test/mochitest/test_CrashService_hang.html +++ /dev/null @@ -1,28 +0,0 @@ - - nsICrashService plugin hang - - - - - - diff --git a/dom/plugins/test/mochitest/test_NPNVdocumentOrigin.html b/dom/plugins/test/mochitest/test_NPNVdocumentOrigin.html deleted file mode 100644 index 442e1a09c657..000000000000 --- a/dom/plugins/test/mochitest/test_NPNVdocumentOrigin.html +++ /dev/null @@ -1,46 +0,0 @@ - - - Test NPNVdocumentOrigin - - - - - - - - - diff --git a/dom/plugins/test/mochitest/test_NPPVpluginWantsAllNetworkStreams.html b/dom/plugins/test/mochitest/test_NPPVpluginWantsAllNetworkStreams.html deleted file mode 100644 index 92fde34b976f..000000000000 --- a/dom/plugins/test/mochitest/test_NPPVpluginWantsAllNetworkStreams.html +++ /dev/null @@ -1,77 +0,0 @@ - - - Test NPPVpluginWantsAllNetworkStreams - - - - - - - - - diff --git a/dom/plugins/test/mochitest/test_bug1028200-1.html b/dom/plugins/test/mochitest/test_bug1028200-1.html deleted file mode 100644 index 5a47627e7986..000000000000 --- a/dom/plugins/test/mochitest/test_bug1028200-1.html +++ /dev/null @@ -1,107 +0,0 @@ - - - Plugin Crash, FullScreenElement Cancelled, div[F] -> iframe -> iframe -> plugin - - - - - - - -

- -
- diff --git a/dom/plugins/test/mochitest/test_bug1028200-2.html b/dom/plugins/test/mochitest/test_bug1028200-2.html deleted file mode 100644 index 02e89ed42562..000000000000 --- a/dom/plugins/test/mochitest/test_bug1028200-2.html +++ /dev/null @@ -1,105 +0,0 @@ - - - Plugin Crash, FullScreenElement Remains, div[F];plugin - - - - - - - -
- - diff --git a/dom/plugins/test/mochitest/test_bug1028200-3.html b/dom/plugins/test/mochitest/test_bug1028200-3.html deleted file mode 100644 index 1563e8b048d4..000000000000 --- a/dom/plugins/test/mochitest/test_bug1028200-3.html +++ /dev/null @@ -1,105 +0,0 @@ - - - Plugin Crash, FullScreenElement Cancelled, iframe[F] -> iframe -> div -> plugin - - - - - - - - - diff --git a/dom/plugins/test/mochitest/test_bug1028200-4.html b/dom/plugins/test/mochitest/test_bug1028200-4.html deleted file mode 100644 index 579594cd2246..000000000000 --- a/dom/plugins/test/mochitest/test_bug1028200-4.html +++ /dev/null @@ -1,105 +0,0 @@ - - - Plugin Crash, FullScreenElement Cancelled, iframe[F] -> iframe -> div -> plugin - - - - - - - - - diff --git a/dom/plugins/test/mochitest/test_bug1028200-5.html b/dom/plugins/test/mochitest/test_bug1028200-5.html deleted file mode 100644 index 9230c1f6eb6f..000000000000 --- a/dom/plugins/test/mochitest/test_bug1028200-5.html +++ /dev/null @@ -1,105 +0,0 @@ - - - Plugin Crash, FullScreenElement Cancelled, div[F] -> plugin - - - - - - - -
- -
- diff --git a/dom/plugins/test/mochitest/test_bug1028200-6.html b/dom/plugins/test/mochitest/test_bug1028200-6.html deleted file mode 100644 index 7046482a81c7..000000000000 --- a/dom/plugins/test/mochitest/test_bug1028200-6.html +++ /dev/null @@ -1,105 +0,0 @@ - - - Plugin Crash, FullScreenElement Remains, iframe[F];plugin - - - - - - - - - - diff --git a/dom/plugins/test/mochitest/test_bug1028200-7.html b/dom/plugins/test/mochitest/test_bug1028200-7.html deleted file mode 100644 index 0d7e4711f23a..000000000000 --- a/dom/plugins/test/mochitest/test_bug1028200-7.html +++ /dev/null @@ -1,107 +0,0 @@ - - - Plugin Crash, FullScreenElement Remains, iframe -> div[F]; iframe -> iframe -> plugin - - - - - - - - - - diff --git a/dom/plugins/test/mochitest/test_bug1092842.html b/dom/plugins/test/mochitest/test_bug1092842.html deleted file mode 100644 index 9bc9a9765502..000000000000 --- a/dom/plugins/test/mochitest/test_bug1092842.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - Bug 1092842 - - - - - - - -
- - -

diff --git a/dom/plugins/test/mochitest/test_bug1165981.html b/dom/plugins/test/mochitest/test_bug1165981.html deleted file mode 100644 index 7b35de55905e..000000000000 --- a/dom/plugins/test/mochitest/test_bug1165981.html +++ /dev/null @@ -1,74 +0,0 @@ - - - Bug 1165981 Test - - - - - - - - - - diff --git a/dom/plugins/test/mochitest/test_bug1245545.html b/dom/plugins/test/mochitest/test_bug1245545.html deleted file mode 100644 index 3257d3d1c5c3..000000000000 --- a/dom/plugins/test/mochitest/test_bug1245545.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - - Test Modifying Plugin click-to-play Flag - - - - - - - - - - diff --git a/dom/plugins/test/mochitest/test_bug1307694.html b/dom/plugins/test/mochitest/test_bug1307694.html deleted file mode 100644 index 7061c117a7fe..000000000000 --- a/dom/plugins/test/mochitest/test_bug1307694.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - -

- -
- -
- - diff --git a/dom/plugins/test/mochitest/test_bug479979.xhtml b/dom/plugins/test/mochitest/test_bug479979.xhtml deleted file mode 100644 index b01b0d31ecb4..000000000000 --- a/dom/plugins/test/mochitest/test_bug479979.xhtml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - diff --git a/dom/plugins/test/mochitest/test_bug532208.html b/dom/plugins/test/mochitest/test_bug532208.html deleted file mode 100644 index 29ec0d6bcdab..000000000000 --- a/dom/plugins/test/mochitest/test_bug532208.html +++ /dev/null @@ -1,27 +0,0 @@ - -Test for correct async delivery of large streams, bug -532208 - - - - - - - - - diff --git a/dom/plugins/test/mochitest/test_bug539565-1.html b/dom/plugins/test/mochitest/test_bug539565-1.html deleted file mode 100644 index 790721e1da98..000000000000 --- a/dom/plugins/test/mochitest/test_bug539565-1.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - Test #1 for Bug 539565 - - - - - - - - - -
-
- -
- - diff --git a/dom/plugins/test/mochitest/test_bug539565-2.html b/dom/plugins/test/mochitest/test_bug539565-2.html deleted file mode 100644 index 5150158f9104..000000000000 --- a/dom/plugins/test/mochitest/test_bug539565-2.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - Test #2 for Bug 539565 - - - - - - - - - -
-
- -
- - diff --git a/dom/plugins/test/mochitest/test_bug751809.html b/dom/plugins/test/mochitest/test_bug751809.html deleted file mode 100644 index c9e13fcf639d..000000000000 --- a/dom/plugins/test/mochitest/test_bug751809.html +++ /dev/null @@ -1,81 +0,0 @@ - - - Bug 751809 - - - - - - - - - - - - - diff --git a/dom/plugins/test/mochitest/test_bug771202.html b/dom/plugins/test/mochitest/test_bug771202.html deleted file mode 100644 index 38ffdc8461fa..000000000000 --- a/dom/plugins/test/mochitest/test_bug771202.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - Test for Bug 771202 - - - - - -Mozilla Bug 771202 -
-
-
- - - - diff --git a/dom/plugins/test/mochitest/test_bug852315.html b/dom/plugins/test/mochitest/test_bug852315.html deleted file mode 100644 index 8a6498c6d22c..000000000000 --- a/dom/plugins/test/mochitest/test_bug852315.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - Test for Bug 852315 - - - - - - - - - - - diff --git a/dom/plugins/test/mochitest/test_bug854082.html b/dom/plugins/test/mochitest/test_bug854082.html deleted file mode 100644 index 204a007d001e..000000000000 --- a/dom/plugins/test/mochitest/test_bug854082.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - Test for Bug 854082 - - - - - - - - - - - diff --git a/dom/plugins/test/mochitest/test_bug863792.html b/dom/plugins/test/mochitest/test_bug863792.html deleted file mode 100644 index 348448403f95..000000000000 --- a/dom/plugins/test/mochitest/test_bug863792.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - Test for Bug 863792 - - - - - - - - - - diff --git a/dom/plugins/test/mochitest/test_bug967694.html b/dom/plugins/test/mochitest/test_bug967694.html deleted file mode 100644 index 6b2678b4ff4d..000000000000 --- a/dom/plugins/test/mochitest/test_bug967694.html +++ /dev/null @@ -1,78 +0,0 @@ - - - - Test for Bug 967694 - - - - - - - - - - diff --git a/dom/plugins/test/mochitest/test_bug985859.html b/dom/plugins/test/mochitest/test_bug985859.html deleted file mode 100644 index e9744d39c61d..000000000000 --- a/dom/plugins/test/mochitest/test_bug985859.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - Test for Bug 985859 - - - - - - - - - - - diff --git a/dom/plugins/test/mochitest/test_bug986930.html b/dom/plugins/test/mochitest/test_bug986930.html deleted file mode 100644 index 3fa1af8460f0..000000000000 --- a/dom/plugins/test/mochitest/test_bug986930.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - - Test for Bug 986930 - - - - - - - - diff --git a/dom/plugins/test/mochitest/test_busy_hang.xhtml b/dom/plugins/test/mochitest/test_busy_hang.xhtml deleted file mode 100644 index d6a91ad1d492..000000000000 --- a/dom/plugins/test/mochitest/test_busy_hang.xhtml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - Plugin Busy Hang Test - - - - - - - - diff --git a/dom/plugins/test/mochitest/test_clear_site_data.html b/dom/plugins/test/mochitest/test_clear_site_data.html deleted file mode 100644 index 306bc4c148c1..000000000000 --- a/dom/plugins/test/mochitest/test_clear_site_data.html +++ /dev/null @@ -1,242 +0,0 @@ - - - NPAPI ClearSiteData/GetSitesWithData Functionality - - - - - - - - - - - - diff --git a/dom/plugins/test/mochitest/test_cocoa_focus.html b/dom/plugins/test/mochitest/test_cocoa_focus.html deleted file mode 100644 index 10789aedc914..000000000000 --- a/dom/plugins/test/mochitest/test_cocoa_focus.html +++ /dev/null @@ -1,28 +0,0 @@ - - - NPCocoaEventFocusChanged Tests - - - - - - - - - diff --git a/dom/plugins/test/mochitest/test_cocoa_window_focus.html b/dom/plugins/test/mochitest/test_cocoa_window_focus.html deleted file mode 100644 index 338777836ce9..000000000000 --- a/dom/plugins/test/mochitest/test_cocoa_window_focus.html +++ /dev/null @@ -1,28 +0,0 @@ - - - NPCocoaEventWindowFocusChanged Tests - - - - - - - - - diff --git a/dom/plugins/test/mochitest/test_convertpoint.xhtml b/dom/plugins/test/mochitest/test_convertpoint.xhtml deleted file mode 100644 index 81179b69d05a..000000000000 --- a/dom/plugins/test/mochitest/test_convertpoint.xhtml +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - - - - - diff --git a/dom/plugins/test/mochitest/test_copyText.html b/dom/plugins/test/mochitest/test_copyText.html deleted file mode 100644 index 1ea14d6a94b3..000000000000 --- a/dom/plugins/test/mochitest/test_copyText.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - Test copying text from browser to plugin - - - - - - - - - - - - diff --git a/dom/plugins/test/mochitest/test_crash_nested_loop.html b/dom/plugins/test/mochitest/test_crash_nested_loop.html deleted file mode 100644 index 83d5e83ec53b..000000000000 --- a/dom/plugins/test/mochitest/test_crash_nested_loop.html +++ /dev/null @@ -1,44 +0,0 @@ - - Plugin crashing in nested loop - - - - - - diff --git a/dom/plugins/test/mochitest/test_crash_notify.xhtml b/dom/plugins/test/mochitest/test_crash_notify.xhtml deleted file mode 100644 index 2a23c510dbf8..000000000000 --- a/dom/plugins/test/mochitest/test_crash_notify.xhtml +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - - - - - - diff --git a/dom/plugins/test/mochitest/test_crash_notify_no_report.xhtml b/dom/plugins/test/mochitest/test_crash_notify_no_report.xhtml deleted file mode 100644 index 32e752593fe2..000000000000 --- a/dom/plugins/test/mochitest/test_crash_notify_no_report.xhtml +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - - - - - - diff --git a/dom/plugins/test/mochitest/test_crash_submit.xhtml b/dom/plugins/test/mochitest/test_crash_submit.xhtml deleted file mode 100644 index 50fca2df4482..000000000000 --- a/dom/plugins/test/mochitest/test_crash_submit.xhtml +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - - - - diff --git a/dom/plugins/test/mochitest/test_crashing.html b/dom/plugins/test/mochitest/test_crashing.html deleted file mode 100644 index a96858331385..000000000000 --- a/dom/plugins/test/mochitest/test_crashing.html +++ /dev/null @@ -1,58 +0,0 @@ - - Plugin crashing - - - - - - diff --git a/dom/plugins/test/mochitest/test_crashing2.html b/dom/plugins/test/mochitest/test_crashing2.html deleted file mode 100644 index 531ef8c9bd29..000000000000 --- a/dom/plugins/test/mochitest/test_crashing2.html +++ /dev/null @@ -1,72 +0,0 @@ - - Plugin crashing - - - - - - - diff --git a/dom/plugins/test/mochitest/test_defaultValue.html b/dom/plugins/test/mochitest/test_defaultValue.html deleted file mode 100644 index e5b47b609827..000000000000 --- a/dom/plugins/test/mochitest/test_defaultValue.html +++ /dev/null @@ -1,38 +0,0 @@ - - - NPObject [[DefaultValue]] implementation - - - - - - - - - - - - - diff --git a/dom/plugins/test/mochitest/test_enumerate.html b/dom/plugins/test/mochitest/test_enumerate.html deleted file mode 100644 index cb9debc2516f..000000000000 --- a/dom/plugins/test/mochitest/test_enumerate.html +++ /dev/null @@ -1,36 +0,0 @@ - - - NPAPI Cookie Tests - - - - - - - - - -

- - - - diff --git a/dom/plugins/test/mochitest/test_hang_submit.xhtml b/dom/plugins/test/mochitest/test_hang_submit.xhtml deleted file mode 100644 index ca0aac782b74..000000000000 --- a/dom/plugins/test/mochitest/test_hang_submit.xhtml +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - - - - - - diff --git a/dom/plugins/test/mochitest/test_hangui.xhtml b/dom/plugins/test/mochitest/test_hangui.xhtml deleted file mode 100644 index 3945a7210388..000000000000 --- a/dom/plugins/test/mochitest/test_hangui.xhtml +++ /dev/null @@ -1,260 +0,0 @@ - - - - - Plugin Hang UI Test - - diff --git a/dom/plugins/test/mochitest/test_hidden_plugin.html b/dom/plugins/test/mochitest/test_hidden_plugin.html deleted file mode 100644 index 0c5c625d28b6..000000000000 --- a/dom/plugins/test/mochitest/test_hidden_plugin.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - Test whether we are adding the dummy plugin correctly when there is only 1 plugin and its hidden - - - - - - - diff --git a/dom/plugins/test/mochitest/test_idle_hang.xhtml b/dom/plugins/test/mochitest/test_idle_hang.xhtml deleted file mode 100644 index 1944abfc54bb..000000000000 --- a/dom/plugins/test/mochitest/test_idle_hang.xhtml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - Plugin Idle Hang Test - - - - - - - - diff --git a/dom/plugins/test/mochitest/test_instance_re-parent.html b/dom/plugins/test/mochitest/test_instance_re-parent.html deleted file mode 100644 index bfedd58b3d2d..000000000000 --- a/dom/plugins/test/mochitest/test_instance_re-parent.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - Test re-parentinging an instance's DOM node - - - - - - - -

- -
- - -
-
-
- - diff --git a/dom/plugins/test/mochitest/test_instance_unparent1.html b/dom/plugins/test/mochitest/test_instance_unparent1.html deleted file mode 100644 index b6d1d9ce243c..000000000000 --- a/dom/plugins/test/mochitest/test_instance_unparent1.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - Test removing an instance's DOM node - - - - - - - -

- -
- -
- - diff --git a/dom/plugins/test/mochitest/test_instance_unparent2.html b/dom/plugins/test/mochitest/test_instance_unparent2.html deleted file mode 100644 index 72eb08e698a6..000000000000 --- a/dom/plugins/test/mochitest/test_instance_unparent2.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - Test removing an instance's DOM node - - - - - - - -

- -
- -
- -
-
- -
-
- - diff --git a/dom/plugins/test/mochitest/test_instance_unparent3.html b/dom/plugins/test/mochitest/test_instance_unparent3.html deleted file mode 100644 index bad11e280778..000000000000 --- a/dom/plugins/test/mochitest/test_instance_unparent3.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - Test removing an instance's DOM node - - - - - - - -

- -
-
- - - - diff --git a/dom/plugins/test/mochitest/test_instantiation.html b/dom/plugins/test/mochitest/test_instantiation.html deleted file mode 100644 index e06008ad52fb..000000000000 --- a/dom/plugins/test/mochitest/test_instantiation.html +++ /dev/null @@ -1,33 +0,0 @@ - - Plugin instantiation - - - - - - - diff --git a/dom/plugins/test/mochitest/test_mixed_case_mime.html b/dom/plugins/test/mochitest/test_mixed_case_mime.html index 4279e7578a9e..85e5f19ac95c 100644 --- a/dom/plugins/test/mochitest/test_mixed_case_mime.html +++ b/dom/plugins/test/mochitest/test_mixed_case_mime.html @@ -2,20 +2,16 @@ Test mixed case mimetype for plugins - diff --git a/dom/plugins/test/mochitest/test_multipleinstanceobjects.html b/dom/plugins/test/mochitest/test_multipleinstanceobjects.html deleted file mode 100644 index c06d769976b9..000000000000 --- a/dom/plugins/test/mochitest/test_multipleinstanceobjects.html +++ /dev/null @@ -1,24 +0,0 @@ - - NPNV*NPObject accessibility tests - - - - - - - - diff --git a/dom/plugins/test/mochitest/test_newstreamondestroy.html b/dom/plugins/test/mochitest/test_newstreamondestroy.html deleted file mode 100644 index e0c46827e221..000000000000 --- a/dom/plugins/test/mochitest/test_newstreamondestroy.html +++ /dev/null @@ -1,36 +0,0 @@ - - NPN_GetURL called from NPP_Destroy - - - - - - - - -

- - diff --git a/dom/plugins/test/mochitest/test_npn_timers.html b/dom/plugins/test/mochitest/test_npn_timers.html deleted file mode 100644 index 64d5aebbda5c..000000000000 --- a/dom/plugins/test/mochitest/test_npn_timers.html +++ /dev/null @@ -1,33 +0,0 @@ - - - NPN_Timer Tests - - - - - - - -

- - - - - - diff --git a/dom/plugins/test/mochitest/test_npobject_getters.html b/dom/plugins/test/mochitest/test_npobject_getters.html deleted file mode 100644 index 4b2edc8d7095..000000000000 --- a/dom/plugins/test/mochitest/test_npobject_getters.html +++ /dev/null @@ -1,29 +0,0 @@ - - NPNV*NPObject accessibility tests - - - - - - - diff --git a/dom/plugins/test/mochitest/test_npruntime.xhtml b/dom/plugins/test/mochitest/test_npruntime.xhtml deleted file mode 100644 index b58c0854a976..000000000000 --- a/dom/plugins/test/mochitest/test_npruntime.xhtml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - diff --git a/dom/plugins/test/mochitest/test_npruntime_construct.html b/dom/plugins/test/mochitest/test_npruntime_construct.html deleted file mode 100644 index 87ec1125330d..000000000000 --- a/dom/plugins/test/mochitest/test_npruntime_construct.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - Test whether windowless plugins receive correct visible/invisible notifications. - - - - - - - -

- - - - diff --git a/dom/plugins/test/mochitest/test_npruntime_identifiers.html b/dom/plugins/test/mochitest/test_npruntime_identifiers.html deleted file mode 100644 index a0dcf8e115c3..000000000000 --- a/dom/plugins/test/mochitest/test_npruntime_identifiers.html +++ /dev/null @@ -1,66 +0,0 @@ - - - NPN_Invoke Tests - - - - - -

- - - - - - - diff --git a/dom/plugins/test/mochitest/test_npruntime_npnevaluate.html b/dom/plugins/test/mochitest/test_npruntime_npnevaluate.html deleted file mode 100644 index e55a04b83b80..000000000000 --- a/dom/plugins/test/mochitest/test_npruntime_npnevaluate.html +++ /dev/null @@ -1,102 +0,0 @@ - - - NPN_Evaluate Tests - - - - - - - -

- - - - -
-
-
-
- - diff --git a/dom/plugins/test/mochitest/test_npruntime_npninvoke.html b/dom/plugins/test/mochitest/test_npruntime_npninvoke.html deleted file mode 100644 index 8104e06210a4..000000000000 --- a/dom/plugins/test/mochitest/test_npruntime_npninvoke.html +++ /dev/null @@ -1,163 +0,0 @@ - - - NPN_Invoke Tests - - - - - - - - -

- - - - -
-
- - diff --git a/dom/plugins/test/mochitest/test_npruntime_npninvokedefault.html b/dom/plugins/test/mochitest/test_npruntime_npninvokedefault.html deleted file mode 100644 index c8b7bf7fe740..000000000000 --- a/dom/plugins/test/mochitest/test_npruntime_npninvokedefault.html +++ /dev/null @@ -1,157 +0,0 @@ - - - NPN_Invoke_Default Tests - - - - - - - -

- - - - -
-
- - diff --git a/dom/plugins/test/mochitest/test_object.html b/dom/plugins/test/mochitest/test_object.html deleted file mode 100644 index d155acb178bf..000000000000 --- a/dom/plugins/test/mochitest/test_object.html +++ /dev/null @@ -1,513 +0,0 @@ - - - - Plugin instantiation - - - - - - diff --git a/dom/plugins/test/mochitest/test_painting.html b/dom/plugins/test/mochitest/test_painting.html deleted file mode 100644 index b688916a5df0..000000000000 --- a/dom/plugins/test/mochitest/test_painting.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - Test for windowless plugin invalidation and expose events in clips - - - - - - - - - -

-
- -
- -
-
- -
-
- - - diff --git a/dom/plugins/test/mochitest/test_plugin_fallback_focus.html b/dom/plugins/test/mochitest/test_plugin_fallback_focus.html new file mode 100644 index 000000000000..e89abb44df8a --- /dev/null +++ b/dom/plugins/test/mochitest/test_plugin_fallback_focus.html @@ -0,0 +1,80 @@ + + + + + Test that plugins reject focus + + + + + +
+ + + +
+ + + + + diff --git a/dom/plugins/test/mochitest/test_plugin_tag_clicktoplay.html b/dom/plugins/test/mochitest/test_plugin_tag_clicktoplay.html deleted file mode 100644 index cdc717f705e3..000000000000 --- a/dom/plugins/test/mochitest/test_plugin_tag_clicktoplay.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - Test Modifying Plugin click-to-play Flag - - - - - - - diff --git a/dom/plugins/test/mochitest/test_pluginstream_err.html b/dom/plugins/test/mochitest/test_pluginstream_err.html deleted file mode 100644 index 54a164d9c3b6..000000000000 --- a/dom/plugins/test/mochitest/test_pluginstream_err.html +++ /dev/null @@ -1,174 +0,0 @@ - - - - - NPAPI Stream Error Tests - - - - - - - Mozilla Bug 517078 - Plugin Stream Error Tests -

- -
- -
- - - diff --git a/dom/plugins/test/mochitest/test_pluginstream_post.html b/dom/plugins/test/mochitest/test_pluginstream_post.html deleted file mode 100644 index da12ff3b0e9c..000000000000 --- a/dom/plugins/test/mochitest/test_pluginstream_post.html +++ /dev/null @@ -1,33 +0,0 @@ - - - NPAPI NPN_PostURL NPStream Test - - - - - - - -

- - - - - - - diff --git a/dom/plugins/test/mochitest/test_pluginstream_poststream.html b/dom/plugins/test/mochitest/test_pluginstream_poststream.html deleted file mode 100644 index ed2e8ce2c72f..000000000000 --- a/dom/plugins/test/mochitest/test_pluginstream_poststream.html +++ /dev/null @@ -1,31 +0,0 @@ - - - NPAPI NPN_PostURL NPStream Test - - - - - - - -

- - - - - - - diff --git a/dom/plugins/test/mochitest/test_pluginstream_referer.html b/dom/plugins/test/mochitest/test_pluginstream_referer.html deleted file mode 100644 index 8f3fb83deaf6..000000000000 --- a/dom/plugins/test/mochitest/test_pluginstream_referer.html +++ /dev/null @@ -1,53 +0,0 @@ - - Do plugin stream requests send the Referer header correctly? - - - - - - - -

- - - diff --git a/dom/plugins/test/mochitest/test_pluginstream_src.html b/dom/plugins/test/mochitest/test_pluginstream_src.html deleted file mode 100644 index cf934d022d23..000000000000 --- a/dom/plugins/test/mochitest/test_pluginstream_src.html +++ /dev/null @@ -1,33 +0,0 @@ - - - NPAPI src="" NPStream Test - - - - - - - -

- - - - - - - \ No newline at end of file diff --git a/dom/plugins/test/mochitest/test_pluginstream_src_dynamic.html b/dom/plugins/test/mochitest/test_pluginstream_src_dynamic.html deleted file mode 100644 index 3e5bd15212fe..000000000000 --- a/dom/plugins/test/mochitest/test_pluginstream_src_dynamic.html +++ /dev/null @@ -1,43 +0,0 @@ - - - NPAPI src="" NPStream Test - - - - - - - -

- - - - - - - - diff --git a/dom/plugins/test/mochitest/test_pluginstream_src_referer.html b/dom/plugins/test/mochitest/test_pluginstream_src_referer.html deleted file mode 100644 index 1b5a381e6613..000000000000 --- a/dom/plugins/test/mochitest/test_pluginstream_src_referer.html +++ /dev/null @@ -1,32 +0,0 @@ - - Do plugin stream src requests send the Referer header correctly? - - - - - -

- - - - - - - diff --git a/dom/plugins/test/mochitest/test_privatemode_perwindowpb.xhtml b/dom/plugins/test/mochitest/test_privatemode_perwindowpb.xhtml deleted file mode 100644 index 322b58485644..000000000000 --- a/dom/plugins/test/mochitest/test_privatemode_perwindowpb.xhtml +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - - - - - diff --git a/dom/plugins/test/mochitest/test_propertyAndMethod.html b/dom/plugins/test/mochitest/test_propertyAndMethod.html deleted file mode 100644 index 30a23e171ade..000000000000 --- a/dom/plugins/test/mochitest/test_propertyAndMethod.html +++ /dev/null @@ -1,51 +0,0 @@ - - - NPObject with property and method with the same name - - - - - - - - - - - - - diff --git a/dom/plugins/test/mochitest/test_queryCSSZoomFactor.html b/dom/plugins/test/mochitest/test_queryCSSZoomFactor.html deleted file mode 100644 index 26612f369611..000000000000 --- a/dom/plugins/test/mochitest/test_queryCSSZoomFactor.html +++ /dev/null @@ -1,48 +0,0 @@ - - - NPAPI NPNVcontentsScaleFactor Test - - - - - - - - - - diff --git a/dom/plugins/test/mochitest/test_redirect_handling.html b/dom/plugins/test/mochitest/test_redirect_handling.html deleted file mode 100644 index 23da579cde2e..000000000000 --- a/dom/plugins/test/mochitest/test_redirect_handling.html +++ /dev/null @@ -1,67 +0,0 @@ - - - Basic NPAPI Redirect Handling - - - - - - - - - diff --git a/dom/plugins/test/mochitest/test_secondPlugin.html b/dom/plugins/test/mochitest/test_secondPlugin.html deleted file mode 100644 index 881b1b3a52de..000000000000 --- a/dom/plugins/test/mochitest/test_secondPlugin.html +++ /dev/null @@ -1,73 +0,0 @@ - - - Second Test Plug-in Test - - - - - - - - - - - - - - diff --git a/dom/plugins/test/mochitest/test_src_url_change.html b/dom/plugins/test/mochitest/test_src_url_change.html deleted file mode 100644 index 3e97442b085b..000000000000 --- a/dom/plugins/test/mochitest/test_src_url_change.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - Test changing src attribute - - - - - - - -

- - - - diff --git a/dom/plugins/test/mochitest/test_streamNotify.html b/dom/plugins/test/mochitest/test_streamNotify.html deleted file mode 100644 index e7904908b510..000000000000 --- a/dom/plugins/test/mochitest/test_streamNotify.html +++ /dev/null @@ -1,100 +0,0 @@ - - NPN_Get/PostURLNotify tests - - - - - - - diff --git a/dom/plugins/test/mochitest/test_streamatclose.html b/dom/plugins/test/mochitest/test_streamatclose.html deleted file mode 100644 index cf96ac2a0e47..000000000000 --- a/dom/plugins/test/mochitest/test_streamatclose.html +++ /dev/null @@ -1,45 +0,0 @@ - - - Stream open at NPP_Destroy - - - - - - - -

- - diff --git a/dom/plugins/test/mochitest/test_stringHandling.html b/dom/plugins/test/mochitest/test_stringHandling.html deleted file mode 100644 index 5c2b6e75fd1b..000000000000 --- a/dom/plugins/test/mochitest/test_stringHandling.html +++ /dev/null @@ -1,35 +0,0 @@ - - - NPAPI string test - - - - - - - - - -

- - - - diff --git a/dom/plugins/test/mochitest/test_visibility.html b/dom/plugins/test/mochitest/test_visibility.html deleted file mode 100644 index f7d510e4194a..000000000000 --- a/dom/plugins/test/mochitest/test_visibility.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - Test whether windowless plugins receive correct visible/invisible notifications. - - - - - - -

- - - - - - - diff --git a/dom/plugins/test/mochitest/test_windowed_invalidate.html b/dom/plugins/test/mochitest/test_windowed_invalidate.html deleted file mode 100644 index a19e4c8c53aa..000000000000 --- a/dom/plugins/test/mochitest/test_windowed_invalidate.html +++ /dev/null @@ -1,66 +0,0 @@ - - - Test NPN_Invalidate working for a windowed plugin - - - - - - - -

- - - - -
-
- - diff --git a/dom/plugins/test/mochitest/test_windowless_flash.html b/dom/plugins/test/mochitest/test_windowless_flash.html deleted file mode 100644 index 8464b10590b5..000000000000 --- a/dom/plugins/test/mochitest/test_windowless_flash.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - -

- -
- - - -
- - diff --git a/dom/plugins/test/mochitest/test_windowless_ime.html b/dom/plugins/test/mochitest/test_windowless_ime.html deleted file mode 100644 index 1b45b649b3e9..000000000000 --- a/dom/plugins/test/mochitest/test_windowless_ime.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - Test #1 for Bug 539565 - - - - - - - - - - - - diff --git a/dom/plugins/test/mochitest/test_wmode.xhtml b/dom/plugins/test/mochitest/test_wmode.xhtml deleted file mode 100644 index 8b6aa1a6f2b9..000000000000 --- a/dom/plugins/test/mochitest/test_wmode.xhtml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - diff --git a/dom/plugins/test/mochitest/test_x11_error_crash.html b/dom/plugins/test/mochitest/test_x11_error_crash.html deleted file mode 100644 index 9fb190438500..000000000000 --- a/dom/plugins/test/mochitest/test_x11_error_crash.html +++ /dev/null @@ -1,26 +0,0 @@ - - Plugin terminating on X11 error - - - - - - diff --git a/dom/plugins/test/mochitest/test_xulbrowser_plugin_visibility.xhtml b/dom/plugins/test/mochitest/test_xulbrowser_plugin_visibility.xhtml deleted file mode 100644 index a710f6ecb316..000000000000 --- a/dom/plugins/test/mochitest/test_xulbrowser_plugin_visibility.xhtml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - diff --git a/dom/plugins/test/mochitest/test_zero_opacity.html b/dom/plugins/test/mochitest/test_zero_opacity.html deleted file mode 100644 index e37dfbabf928..000000000000 --- a/dom/plugins/test/mochitest/test_zero_opacity.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - Test whether windowed plugins with opacity:0 get their window set correctly - - - - - - - -

- - diff --git a/dom/plugins/test/mochitest/xulbrowser_plugin_visibility.xhtml b/dom/plugins/test/mochitest/xulbrowser_plugin_visibility.xhtml deleted file mode 100644 index 6be025014ba7..000000000000 --- a/dom/plugins/test/mochitest/xulbrowser_plugin_visibility.xhtml +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/dom/plugins/test/moz.build b/dom/plugins/test/moz.build index dd464355768a..7f40fb3cbe9e 100644 --- a/dom/plugins/test/moz.build +++ b/dom/plugins/test/moz.build @@ -6,9 +6,6 @@ DIRS += ["testplugin"] -XPCSHELL_TESTS_MANIFESTS += ["unit/xpcshell.ini"] - if CONFIG["MOZ_WIDGET_TOOLKIT"] in ("gtk", "cocoa", "windows"): MOCHITEST_MANIFESTS += ["mochitest/mochitest.ini"] - MOCHITEST_CHROME_MANIFESTS += ["mochitest/chrome.ini"] BROWSER_CHROME_MANIFESTS += ["mochitest/browser.ini"] diff --git a/dom/plugins/test/testplugin/moz.build b/dom/plugins/test/testplugin/moz.build index 4dd85b8e18a6..cb380e2db8f3 100644 --- a/dom/plugins/test/testplugin/moz.build +++ b/dom/plugins/test/testplugin/moz.build @@ -4,7 +4,7 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -DIRS += ["secondplugin", "thirdplugin", "flashplugin"] +DIRS += ["secondplugin", "flashplugin"] SharedLibrary("nptest") diff --git a/dom/plugins/test/testplugin/thirdplugin/Info.plist b/dom/plugins/test/testplugin/thirdplugin/Info.plist deleted file mode 100644 index 96e18ba7555f..000000000000 --- a/dom/plugins/test/testplugin/thirdplugin/Info.plist +++ /dev/null @@ -1,38 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - libnpthirdtest.dylib - CFBundleIdentifier - org.mozilla.ThirdTestPlugin - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - BRPL - CFBundleShortVersionString - 1.0.0.0 - CFBundleSignature - THIRDTEST - CFBundleVersion - 1.0.0.0 - WebPluginName - Third Test Plug-in - WebPluginDescription - Third plug-in for testing purposes. - WebPluginMIMETypes - - application/x-Third-Test - - WebPluginExtensions - - ts2 - - WebPluginTypeDescription - Third test type - - - - diff --git a/dom/plugins/test/testplugin/thirdplugin/moz.build b/dom/plugins/test/testplugin/thirdplugin/moz.build deleted file mode 100644 index d2d673e43484..000000000000 --- a/dom/plugins/test/testplugin/thirdplugin/moz.build +++ /dev/null @@ -1,11 +0,0 @@ -# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- -# vim: set filetype=python: -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. - -SharedLibrary("npthirdtest") - -relative_path = "thirdplugin" -cocoa_name = "ThirdTest" -include("../testplugin.mozbuild") diff --git a/dom/plugins/test/testplugin/thirdplugin/nptest.def b/dom/plugins/test/testplugin/thirdplugin/nptest.def deleted file mode 100644 index 8ea68ba410e5..000000000000 --- a/dom/plugins/test/testplugin/thirdplugin/nptest.def +++ /dev/null @@ -1,7 +0,0 @@ -LIBRARY NPTHIRDTEST - -EXPORTS - NP_GetEntryPoints @1 - NP_Initialize @2 - NP_Shutdown @3 - NP_GetMIMEDescription @4 diff --git a/dom/plugins/test/testplugin/thirdplugin/nptest.rc b/dom/plugins/test/testplugin/thirdplugin/nptest.rc deleted file mode 100644 index de1576920e57..000000000000 --- a/dom/plugins/test/testplugin/thirdplugin/nptest.rc +++ /dev/null @@ -1,42 +0,0 @@ -#include - - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,0,0 - PRODUCTVERSION 1,0,0,0 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS VOS__WINDOWS32 - FILETYPE VFT_DLL - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904e4" - BEGIN - VALUE "CompanyName", "mozilla.org" - VALUE "FileDescription", L"Third plug-in for testing purposes." - VALUE "FileExtents", "ts2" - VALUE "FileOpenName", "Third test type" - VALUE "FileVersion", "1.0" - VALUE "InternalName", "npthirdtest" - VALUE "MIMEType", "application/x-Third-Test" - VALUE "OriginalFilename", "npthirdtest.dll" - VALUE "ProductName", "Third Test Plug-in" - VALUE "ProductVersion", "1.0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1252 - END -END diff --git a/dom/plugins/test/testplugin/thirdplugin/nptest_name.cpp b/dom/plugins/test/testplugin/thirdplugin/nptest_name.cpp deleted file mode 100644 index f9788020b8ad..000000000000 --- a/dom/plugins/test/testplugin/thirdplugin/nptest_name.cpp +++ /dev/null @@ -1,7 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -const char* sPluginName = "Third Test Plug-in"; -const char* sPluginDescription = "Third plug-in for testing purposes."; -const char* sMimeDescription = "application/x-Third-Test:ts3:Third test type"; diff --git a/dom/plugins/test/unit/head_plugins.js b/dom/plugins/test/unit/head_plugins.js deleted file mode 100644 index a04536ca1fdd..000000000000 --- a/dom/plugins/test/unit/head_plugins.js +++ /dev/null @@ -1,123 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm"); - -const gIsWindows = mozinfo.os == "win"; -const gIsOSX = mozinfo.os == "mac"; -const gIsLinux = mozinfo.os == "linux"; -const gDirSvc = Services.dirsvc; - -function allow_all_plugins() { - Services.prefs.setBoolPref("plugin.load_flash_only", false); - // plugin.load_flash_only is only respected if xpc::IsInAutomation is true. - // This is not the case by default in xpcshell tests, unless the following - // pref is also set. Fixing this generically is bug 1598804 - Services.prefs.setBoolPref( - "security.turn_off_all_security_so_that_viruses_can_take_over_this_computer", - true - ); -} - -// Finds the test plugin library -function get_test_plugin(secondplugin = false) { - for (let dir of gDirSvc.get("APluginsDL", Ci.nsISimpleEnumerator)) { - let name = get_platform_specific_plugin_name(secondplugin); - let plugin = dir.clone(); - plugin.append(name); - if (plugin.exists()) { - plugin.normalize(); - return plugin; - } - } - return null; -} - -// Finds the test nsIPluginTag -function get_test_plugintag(aName = "Test Plug-in") { - var name = aName || "Test Plug-in"; - var host = Cc["@mozilla.org/plugin/host;1"].getService(Ci.nsIPluginHost); - var tags = host.getPluginTags(); - - for (var i = 0; i < tags.length; i++) { - if (tags[i].name == name) { - return tags[i]; - } - } - return null; -} - -// Creates a fake ProfDS directory key, copied from do_get_profile -function do_get_profile_startup() { - let env = Cc["@mozilla.org/process/environment;1"].getService( - Ci.nsIEnvironment - ); - // the python harness sets this in the environment for us - let profd = env.get("XPCSHELL_TEST_PROFILE_DIR"); - let file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile); - file.initWithPath(profd); - - let dirSvc = Services.dirsvc; - let provider = { - getFile(prop, persistent) { - persistent.value = true; - if (prop == "ProfDS") { - return file.clone(); - } - throw Components.Exception("", Cr.NS_ERROR_FAILURE); - }, - QueryInterface: ChromeUtils.generateQI(["nsIDirectoryServiceProvider"]), - }; - dirSvc.QueryInterface(Ci.nsIDirectoryService).registerProvider(provider); - return file.clone(); -} - -function get_platform_specific_plugin_name(secondplugin = false) { - if (secondplugin) { - if (gIsWindows) { - return "npsecondtest.dll"; - } - if (gIsOSX) { - return "SecondTest.plugin"; - } - if (gIsLinux) { - return "libnpsecondtest.so"; - } - } else { - if (gIsWindows) { - return "nptest.dll"; - } - if (gIsOSX) { - return "Test.plugin"; - } - if (gIsLinux) { - return "libnptest.so"; - } - } - return null; -} - -function get_platform_specific_plugin_suffix() { - if (gIsWindows) { - return ".dll"; - } else if (gIsOSX) { - return ".plugin"; - } else if (gIsLinux) { - return ".so"; - } - return null; -} - -function get_test_plugin_no_symlink() { - let dirSvc = Services.dirsvc; - for (let dir of dirSvc.get("APluginsDL", Ci.nsISimpleEnumerator)) { - let plugin = dir.clone(); - plugin.append(get_platform_specific_plugin_name()); - if (plugin.exists()) { - return plugin; - } - } - return null; -} diff --git a/dom/plugins/test/unit/test_bug471245.js b/dom/plugins/test/unit/test_bug471245.js deleted file mode 100644 index 18ea4e89a640..000000000000 --- a/dom/plugins/test/unit/test_bug471245.js +++ /dev/null @@ -1,21 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -function run_test() { - allow_all_plugins(); - do_get_profile_startup(); - - var plugin = get_test_plugintag(); - Assert.ok(plugin == null); - - // Initialises a profile folder - do_get_profile(); - - plugin = get_test_plugintag(); - Assert.equal(false, plugin == null); - - // Clean up - Services.prefs.clearUserPref("plugin.importedState"); -} diff --git a/dom/plugins/test/unit/test_bug813245.js b/dom/plugins/test/unit/test_bug813245.js deleted file mode 100644 index 33b2d427afbf..000000000000 --- a/dom/plugins/test/unit/test_bug813245.js +++ /dev/null @@ -1,98 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -// Plugin registry uses different field delimeters on different platforms -var DELIM = mozinfo.os == "win" ? "|" : ":"; - -var gProfD = do_get_profile_startup(); - -var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm"); - -// Writes out some plugin registry to the profile -function write_registry(version, info) { - let runtime = Services.appinfo; - - var header = "Generated File. Do not edit.\n\n"; - header += "[HEADER]\n"; - header += "Version" + DELIM + version + DELIM + "$\n"; - header += "Arch" + DELIM + runtime.XPCOMABI + DELIM + "$\n"; - header += "\n"; - header += "[PLUGINS]\n"; - - var registry = gProfD.clone(); - registry.append("pluginreg.dat"); - var foStream = Cc["@mozilla.org/network/file-output-stream;1"].createInstance( - Ci.nsIFileOutputStream - ); - // write, create, truncate - foStream.init(registry, 0x02 | 0x08 | 0x20, 0o666, 0); - - var charset = "UTF-8"; // Can be any character encoding name that Mozilla supports - var os = Cc["@mozilla.org/intl/converter-output-stream;1"].createInstance( - Ci.nsIConverterOutputStream - ); - os.init(foStream, charset); - - os.writeString(header); - os.writeString(info); - os.close(); -} - -function run_test() { - allow_all_plugins(); - var plugin = get_test_plugintag(); - Assert.ok(plugin == null); - - var file = get_test_plugin(); - if (!file) { - do_throw("Plugin library not found"); - } - - // write plugin registry data - let registry = ""; - - if (gIsOSX) { - registry += file.leafName + DELIM + "$\n"; - registry += file.path + DELIM + "$\n"; - } else { - registry += file.path + DELIM + "$\n"; - registry += DELIM + "$\n"; - } - registry += "0.0.0.0" + DELIM + "$\n"; - registry += "16725225600" + DELIM + "0" + DELIM + "5" + DELIM + "$\n"; - registry += "Plug-in for testing purposes." + DELIM + "$\n"; - registry += "Test Plug-in" + DELIM + "$\n"; - registry += "999999999999999999999999999999999999999999999999|0|5|$\n"; - registry += - "0" + - DELIM + - "application/x-test" + - DELIM + - "Test mimetype" + - DELIM + - "tst" + - DELIM + - "$\n"; - - registry += "\n"; - registry += "[INVALID]\n"; - registry += "\n"; - write_registry("0.15", registry); - - // Initialise profile folder - do_get_profile(); - - plugin = get_test_plugintag(); - if (!plugin) { - do_throw("Plugin tag not found"); - } - - // The plugin registry should have been rejected. - // If not, the test plugin version would be 0.0.0.0 - Assert.equal(plugin.version, "1.0.0.0"); - - // Clean up - Services.prefs.clearUserPref("plugin.importedState"); -} diff --git a/dom/plugins/test/unit/test_bug854467.js b/dom/plugins/test/unit/test_bug854467.js deleted file mode 100644 index fc17c55ca1ec..000000000000 --- a/dom/plugins/test/unit/test_bug854467.js +++ /dev/null @@ -1,40 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -function check_state(aTag, aExpectedClicktoplay, aExpectedDisabled) { - Assert.equal(aTag.clicktoplay, aExpectedClicktoplay); - Assert.equal(aTag.disabled, aExpectedDisabled); -} - -function run_test() { - allow_all_plugins(); - let tag = get_test_plugintag(); - tag.enabledState = Ci.nsIPluginTag.STATE_ENABLED; - check_state(tag, false, false); - - /* test going to click-to-play from always enabled and back */ - tag.enabledState = Ci.nsIPluginTag.STATE_CLICKTOPLAY; - check_state(tag, true, false); - tag.enabledState = Ci.nsIPluginTag.STATE_ENABLED; - check_state(tag, false, false); - - /* test going to disabled from always enabled and back */ - tag.enabledState = Ci.nsIPluginTag.STATE_DISABLED; - check_state(tag, false, true); - tag.enabledState = Ci.nsIPluginTag.STATE_ENABLED; - check_state(tag, false, false); - - /* test going to click-to-play from disabled and back */ - tag.enabledState = Ci.nsIPluginTag.STATE_DISABLED; - check_state(tag, false, true); - tag.enabledState = Ci.nsIPluginTag.STATE_CLICKTOPLAY; - check_state(tag, true, false); - tag.enabledState = Ci.nsIPluginTag.STATE_DISABLED; - check_state(tag, false, true); - - /* put everything back to normal and check that that succeeded */ - tag.enabledState = Ci.nsIPluginTag.STATE_ENABLED; - check_state(tag, false, false); -} diff --git a/dom/plugins/test/unit/test_nice_plugin_name.js b/dom/plugins/test/unit/test_nice_plugin_name.js deleted file mode 100644 index 101d724c91b5..000000000000 --- a/dom/plugins/test/unit/test_nice_plugin_name.js +++ /dev/null @@ -1,91 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -const XULAPPINFO_CONTRACTID = "@mozilla.org/xre/app-info;1"; -const XULAPPINFO_CID = Components.ID("{c763b610-9d49-455a-bbd2-ede71682a1ac}"); - -var gAppInfo = null; - -function createAppInfo(ID, name, version, platformVersion = "1.0") { - let tmp = {}; - ChromeUtils.import("resource://testing-common/AppInfo.jsm", tmp); - tmp.updateAppInfo({ - ID, - name, - version, - platformVersion, - crashReporter: true, - }); - gAppInfo = tmp.getAppInfo(); -} - -var gPluginHost = null; - -function test_expected_permission_string(aPermString) { - gPluginHost.reloadPlugins(false); - let plugin = get_test_plugintag(); - Assert.equal(false, plugin == null); - Assert.equal( - gPluginHost.getPermissionStringForType("application/x-test"), - aPermString - ); -} - -function run_test() { - allow_all_plugins(); - Assert.ok(gIsWindows || gIsOSX || gIsLinux); - Assert.ok( - !(gIsWindows && gIsOSX) && - !(gIsWindows && gIsLinux) && - !(gIsOSX && gIsLinux) - ); - - createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9"); - gPluginHost = Cc["@mozilla.org/plugin/host;1"].getService(Ci.nsIPluginHost); - - let expectedDefaultPermissionString = null; - if (gIsWindows) { - expectedDefaultPermissionString = "plugin:nptest"; - } - if (gIsOSX) { - expectedDefaultPermissionString = "plugin:test"; - } - if (gIsLinux) { - expectedDefaultPermissionString = "plugin:libnptest"; - } - test_expected_permission_string(expectedDefaultPermissionString); - - let suffix = get_platform_specific_plugin_suffix(); - let pluginFile = get_test_plugin_no_symlink(); - let pluginDir = pluginFile.parent; - pluginFile.copyTo(null, "npblah235" + suffix); - let pluginCopy = pluginDir.clone(); - pluginCopy.append("npblah235" + suffix); - let tempDir = do_get_tempdir(); - pluginFile.moveTo(tempDir, null); - test_expected_permission_string("plugin:npblah"); - - pluginCopy.moveTo(null, "npasdf-3.2.2" + suffix); - test_expected_permission_string("plugin:npasdf"); - - pluginCopy.moveTo(null, "npasdf_##29387!{}{[][" + suffix); - test_expected_permission_string("plugin:npasdf"); - - pluginCopy.moveTo(null, "npqtplugin7" + suffix); - test_expected_permission_string("plugin:npqtplugin"); - - pluginCopy.moveTo(null, "npFoo3d" + suffix); - test_expected_permission_string("plugin:npfoo3d"); - - pluginCopy.moveTo(null, "NPSWF32_11_5_502_146" + suffix); - test_expected_permission_string("plugin:npswf"); - - pluginCopy.remove(true); - pluginFile.moveTo(pluginDir, null); - test_expected_permission_string(expectedDefaultPermissionString); - - // Clean up - Services.prefs.clearUserPref("plugin.importedState"); -} diff --git a/dom/plugins/test/unit/test_persist_in_prefs.js b/dom/plugins/test/unit/test_persist_in_prefs.js deleted file mode 100644 index ba1618a06505..000000000000 --- a/dom/plugins/test/unit/test_persist_in_prefs.js +++ /dev/null @@ -1,80 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -// Plugin registry uses different field delimeters on different platforms -var DELIM = mozinfo.os == "win" ? "|" : ":"; - -var gProfD = do_get_profile_startup(); - -function run_test() { - allow_all_plugins(); - - Assert.ok(gIsWindows || gIsOSX || gIsLinux); - - let file = get_test_plugin_no_symlink(); - if (!file) { - do_throw("Plugin library not found"); - } - - const pluginDir = file.parent; - const tempDir = do_get_tempdir(); - const suffix = get_platform_specific_plugin_suffix(); - const pluginName = file.leafName - .substring(0, file.leafName.length - suffix.length) - .toLowerCase(); - const pluginHost = Cc["@mozilla.org/plugin/host;1"].getService( - Ci.nsIPluginHost - ); - const statePref = "plugin.state." + pluginName; - - // Initialise profile folder - do_get_profile(); - - let plugin = get_test_plugintag(); - if (!plugin) { - do_throw("Plugin tag not found"); - } - - plugin.enabledState = Ci.nsIPluginTag.STATE_DISABLED; - - // prepare a copy of the plugin and backup the original - file.copyTo(null, "nptestcopy" + suffix); - let copy = pluginDir.clone(); - copy.append("nptestcopy" + suffix); - file.moveTo(tempDir, null); - - // test that the settings persist through a few variations of test-plugin names - let testNames = [ - pluginName + "2", - pluginName.toUpperCase() + "_11_5_42_2323", - pluginName + "-5.2.7", - ]; - testNames.forEach(function(leafName) { - dump("Checking " + leafName + ".\n"); - copy.moveTo(null, leafName + suffix); - pluginHost.reloadPlugins(false); - plugin = get_test_plugintag(); - Assert.equal(false, plugin == null); - Assert.ok(plugin.disabled); - Assert.ok(!plugin.clicktoplay); - }); - - // check that the state persists even if the plugin is not always present - copy.moveTo(tempDir, null); - pluginHost.reloadPlugins(false); - copy.moveTo(pluginDir, null); - pluginHost.reloadPlugins(false); - - plugin = get_test_plugintag(); - Assert.equal(false, plugin == null); - Assert.ok(plugin.disabled); - Assert.ok(!plugin.clicktoplay); - - // clean up - Services.prefs.clearUserPref(statePref); - Services.prefs.clearUserPref("plugin.importedState"); - copy.remove(true); - file.moveTo(pluginDir, null); -} diff --git a/dom/plugins/test/unit/test_plugin_default_state.js b/dom/plugins/test/unit/test_plugin_default_state.js deleted file mode 100644 index 795d4153cad6..000000000000 --- a/dom/plugins/test/unit/test_plugin_default_state.js +++ /dev/null @@ -1,29 +0,0 @@ -function run_test() { - allow_all_plugins(); - let pluginDefaultState = Services.prefs.getIntPref("plugin.default.state"); - // if this fails, we just have to switch around the values we're testing - Assert.notEqual(pluginDefaultState, Ci.nsIPluginTag.STATE_DISABLED); - let nonDefaultState = - pluginDefaultState != Ci.nsIPluginTag.STATE_ENABLED - ? Ci.nsIPluginTag.STATE_ENABLED - : Ci.nsIPluginTag.STATE_CLICKTOPLAY; - let testPlugin = get_test_plugintag(); - // the test plugin should have the default enabledState - Assert.equal(testPlugin.enabledState, pluginDefaultState); - - let secondTestPlugin = get_test_plugintag("Second Test Plug-in"); - // set an enabledState for the second test plugin - secondTestPlugin.enabledState = Ci.nsIPluginTag.STATE_DISABLED; - // change what the default enabledState is - Services.prefs.setIntPref("plugin.default.state", nonDefaultState); - // the test plugin should follow the default (it has no individual pref yet) - Assert.equal(testPlugin.enabledState, nonDefaultState); - // the second test plugin should retain its preferred state - Assert.equal(secondTestPlugin.enabledState, Ci.nsIPluginTag.STATE_DISABLED); - - // clean up - testPlugin.enabledState = pluginDefaultState; - secondTestPlugin.enabledState = pluginDefaultState; - Services.prefs.clearUserPref("plugin.default.state"); - Services.prefs.clearUserPref("plugin.importedState"); -} diff --git a/dom/plugins/test/unit/xpcshell.ini b/dom/plugins/test/unit/xpcshell.ini deleted file mode 100644 index 23d53714ed71..000000000000 --- a/dom/plugins/test/unit/xpcshell.ini +++ /dev/null @@ -1,22 +0,0 @@ -[DEFAULT] -skip-if = toolkit == 'android' -head = head_plugins.js -tags = addons -firefox-appdir = browser - -[test_bug471245.js] -# Bug 676953: test fails consistently on Android -fail-if = os == "android" -[test_bug813245.js] -# Bug 676953: test fails consistently on Android -fail-if = os == "android" -[test_nice_plugin_name.js] -# Bug 676953: test fails consistently on Android -fail-if = os == "android" -[test_persist_in_prefs.js] -skip-if = appname == "thunderbird" -reason = plugins are disabled by default in Thunderbird -[test_bug854467.js] -[test_plugin_default_state.js] -skip-if = appname == "thunderbird" || (processor == 'aarch64' && os == 'win') -reason = plugins are disabled by default in Thunderbird and Windows10-aarch64