mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
Bug 976831: Remove unused getStatus method from Marionette; r=mdas
This commit is contained in:
parent
d532d3e956
commit
c51399006c
@ -585,7 +585,7 @@ class Marionette(object):
|
||||
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}
|
||||
@ -702,9 +702,6 @@ class Marionette(object):
|
||||
'''
|
||||
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.
|
||||
|
||||
|
@ -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)
|
@ -15,7 +15,6 @@ skip = false
|
||||
|
||||
[test_expectedfail.py]
|
||||
expected = fail
|
||||
[test_getstatus.py]
|
||||
[test_import_script.py]
|
||||
[test_import_script_reuse_window.py]
|
||||
b2g = false
|
||||
|
@ -588,33 +588,6 @@ MarionetteServerConnection.prototype = {
|
||||
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.
|
||||
*
|
||||
@ -2433,7 +2406,6 @@ MarionetteServerConnection.prototype.requestTypes = {
|
||||
"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,
|
||||
|
Loading…
Reference in New Issue
Block a user