Bug 1370857 - Remove Marionette.import_script API; r=automatedtester
authorAndreas Tolfsen <ato@mozilla.com>
Wed, 07 Jun 2017 13:13:50 +0100
changeset 411167 6b37ea6c7ad1c016c3fdb7ff1d1484c5be5bc938
parent 411166 0dac00039fda22f1570a0e439b34703b6f5e5fa6
child 411168 00c3f75ed9a00df54df729135cbd12651cd736b8
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersautomatedtester
bugs1370857
milestone55.0a1
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.import_script API; r=automatedtester Removes the Marionette.import_script API as it is not used by any consumers of the client, including the Firefox UI tests. MozReview-Commit-ID: 3xceYXZZVR0
testing/marionette/client/marionette_driver/marionette.py
--- a/testing/marionette/client/marionette_driver/marionette.py
+++ b/testing/marionette/client/marionette_driver/marionette.py
@@ -1873,46 +1873,16 @@ class Marionette(object):
             marionette.log("I AM ERROR", "ERROR")
             logs = marionette.get_logs()
             assert logs[0][1] == "I AM INFO"
             assert logs[1][1] == "I AM ERROR"
         """
         return self._send_message("getLogs",
                                   key="value" if self.protocol == 1 else None)
 
-    def import_script(self, js_file):
-        """Imports a script into the scope of the execute_script and
-        execute_async_script calls.
-
-        This is particularly useful if you wish to import your own
-        libraries.
-
-        :param js_file: Filename of JavaScript file to import.
-
-        For example, Say you have a script, importfunc.js, that contains:
-
-        ::
-
-            let testFunc = function() { return "i'm a test function!";};
-
-        Assuming this file is in the same directory as the test, you
-        could do something like:
-
-        ::
-
-            js = os.path.abspath(os.path.join(__file__, os.path.pardir, "importfunc.js"))
-            marionette.import_script(js)
-            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 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",
             "expiry".
 
         Usage example: