Bug 1370857 - Remove Marionette.clear_imported_scripts API; r=automatedtester
authorAndreas Tolfsen <ato@mozilla.com>
Wed, 07 Jun 2017 13:12:46 +0100
changeset 413524 0dac00039fda22f1570a0e439b34703b6f5e5fa6
parent 413523 a494916f461a29dac8099841efa3eb6024d99796
child 413525 6b37ea6c7ad1c016c3fdb7ff1d1484c5be5bc938
push id1490
push usermtabara@mozilla.com
push dateMon, 31 Jul 2017 14:08:16 +0000
treeherdermozilla-release@70e32e6bf15e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1370857, 1368648
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1370857 - Remove Marionette.clear_imported_scripts API; r=automatedtester The import script functionality was removed in https://bugzilla.mozilla.org/show_bug.cgi?id=1368648, but the Marionette.clear_imported_script API was not removed from the client. We are currently making calls after every test to the clearImportedScripts command in the server, but we are apparently ignoring the ‘unknown command’ error that is being returned. MozReview-Commit-ID: KVjh2IfhuUY
--- a/testing/marionette/client/marionette_driver/marionette.py
+++ b/testing/marionette/client/marionette_driver/marionette.py
@@ -1903,24 +1903,16 @@ class Marionette(object):
             assert "i'm a test function!" == self.marionette.execute_script("return testFunc();")
         js = ""
         with open(js_file, "r") as f:
             js = f.read()
         body = {"script": js}
         self._send_message("importScript", body)
-    def clear_imported_scripts(self):
-        """Clears all imported scripts in this context, ie: calling
-        clear_imported_scripts in chrome context will clear only scripts
-        you imported in chrome, and will leave the scripts you imported
-        in content context.
-        """
-        self._send_message("clearImportedScripts")
     def add_cookie(self, cookie):
         """Adds a cookie to your current session.
         :param cookie: A dictionary object, with required keys - "name"
             and "value"; optional keys - "path", "domain", "secure",
         Usage example:
--- a/testing/marionette/harness/marionette_harness/marionette_test/testcases.py
+++ b/testing/marionette/harness/marionette_harness/marionette_test/testcases.py
@@ -341,17 +341,16 @@ class MarionetteTestCase(CommonTestCase)
     def tearDown(self):
         # In the case no session is active (eg. the application was quit), start
         # a new session for clean-up steps.
         if not self.marionette.session:
         if not self.marionette.crashed:
-                self.marionette.clear_imported_scripts()
                 self.marionette.execute_script("log('TEST-END: {0}')"
                 self.marionette.test_name = None
             except (MarionetteException, IOError):
                 # We have tried to log the test end when there is no listener
                 # object that we can access