Bug 1368674 - Remove setTestName functionality from Marionette r=whimboo

setTestName was used for logging which test was being run for the
JS Tests used in B2G.

MozReview-Commit-ID: FNF4Sm7vAYM

--HG--
extra : rebase_source : 6ad739d2ff9bf3d6bafaed0450c8794a257657e7
This commit is contained in:
David Burns 2017-05-30 16:28:36 +01:00
parent 69ac306da8
commit 06b3c56c83
4 changed files with 4 additions and 26 deletions

View File

@ -1336,7 +1336,6 @@ class Marionette(object):
@test_name.setter
def test_name(self, test_name):
self._send_message("setTestName", {"value": test_name})
self._test_name = test_name
def delete_session(self, send_request=True, reset_session_id=False):

View File

@ -2348,15 +2348,6 @@ GeckoDriver.prototype.sendKeysToElement = function* (cmd, resp) {
}
};
/** Sets the test name. The test name is used for logging purposes. */
GeckoDriver.prototype.setTestName = function*(cmd, resp) {
assert.window(this.getCurrentWindow());
let val = cmd.parameters.value;
this.testName = val;
yield this.listener.setTestName({value: val});
};
/**
* Clear the text of an element.
*

View File

@ -336,9 +336,8 @@ class MarionetteTestCase(CommonTestCase):
def setUp(self):
super(MarionetteTestCase, self).setUp()
self.marionette.test_name = self.test_name
self.marionette.execute_script("log('TEST-START: {0}:{1}')"
.format(self.filepath.replace('\\', '\\\\'),
self.methodName),
self.marionette.execute_script("log('TEST-START: {0}')"
.format(self.test_name),
sandbox="simpletest")
def tearDown(self):
@ -350,9 +349,8 @@ class MarionetteTestCase(CommonTestCase):
if not self.marionette.crashed:
try:
self.marionette.clear_imported_scripts()
self.marionette.execute_script("log('TEST-END: {0}:{1}')"
.format(self.filepath.replace('\\', '\\\\'),
self.methodName),
self.marionette.execute_script("log('TEST-END: {0}')"
.format(self.test_name),
sandbox="simpletest")
self.marionette.test_name = None
except (MarionetteException, IOError):

View File

@ -532,7 +532,6 @@ function startListeners() {
addMessageListenerId("Marionette:deleteSession", deleteSession);
addMessageListenerId("Marionette:sleepSession", sleepSession);
addMessageListenerId("Marionette:getAppCacheStatus", getAppCacheStatus);
addMessageListenerId("Marionette:setTestName", setTestName);
addMessageListenerId("Marionette:takeScreenshot", takeScreenshotFn);
addMessageListenerId("Marionette:addCookie", addCookieFn);
addMessageListenerId("Marionette:getCookies", getCookiesFn);
@ -607,7 +606,6 @@ function deleteSession(msg) {
removeMessageListenerId("Marionette:deleteSession", deleteSession);
removeMessageListenerId("Marionette:sleepSession", sleepSession);
removeMessageListenerId("Marionette:getAppCacheStatus", getAppCacheStatus);
removeMessageListenerId("Marionette:setTestName", setTestName);
removeMessageListenerId("Marionette:takeScreenshot", takeScreenshotFn);
removeMessageListenerId("Marionette:addCookie", addCookieFn);
removeMessageListenerId("Marionette:getCookies", getCookiesFn);
@ -759,14 +757,6 @@ function* executeInSandbox(script, args, timeout, opts) {
return evaluate.toJSON(res, seenEls);
}
/**
* Sets the test name, used in logging messages.
*/
function setTestName(msg) {
marionetteTestName = msg.json.value;
sendOk(msg.json.command_id);
}
/**
* This function creates a touch event given a touch type and a touch
*/