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 : b12fd8ce04e7da739a8a5ec0e7b30b6734c58e4a
This commit is contained in:
David Burns 2017-05-30 16:28:36 +01:00
Родитель dd5ef53ea6
Коммит 5fe3dc363a
4 изменённых файлов: 4 добавлений и 28 удалений

Просмотреть файл

@ -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):

Просмотреть файл

@ -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.
*

Просмотреть файл

@ -3,7 +3,6 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import imp
import os
import re
import sys
import time
@ -20,7 +19,6 @@ from unittest.case import (
from marionette_driver.errors import (
MarionetteException,
ScriptTimeoutException,
TimeoutException,
)
from mozlog import get_default_logger
@ -336,9 +334,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 +347,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):

Просмотреть файл

@ -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
*/