Bug 1221187: testing/marionette: Adjust log levels to match new defaults; r?automatedtester
--- a/testing/marionette/driver.js
+++ b/testing/marionette/driver.js
@@ -661,24 +661,24 @@ GeckoDriver.prototype.setSessionCapabili
throw new SessionNotCreatedError(
`Not all requiredCapabilities could be met: ${JSON.stringify(errors)}`);
};
// clone, overwrite, and set
let caps = copy(this.sessionCapabilities);
caps = copy(newCaps, caps);
+ logger.config("Changing capabilities: " + JSON.stringify(caps));
this.sessionCapabilities = caps;
};
-GeckoDriver.prototype.setUpProxy = function (proxy) {
- logger.debug("Setup Proxy has been entered. Will attempt to setup the following proxy");
- logger.debug("Proxy object contains " + JSON.stringify(proxy));
+GeckoDriver.prototype.setUpProxy = function(proxy) {
+ logger.debug("User-provided proxy settings: " + JSON.stringify(proxy));
+
if (typeof proxy == "object" && proxy.hasOwnProperty("proxyType")) {
-
switch (proxy.proxyType.toUpperCase()) {
case "MANUAL":
Services.prefs.setIntPref("network.proxy.type", 1);
if (proxy.httpProxy && proxy.httpProxyPort){
Services.prefs.setCharPref("network.proxy.http", proxy.httpProxy);
Services.prefs.setIntPref("network.proxy.http_port", proxy.httpProxyPort);
}
if (proxy.sslProxy && proxy.sslProxyPort){
@@ -707,17 +707,17 @@ GeckoDriver.prototype.setUpProxy = funct
case "SYSTEM":
Services.prefs.setIntPref("network.proxy.type", 5);
break;
case "NOPROXY":
default:
Services.prefs.setIntPref("network.proxy.type", 0);
}
} else {
- throw new InvalidArgumentError("the value of 'proxy' should be an object");
+ throw new InvalidArgumentError("Value of 'proxy' should be an object");
}
};
/**
* Log message. Accepts user defined log-level.
*
* @param {string} value
* Log message.
--- a/testing/marionette/listener.js
+++ b/testing/marionette/listener.js
@@ -80,17 +80,17 @@ var EVENT_INTERVAL = 30; // milliseconds
// last touch for each fingerId
var multiLast = {};
var chrome = proxy.toChrome(sendSyncMessage.bind(this));
var cookies = new Cookies(() => curContainer.frame.document, chrome);
Cu.import("resource://gre/modules/Log.jsm");
var logger = Log.repository.getLogger("Marionette");
-logger.info("loaded listener.js");
+logger.debug("loaded listener.js");
var modalHandler = function() {
// This gets called on the system app only since it receives the mozbrowserprompt event
sendSyncMessage("Marionette:switchedToFrame", { frameValue: null, storePrevious: true });
let isLocal = sendSyncMessage("MarionetteFrame:handleModal", {})[0].value;
if (isLocal) {
previousContainer = curContainer;
}
curContainer = { frame: content, shadowRoot: null };
@@ -1902,17 +1902,16 @@ function getAppCacheStatus(msg) {
msg.json.command_id);
}
// emulator callbacks
var _emu_cb_id = 0;
var _emu_cbs = {};
function runEmulatorCmd(cmd, callback) {
- logger.info("listener runEmulatorCmd cmd=" + cmd);
if (callback) {
_emu_cbs[_emu_cb_id] = callback;
}
sendAsyncMessage("Marionette:runEmulatorCmd",
{command: cmd, id: _emu_cb_id});
_emu_cb_id += 1;
}