Bug 1371658 - Remove CommonTestCase.setup_SpecialPowers_observer; r?whimboo draft
authorAndreas Tolfsen <ato@mozilla.com>
Fri, 09 Jun 2017 15:08:07 +0100
changeset 591724 1e3158a783cbd968640c4c367353a6ce2616f6b8
parent 591723 b996f14177a63f5f27d5222e8f1f86e9155e98da
child 632599 2ee6031af3aee0cd7be79f6af6feee612bdc5e7e
push id63147
push userbmo:ato@mozilla.com
push dateFri, 09 Jun 2017 14:09:19 +0000
reviewerswhimboo
bugs1371658
milestone55.0a1
Bug 1371658 - Remove CommonTestCase.setup_SpecialPowers_observer; r?whimboo SpecialPowers has been removed from Marionette, and this method does not appear to be used anywhere in mozilla-central. MozReview-Commit-ID: 3hkPVNJw0iA
testing/marionette/harness/marionette_harness/marionette_test/testcases.py
--- a/testing/marionette/harness/marionette_harness/marionette_test/testcases.py
+++ b/testing/marionette/harness/marionette_harness/marionette_test/testcases.py
@@ -264,33 +264,16 @@ class CommonTestCase(unittest.TestCase):
                     self.loglines = [['Error getting log: {}'.format(inst)]]
                 try:
                     self.marionette.delete_session()
                 except IOError:
                     # Gecko has crashed?
                     pass
         self.marionette = None
 
-    def setup_SpecialPowers_observer(self):
-        self.marionette.set_context("chrome")
-        self.marionette.execute_script("""
-let SECURITY_PREF = "security.turn_off_all_security_so_that_viruses_can_take_over_this_computer";
-Components.utils.import("resource://gre/modules/Preferences.jsm");
-Preferences.set(SECURITY_PREF, true);
-
-if (!testUtils.hasOwnProperty("specialPowersObserver")) {
-  let loader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"]
-    .getService(Components.interfaces.mozIJSSubScriptLoader);
-  loader.loadSubScript("chrome://specialpowers/content/SpecialPowersObserver.jsm",
-    testUtils);
-  testUtils.specialPowersObserver = new testUtils.SpecialPowersObserver();
-  testUtils.specialPowersObserver.init();
-}
-""")
-
 
 class MarionetteTestCase(CommonTestCase):
 
     match_re = re.compile(r"test_(.*)\.py$")
 
     def __init__(self, marionette_weakref, fixtures, methodName='runTest',
                  filepath='', **kwargs):
         self.filepath = filepath