Bug 976831: Remove unused getStatus method from Marionette; r=mdas
authorDavid Burns <dburns@mozilla.com>
Wed, 26 Feb 2014 17:06:24 +0000
changeset 171043 b76b7480537253c860b6289d5c8a9ef1d1c0e1dd
parent 171042 b2719a9dbf96cc3752b346dc0076fb32d84c5b63
child 171044 e0869c89abac3ea05d03674f27e6fcc27b387722
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
reviewersmdas
bugs976831
milestone30.0a1
Bug 976831: Remove unused getStatus method from Marionette; r=mdas
testing/marionette/client/marionette/marionette.py
testing/marionette/client/marionette/tests/unit/test_getstatus.py
testing/marionette/client/marionette/tests/unit/unit-tests.ini
testing/marionette/marionette-server.js
--- a/testing/marionette/client/marionette/marionette.py
+++ b/testing/marionette/client/marionette/marionette.py
@@ -580,17 +580,17 @@ class Marionette(object):
                     time.sleep(5)
                     return True
             except socket.error:
                 pass
             time.sleep(1)
         return False
 
     def _send_message(self, command, response_key="ok", **kwargs):
-        if not self.session and command not in ("newSession", "getStatus"):
+        if not self.session and command != "newSession":
             raise MarionetteException("Please start a session")
 
         message = {"name": command}
         if self.session:
             message["sessionId"] = self.session
         if kwargs:
             message["parameters"] = kwargs
 
@@ -697,19 +697,16 @@ class Marionette(object):
     def absolute_url(self, relative_url):
         '''
         Returns an absolute url for files served from Marionette's www directory.
 
         :param relative_url: The url of a static file, relative to Marionette's www directory.
         '''
         return "%s%s" % (self.baseurl, relative_url)
 
-    def status(self):
-        return self._send_message('getStatus', 'value')
-
     def start_session(self, desired_capabilities=None):
         """Create a new Marionette session.
 
         This method must be called before performing any other action.
 
         :params desired_capabilities: An optional dict of desired
             capabilities.  This is currently ignored.
 
deleted file mode 100644
--- a/testing/marionette/client/marionette/tests/unit/test_getstatus.py
+++ /dev/null
@@ -1,19 +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/.
-
-from marionette_test import MarionetteTestCase
-
-class TestGetStatus(MarionetteTestCase):
-    def test_getStatus(self):
-        status = self.marionette.status()
-        self.assertTrue("os" in status)
-        status_os = status['os']
-        self.assertTrue("version" in status_os)
-        self.assertTrue("name" in status_os)
-        self.assertTrue("arch" in status_os)
-        self.assertTrue("build" in status)
-        status_build = status['build']
-        self.assertTrue("revision" in status_build)
-        self.assertTrue("time" in status_build)
-        self.assertTrue("version" in status_build)
--- a/testing/marionette/client/marionette/tests/unit/unit-tests.ini
+++ b/testing/marionette/client/marionette/tests/unit/unit-tests.ini
@@ -10,17 +10,16 @@ b2g = true
 
 ; true if the test should be skipped
 skip = false
 
 [test_session.py]
 
 [test_expectedfail.py]
 expected = fail
-[test_getstatus.py]
 [test_import_script.py]
 [test_import_script_reuse_window.py]
 b2g = false
 [test_click.py]
 [test_click_chrome.py]
 b2g = false
 [test_selected.py]
 [test_selected_chrome.py]
--- a/testing/marionette/marionette-server.js
+++ b/testing/marionette/marionette-server.js
@@ -583,43 +583,16 @@ MarionetteServerConnection.prototype = {
     // compatibility.  They only check for the presence of this
     // property and should so not be in caps if not on a B2G device.
     if (isB2G)
       caps.b2g = true;
 
     this.sendResponse(caps, this.command_id);
   },
 
-  getStatus: function MDA_getStatus(){
-    this.command_id = this.getCommandId();
-
-    let arch;
-    try {
-      arch = (Services.appinfo.XPCOMABI || 'unknown').split('-')[0]
-    }
-    catch (ignored) {
-      arch = 'unknown'
-    };
-
-    let value = {
-          'os': {
-            'arch': arch,
-            'name': Services.appinfo.OS,
-            'version': 'unknown'
-          },
-          'build': {
-            'revision': 'unknown',
-            'time': Services.appinfo.platformBuildID,
-            'version': Services.appinfo.version
-          }
-    };
-
-    this.sendResponse(value, this.command_id);
-  },
-
   /**
    * Log message. Accepts user defined log-level.
    *
    * @param object aRequest
    *        'value' member holds log message
    *        'level' member hold log level
    */
   log: function MDA_log(aRequest) {
@@ -2428,17 +2401,16 @@ MarionetteServerConnection.prototype = {
   }
 };
 
 MarionetteServerConnection.prototype.requestTypes = {
   "getMarionetteID": MarionetteServerConnection.prototype.getMarionetteID,
   "sayHello": MarionetteServerConnection.prototype.sayHello,
   "newSession": MarionetteServerConnection.prototype.newSession,
   "getSessionCapabilities": MarionetteServerConnection.prototype.getSessionCapabilities,
-  "getStatus": MarionetteServerConnection.prototype.getStatus,
   "log": MarionetteServerConnection.prototype.log,
   "getLogs": MarionetteServerConnection.prototype.getLogs,
   "setContext": MarionetteServerConnection.prototype.setContext,
   "executeScript": MarionetteServerConnection.prototype.execute,
   "setScriptTimeout": MarionetteServerConnection.prototype.setScriptTimeout,
   "timeouts": MarionetteServerConnection.prototype.timeouts,
   "singleTap": MarionetteServerConnection.prototype.singleTap,
   "actionChain": MarionetteServerConnection.prototype.actionChain,