Bug 1203166 - ensuring that B2G and a11y flags are passed when listener is registring. r=ato

This commit is contained in:
Yura Zenevich 2015-09-09 11:53:08 -04:00
parent cbe225b232
commit bc9a71944a
2 changed files with 10 additions and 8 deletions

View File

@ -447,20 +447,19 @@ GeckoDriver.prototype.registerBrowser = function(id, be) {
this.curBrowser.elementManager.seenItems[reg.id] =
Cu.getWeakReference(listenerWindow);
let flags = {
B2G: (this.appName == "B2G"),
raisesAccessibilityExceptions:
this.sessionCapabilities.raisesAccessibilityExceptions
};
if (nullPrevious && (this.curBrowser.curFrameId !== null)) {
this.sendAsync("newSession",
{
B2G: (this.appName == "B2G"),
raisesAccessibilityExceptions:
this.sessionCapabilities.raisesAccessibilityExceptions
},
this.newSessionCommandId);
this.sendAsync("newSession", flags, this.newSessionCommandId);
if (this.curBrowser.isNewSession) {
this.newSessionCommandId = null;
}
}
return [reg, mainContent];
return [reg, mainContent, flags];
};
GeckoDriver.prototype.registerPromise = function() {

View File

@ -101,6 +101,9 @@ function registerSelf() {
if (register[0]) {
let {id, remotenessChange} = register[0][0];
let {B2G, raisesAccessibilityExceptions} = register[0][2];
isB2G = B2G;
accessibility.strict = raisesAccessibilityExceptions;
listenerId = id;
if (typeof id != "undefined") {
// check if we're the main process