Bug 749086 - 3/3: fix test cases. r=gwagner

This commit is contained in:
Vicamo Yang 2013-04-10 00:41:31 +08:00
parent ac29d93f96
commit 572a608ee9
14 changed files with 20 additions and 22 deletions

View File

@ -57,7 +57,7 @@ function deleteMsgs(msgList, nextFunction) {
log("Deleting SMS (id: " + smsId + ").");
let request = sms.delete(smsId);
ok(request instanceof MozSmsRequest,
ok(request instanceof DOMRequest,
"request is instanceof " + request.constructor);
request.onsuccess = function(event) {

View File

@ -57,7 +57,7 @@ function deleteMsgs(msgList, nextFunction) {
log("Deleting SMS (id: " + smsId + ").");
let request = sms.delete(smsId);
ok(request instanceof MozSmsRequest,
ok(request instanceof DOMRequest,
"request is instanceof " + request.constructor);
request.onsuccess = function(event) {

View File

@ -60,7 +60,7 @@ function deleteMsgs(msgList, nextFunction) {
log("Deleting SMS (id: " + smsId + ").");
let request = sms.delete(smsId);
ok(request instanceof MozSmsRequest,
ok(request instanceof DOMRequest,
"request is instanceof " + request.constructor);
request.onsuccess = function(event) {
@ -108,7 +108,7 @@ function sendSms() {
};
let request = sms.send(remoteNumber, text);
ok(request instanceof MozSmsRequest,
ok(request instanceof DOMRequest,
"request is instanceof " + request.constructor);
request.onsuccess = function(event) {

View File

@ -60,7 +60,7 @@ function deleteMsgs(msgList, nextFunction) {
log("Deleting SMS (id: " + smsId + ").");
let request = sms.delete(smsId);
ok(request instanceof MozSmsRequest,
ok(request instanceof DOMRequest,
"request is instanceof " + request.constructor);
request.onsuccess = function(event) {

View File

@ -57,7 +57,7 @@ function deleteMsgs(msgList, nextFunction) {
log("Deleting SMS (id: " + smsId + ").");
let request = sms.delete(smsId);
ok(request instanceof MozSmsRequest,
ok(request instanceof DOMRequest,
"request is instanceof " + request.constructor);
request.onsuccess = function(event) {
@ -131,7 +131,7 @@ function markMsgRead(smsMsgs) {
nextSms = smsMsgs.shift();
log("Marking SMS (id: " + nextSms.id + ") as read.");
let request = sms.markMessageRead(nextSms.id, true);
ok(request instanceof MozSmsRequest,
ok(request instanceof DOMRequest,
"request is instanceof " + request.constructor);
request.onsuccess = function(event) {

View File

@ -57,7 +57,7 @@ function deleteMsgs(msgList, nextFunction) {
log("Deleting SMS (id: " + smsId + ").");
let request = sms.delete(smsId);
ok(request instanceof MozSmsRequest,
ok(request instanceof DOMRequest,
"request is instanceof " + request.constructor);
request.onsuccess = function(event) {
@ -145,7 +145,7 @@ function sendSms() {
};
let request = sms.send(remoteNumber, text);
ok(request instanceof MozSmsRequest,
ok(request instanceof DOMRequest,
"request is instanceof " + request.constructor);
request.onsuccess = function(event) {

View File

@ -57,7 +57,7 @@ function deleteMsgs(msgList, nextFunction) {
log("Deleting SMS (id: " + smsId + ").");
let request = sms.delete(smsId);
ok(request instanceof MozSmsRequest,
ok(request instanceof DOMRequest,
"request is instanceof " + request.constructor);
request.onsuccess = function(event) {
@ -108,7 +108,7 @@ function sendSms() {
};
let request = sms.send(remoteNumber, text);
ok(request instanceof MozSmsRequest,
ok(request instanceof DOMRequest,
"request is instanceof " + request.constructor);
request.onsuccess = function(event) {

View File

@ -57,7 +57,7 @@ function deleteMsgs(msgList, nextFunction) {
log("Deleting SMS (id: " + smsId + ").");
let request = sms.delete(smsId);
ok(request instanceof MozSmsRequest,
ok(request instanceof DOMRequest,
"request is instanceof " + request.constructor);
request.onsuccess = function(event) {
@ -128,7 +128,7 @@ function markMsgRead() {
// Mark first message read so not all will be found by filter
log("Marking SMS (id: " + smsList[0].id + ") as read.");
let request = sms.markMessageRead(smsList[0].id, true);
ok(request instanceof MozSmsRequest,
ok(request instanceof DOMRequest,
"request is instanceof " + request.constructor);
request.onsuccess = function(event) {

View File

@ -61,7 +61,7 @@ function deleteMsgs(msgList, nextFunction) {
log("Deleting SMS (id: " + smsId + ").");
let request = sms.delete(smsId);
ok(request instanceof MozSmsRequest,
ok(request instanceof DOMRequest,
"request is instanceof " + request.constructor);
request.onsuccess = function(event) {

View File

@ -97,7 +97,7 @@ function sendSms() {
function markMessageAndVerify(smsId, readBool, nextFunction) {
let request = sms.markMessageRead(smsId, readBool);
ok(request instanceof MozSmsRequest,
ok(request instanceof DOMRequest,
"request is instanceof " + request.constructor);
request.onsuccess = function(event) {
@ -188,7 +188,7 @@ function deleteMsgs() {
log("Deleting SMS (id: " + smsId + ").");
let request = sms.delete(smsId);
ok(request instanceof MozSmsRequest,
ok(request instanceof DOMRequest,
"request is instanceof " + request.constructor);
request.onsuccess = function(event) {

View File

@ -80,7 +80,7 @@ function test2() {
function deleteMsg() {
log("Deleting SMS (id: " + smsId + ").");
let request = sms.delete(smsId);
ok(request instanceof MozSmsRequest,
ok(request instanceof DOMRequest,
"request is instanceof " + request.constructor);
request.onsuccess = function(event) {

View File

@ -93,9 +93,9 @@ function doSendMessageAndCheckSuccess(receivers, body, callback) {
}
function onRequestSuccess(event) {
log("SmsRequest.onsuccess event received.");
log("request.onsuccess event received.");
ok(event.target instanceof MozSmsRequest,
ok(event.target instanceof DOMRequest,
"event.target is instanceof " + event.target.constructor);
event.target.removeEventListener("success", onRequestSuccess);
@ -158,7 +158,7 @@ function doSendMessageAndCheckSuccess(receivers, body, callback) {
for (let i = 0; i < result.length; i++) {
let request = result[i];
ok(request instanceof MozSmsRequest,
ok(request instanceof DOMRequest,
"request is instanceof " + request.constructor);
request.addEventListener("success", onRequestSuccess);
}

View File

@ -44,7 +44,6 @@ function test() {
checkInterface("NavigatorSms");
checkInterface("SmsMessage");
checkInterface("SmsEvent");
checkInterface("SmsRequest");
checkInterface("SmsFilter");
// If sms is disabled and permission is removed, sms is disabled.

View File

@ -45,7 +45,6 @@ var interfaceNamesInGlobalScope =
"DeviceMotionEvent",
"GetSVGDocument",
"SVGAnimatedPreserveAspectRatio",
"MozSmsRequest",
"SVGViewElement",
"HTMLTableSectionElement",
"HTMLCollection",