Bug 1053247 - Fix content integration tests. r=yzen

This commit is contained in:
Eitan Isaacson 2014-08-14 09:24:08 -04:00
Родитель 2fd0a320bd
Коммит 4c18079e6c
2 изменённых файлов: 21 добавлений и 12 удалений

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

@ -255,7 +255,7 @@ AccessFuContentTest.prototype = {
this.currentPair = this.queue.shift();
if (this.currentPair) {
if (this.currentPair[0] instanceof Function) {
if (typeof this.currentPair[0] === 'function') {
this.currentPair[0](this.mms[0]);
} else if (this.currentPair[0]) {
this.mms[0].sendAsyncMessage(this.currentPair[0].name,
@ -290,7 +290,11 @@ AccessFuContentTest.prototype = {
if (expected.speak) {
var checkFunc = SimpleTest[expected.speak_checkFunc] || isDeeply;
checkFunc.apply(SimpleTest, [speech, expected.speak,
'"' + JSON.stringify(speech) + '" spoken']);
'spoken: ' + JSON.stringify(speech) +
' expected: ' + JSON.stringify(expected.speak) +
' after: ' + (typeof this.currentPair[0] === 'function' ?
this.currentPair[0].toString() :
JSON.stringify(this.currentPair[0]))]);
}
if (expected.android) {

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

@ -136,8 +136,8 @@
speak: ['wow', {'string': 'headingLevel', 'args': [1]}, 'such app']
}],
[ContentMessages.focusSelector('button#home', false), {
speak: ['Home button']
}]
speak: ['Home', {'string': 'pushbutton'}]
}],
// Blur button and reset cursor
[ContentMessages.focusSelector('button#home', true), null],
@ -152,13 +152,13 @@
speak: ['Phone status bar', 'Traversal Rule test document']
}],
[doc.defaultView.showAlert, {
speak: ['This is an alert! heading level 1 dialog']
speak: ['This is an alert!',
{'string': 'headingLevel', 'args': [1]},
{'string': 'dialog'}]
}],
[function() {
doc.defaultView.hideAlert()
}, {
speak: ['wow', {'string': 'headingLevel', 'args': [1]}, 'such app']
[doc.defaultView.hideAlert, {
speak: ["wow", {"string": "headingLevel","args": [1]}, "such app"],
}],
[ContentMessages.clearCursor, 'AccessFu:CursorCleared'],
@ -171,12 +171,15 @@
speak: ['wow', {'string': 'headingLevel', 'args': [1]}, 'such app']
}],
[doc.defaultView.showAlert, {
speak: ['This is an alert! heading level 1 dialog']
speak: ['This is an alert!',
{'string': 'headingLevel', 'args': [1]},
{'string': 'dialog'}]
}],
// XXX: Place cursor back where it was.
[doc.defaultView.hideAlert, {
speak: ['many option not checked check button such app']
speak: ['wow', {'string': 'headingLevel', 'args': [1]}, 'such app'],
speak_checkFunc: 'todo_is'
}],
[ContentMessages.clearCursor, 'AccessFu:CursorCleared'],
@ -186,7 +189,9 @@
speak: ['Phone status bar', 'Traversal Rule test document']
}],
[doc.defaultView.showAlert, {
speak: ['This is an alert! heading level 1 dialog']
speak: ['This is an alert!',
{'string': 'headingLevel', 'args': [1]},
{'string': 'dialog'}]
}],
[function() {