Bug 976402 - Part 3 - Add marionette test case to validate access to MozNfcPeer interface with invalid sessionToken. r=allstars.chh

This commit is contained in:
Siddartha Pothapragada 2014-05-27 11:17:00 +02:00
parent c3b687f988
commit 34be0a651a

View File

@ -85,9 +85,22 @@ function testCheckP2PRegFailure() {
toggleNFC(true).then(() => activateRE(0));
}
function testCheckNfcPeerObjForInvalidToken() {
try {
// Use a'fakeSessionToken'
let peer = nfc.getNFCPeer("fakeSessionToken");
ok(false, "Should not get a NFCPeer object.");
} catch (ex) {
ok(true, "Exception expected");
}
toggleNFC(false).then(runNextTest);
}
let tests = [
testPeerReady,
testCheckP2PRegFailure
testCheckP2PRegFailure,
testCheckNfcPeerObjForInvalidToken
];
SpecialPowers.pushPermissions(