mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 990150 - Give AccessFu content tests debug output. r=yzen
This commit is contained in:
parent
1ed411f765
commit
4f1ba6fe4f
@ -128,6 +128,10 @@ function adjustRange(aMessage) {
|
||||
addMessageListener(
|
||||
'AccessFu:Start',
|
||||
function(m) {
|
||||
if (m.json.logLevel) {
|
||||
Logger.logLevel = Logger[m.json.logLevel];
|
||||
}
|
||||
|
||||
Logger.debug('AccessFu:Start');
|
||||
if (m.json.buildApp)
|
||||
Utils.MozBuildApp = m.json.buildApp;
|
||||
|
@ -164,6 +164,7 @@ AccessFuContentTest.prototype = {
|
||||
currentPair: null,
|
||||
|
||||
start: function(aFinishedCallback) {
|
||||
Logger.logLevel = Logger.DEBUG;
|
||||
this.finishedCallback = aFinishedCallback;
|
||||
var self = this;
|
||||
|
||||
@ -194,6 +195,16 @@ AccessFuContentTest.prototype = {
|
||||
});
|
||||
},
|
||||
|
||||
finish: function() {
|
||||
Logger.logLevel = Logger.INFO;
|
||||
for (var mm of this.mms) {
|
||||
mm.sendAsyncMessage('AccessFu:Stop');
|
||||
}
|
||||
if (this.finishedCallback) {
|
||||
this.finishedCallback();
|
||||
}
|
||||
},
|
||||
|
||||
setupMessageManager: function (aMessageManager, aCallback) {
|
||||
function contentScript() {
|
||||
addMessageListener('AccessFuTest:Focus', function (aMessage) {
|
||||
@ -213,7 +224,9 @@ AccessFuContentTest.prototype = {
|
||||
aMessageManager.addMessageListener('AccessFu:Ready', function () {
|
||||
aMessageManager.addMessageListener('AccessFu:ContentStarted', aCallback);
|
||||
aMessageManager.sendAsyncMessage('AccessFu:Start',
|
||||
{ buildApp: 'browser', androidSdkVersion: Utils.AndroidSdkVersion});
|
||||
{ buildApp: 'browser',
|
||||
androidSdkVersion: Utils.AndroidSdkVersion,
|
||||
logLevel: 'DEBUG' });
|
||||
});
|
||||
|
||||
aMessageManager.loadFrameScript(
|
||||
@ -236,11 +249,8 @@ AccessFuContentTest.prototype = {
|
||||
if (!this.currentPair[1]) {
|
||||
this.pump();
|
||||
}
|
||||
} else if (this.finishedCallback) {
|
||||
for (var mm of this.mms) {
|
||||
mm.sendAsyncMessage('AccessFu:Stop');
|
||||
}
|
||||
this.finishedCallback();
|
||||
} else {
|
||||
this.finish();
|
||||
}
|
||||
},
|
||||
|
||||
@ -301,6 +311,10 @@ AccessFuContentTest.prototype = {
|
||||
},
|
||||
|
||||
extractUtterance: function(aData) {
|
||||
if (!aData) {
|
||||
return null;
|
||||
}
|
||||
|
||||
for (var output of aData) {
|
||||
if (output && output.type === 'Speech') {
|
||||
for (var action of output.details.actions) {
|
||||
|
Loading…
Reference in New Issue
Block a user