Bug 1094089 - Part 1: Show reject cause. r=hsinyi

This commit is contained in:
Szu-Yu Chen [:aknow] 2014-11-13 10:58:45 +08:00
parent 4f430300a9
commit 98507361e5
22 changed files with 22 additions and 67 deletions

View File

@ -89,8 +89,6 @@ startTest(function() {
.then(() => check(PHONE_STATE_NORMAL))
// End
.then(null, error => {
ok(false, 'promise rejects during test.');
})
.catch(error => ok(false, "Promise reject: " + error))
.then(finish);
});

View File

@ -64,8 +64,6 @@ function testConferenceAddError() {
// Start the test
startTest(function() {
testConferenceAddError()
.then(null, error => {
ok(false, 'promise rejects during test.');
})
.catch(error => ok(false, "Promise reject: " + error))
.then(finish);
});

View File

@ -41,8 +41,6 @@ function testConferenceTwoCallsTwice() {
// Start the test
startTest(function() {
testConferenceTwoCallsTwice()
.then(null, error => {
ok(false, 'promise rejects during test.');
})
.catch(error => ok(false, "Promise reject: " + error))
.then(finish);
});

View File

@ -61,8 +61,6 @@ function testConferenceRemoveError() {
// Start the test
startTest(function() {
testConferenceRemoveError()
.then(null, error => {
ok(false, 'promise rejects during test.');
})
.catch(error => ok(false, "Promise reject: " + error))
.then(finish);
});

View File

@ -30,8 +30,6 @@ function testConferenceThreeAndHangupOne() {
// Start the test
startTest(function() {
testConferenceThreeAndHangupOne()
.then(null, error => {
ok(false, 'promise rejects during test.');
})
.catch(error => ok(false, "Promise reject: " + error))
.then(finish);
});

View File

@ -34,8 +34,6 @@ function testConferenceThreeAndRemoveOne() {
// Start the test
startTest(function() {
testConferenceThreeAndRemoveOne()
.then(null, error => {
ok(false, 'promise rejects during test.');
})
.catch(error => ok(false, "Promise reject: " + error))
.then(finish);
});

View File

@ -23,8 +23,6 @@ function testConferenceTwoCalls() {
// Start the test
startTest(function() {
testConferenceTwoCalls()
.then(null, error => {
ok(false, 'promise rejects during test.');
})
.catch(error => ok(false, "Promise reject: " + error))
.then(finish);
});

View File

@ -49,8 +49,6 @@ function testConferenceHangUpBackground() {
startTest(function() {
testConferenceHangUpForeground()
.then(() => testConferenceHangUpBackground())
.then(null, error => {
ok(false, 'promise rejects during test.');
})
.catch(error => ok(false, "Promise reject: " + error))
.then(finish);
});

View File

@ -28,8 +28,6 @@ function testConferenceTwoAndHangupOne() {
// Start the test
startTest(function() {
testConferenceTwoAndHangupOne()
.then(null, error => {
ok(false, 'promise rejects during test.');
})
.catch(error => ok(false, "Promise reject: " + error))
.then(finish);
});

View File

@ -35,8 +35,6 @@ function testConferenceHoldAndResume() {
// Start the test
startTest(function() {
testConferenceHoldAndResume()
.then(null, error => {
ok(false, 'promise rejects during test.');
})
.catch(error => ok(false, "Promise reject: " + error))
.then(finish);
});

View File

@ -30,8 +30,6 @@ function testConferenceTwoAndRemoveOne() {
// Start the test
startTest(function() {
testConferenceTwoAndRemoveOne()
.then(null, error => {
ok(false, 'promise rejects during test.');
})
.catch(error => ok(false, "Promise reject: " + error))
.then(finish);
});

View File

@ -46,8 +46,6 @@ startDSDSTest(function() {
testNewCallWhenOtherConnectionInUse(0, 1)
.then(() => testNewCallWhenOtherConnectionInUse(1, 0))
.then(() => muxModem(0))
.then(null, () => {
ok(false, "promise rejects during test.");
})
.catch(error => ok(false, "Promise reject: " + error))
.then(finish);
});

View File

@ -73,8 +73,6 @@ function testIncomingCall() {
startDSDSTest(function() {
testOutgoingCall()
.then(testIncomingCall)
.then(null, () => {
ok(false, "promise rejects during test.");
})
.catch(error => ok(false, "Promise reject: " + error))
.then(finish);
});

View File

@ -78,8 +78,6 @@ startTest(function() {
.then(() => testEmergencyLabel("119", eccList))
.then(() => testEmergencyLabel("112", eccList))
.then(() => setEccListProperty(origEccList))
.then(null, error => {
ok(false, 'promise rejects during test: ' + error);
})
.catch(error => ok(false, "Promise reject: " + error))
.then(finish);
});

View File

@ -21,8 +21,6 @@ function testGettingIMEI() {
// Start test
startTest(function() {
testGettingIMEI()
.then(null, cause => {
ok(false, 'promise rejects during test: ' + cause);
})
.catch(error => ok(false, "Promise reject: " + error))
.then(finish);
});

View File

@ -185,8 +185,6 @@ startTestWithPermissions(['mobileconnection'], function() {
// reset call forwarding settings.
return promise.then(() => clearAllCallForwardingSettings())
.then(null, cause => {
ok(false, 'promise rejects during test: ' + cause);
})
.catch(error => ok(false, "Promise reject: " + error))
.then(finish);
});

View File

@ -108,8 +108,6 @@ startTest(function() {
}
return promise
.then(null, cause => {
ok(false, 'promise rejects during test: ' + cause);
})
.catch(error => ok(false, "Promise reject: " + error))
.then(finish);
});

View File

@ -98,8 +98,6 @@ function testOutgoingCallRadioOff() {
// Start test
startTestWithPermissions(['mobileconnection'], function() {
testOutgoingCallRadioOff()
.then(null, () => {
ok(false, "promise rejects during test.");
})
.catch(error => ok(false, "Promise reject: " + error))
.then(finish);
});

View File

@ -45,8 +45,6 @@ function testAutoHoldConferenceCall() {
startTest(function() {
testAutoHoldCall()
.then(() => testAutoHoldConferenceCall())
.then(null, () => {
ok(false, 'promise rejects during test.');
})
.catch(error => ok(false, "Promise reject: " + error))
.then(finish);
});

View File

@ -36,8 +36,6 @@ startTestWithPermissions(['mobileconnection'], function() {
.then(() => gRemoteAnswer(outCall))
.then(() => gDelay(1000)) // See Bug 1018051 for the purpose of the delay.
.then(() => gRemoteHangUp(outCall))
.then(null, () => {
ok(false, "promise rejects during test.");
})
.catch(error => ok(false, "Promise reject: " + error))
.then(finish);
});

View File

@ -27,8 +27,6 @@ function testReject3rdCall() {
startTest(function() {
testReject3rdCall()
.then(null, () => {
ok(false, 'promise rejects during test.');
})
.catch(error => ok(false, "Promise reject: " + error))
.then(finish);
});

View File

@ -29,9 +29,6 @@ startTest(function() {
return deferred.promise;
})
.then(() => gRemoteHangUp(outCall))
// End
.then(null, error => {
ok(false, 'promise rejects during test.');
})
.catch(error => ok(false, "Promise reject: " + error))
.then(finish);
});