From 7bb450e8c7b90fb7f26d0e5bf93a6d33edd78432 Mon Sep 17 00:00:00 2001 From: "Carsten \"Tomcat\" Book" Date: Fri, 21 Feb 2014 14:32:28 +0100 Subject: [PATCH] Backed out changeset f2cade11e3c0 (bug 926830) for mochitest memory leak on a CLOSED TREE --- widget/tests/chrome.ini | 4 +-- widget/tests/mochitest.ini | 3 --- widget/tests/test_plugin_input_event.html | 10 +++++-- .../tests/test_plugin_scroll_consistency.html | 10 +++++-- .../test_plugin_scroll_invalidation.html | 10 +++++-- widget/tests/utils.js | 27 ------------------- 6 files changed, 25 insertions(+), 39 deletions(-) delete mode 100644 widget/tests/utils.js diff --git a/widget/tests/chrome.ini b/widget/tests/chrome.ini index 05fbae0e4d8a..e2df32eff9ee 100644 --- a/widget/tests/chrome.ini +++ b/widget/tests/chrome.ini @@ -1,7 +1,5 @@ [DEFAULT] -support-files = - empty_window.xul - utils.js +support-files = empty_window.xul [test_bug343416.xul] [test_bug429954.xul] diff --git a/widget/tests/mochitest.ini b/widget/tests/mochitest.ini index 64492de606cc..c78c438f34da 100644 --- a/widget/tests/mochitest.ini +++ b/widget/tests/mochitest.ini @@ -1,6 +1,3 @@ -[DEFAULT] -support-files = utils.js - [test_assign_event_data.html] skip-if = toolkit == "cocoa" # Bug 933303 [test_bug565392.html] diff --git a/widget/tests/test_plugin_input_event.html b/widget/tests/test_plugin_input_event.html index 9ab61301f870..dd0a53296ef6 100644 --- a/widget/tests/test_plugin_input_event.html +++ b/widget/tests/test_plugin_input_event.html @@ -8,13 +8,19 @@ src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"> -

diff --git a/widget/tests/test_plugin_scroll_consistency.html b/widget/tests/test_plugin_scroll_consistency.html index 76d97f4ef979..6feab9e53421 100644 --- a/widget/tests/test_plugin_scroll_consistency.html +++ b/widget/tests/test_plugin_scroll_consistency.html @@ -3,13 +3,19 @@ Test for plugin child widgets not being messed up by scrolling -

diff --git a/widget/tests/test_plugin_scroll_invalidation.html b/widget/tests/test_plugin_scroll_invalidation.html index 75737fc2ad01..d99ca69522e9 100644 --- a/widget/tests/test_plugin_scroll_invalidation.html +++ b/widget/tests/test_plugin_scroll_invalidation.html @@ -3,12 +3,18 @@ Test for plugin child widgets not being invalidated by scrolling -

diff --git a/widget/tests/utils.js b/widget/tests/utils.js deleted file mode 100644 index 3796c7d2b607..000000000000 --- a/widget/tests/utils.js +++ /dev/null @@ -1,27 +0,0 @@ - -function getTestPlugin(pluginName) { - var ph = SpecialPowers.Cc["@mozilla.org/plugin/host;1"] - .getService(SpecialPowers.Ci.nsIPluginHost); - var tags = ph.getPluginTags(); - var name = pluginName || "Test Plug-in"; - for (var tag of tags) { - if (tag.name == name) { - return tag; - } - } - - ok(false, "Could not find plugin tag with plugin name '" + name + "'"); - return null; -} - -// call this to set the test plugin(s) initially expected enabled state. -// it will automatically be reset to it's previous value after the test -// ends -function setTestPluginEnabledState(newEnabledState, pluginName) { - var plugin = getTestPlugin(pluginName); - var oldEnabledState = plugin.enabledState; - plugin.enabledState = newEnabledState; - SimpleTest.registerCleanupFunction(function() { - getTestPlugin(pluginName).enabledState = oldEnabledState; - }); -}