mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-12 09:01:16 +00:00
Bug 1040619 - [NFC] javascript error "emulator.activateRE is not a function" when run NFC testcase. r=allstars.chh
This commit is contained in:
parent
0af91bba6c
commit
0018f4f851
@ -27,7 +27,7 @@ let sessionTokens = [];
|
||||
function testNfcNotEnabledError() {
|
||||
log('testNfcNotEnabledError');
|
||||
toggleNFC(true)
|
||||
.then(() => emulator.activateRE(emulator.P2P_RE_INDEX_0))
|
||||
.then(() => NCI.activateRE(emulator.P2P_RE_INDEX_0))
|
||||
.then(registerAndFireOnpeerready)
|
||||
.then(() => toggleNFC(false))
|
||||
.then(() => sendNDEFExpectError(nfcPeers[0], 'NfcNotEnabledError'))
|
||||
@ -45,10 +45,10 @@ function testNfcNotEnabledError() {
|
||||
function testNfcBadSessionIdError() {
|
||||
log('testNfcBadSessionIdError');
|
||||
toggleNFC(true)
|
||||
.then(() => emulator.activateRE(emulator.P2P_RE_INDEX_0))
|
||||
.then(() => NCI.activateRE(emulator.P2P_RE_INDEX_0))
|
||||
.then(registerAndFireOnpeerready)
|
||||
.then(() => emulator.deactivate())
|
||||
.then(() => emulator.activateRE(emulator.P2P_RE_INDEX_0))
|
||||
.then(() => NCI.deactivate())
|
||||
.then(() => NCI.activateRE(emulator.P2P_RE_INDEX_0))
|
||||
.then(registerAndFireOnpeerready)
|
||||
// we have 2 peers in nfcPeers array, peer0 has old/invalid session token
|
||||
.then(() => sendNDEFExpectError(nfcPeers[0], 'NfcBadSessionIdError'))
|
||||
@ -65,7 +65,7 @@ function testNfcBadSessionIdError() {
|
||||
function testNfcConnectError() {
|
||||
log('testNfcConnectError');
|
||||
toggleNFC(true)
|
||||
.then(() => emulator.activateRE(emulator.P2P_RE_INDEX_0))
|
||||
.then(() => NCI.activateRE(emulator.P2P_RE_INDEX_0))
|
||||
.then(registerAndFireOnpeerready)
|
||||
.then(() => connectToNFCTagExpectError(sessionTokens[0],
|
||||
'NDEF',
|
||||
@ -83,7 +83,7 @@ function testNfcConnectError() {
|
||||
function testNoErrorInTechMsg() {
|
||||
log('testNoErrorInTechMsg');
|
||||
toggleNFC(true)
|
||||
.then(() => emulator.activateRE(emulator.P2P_RE_INDEX_0))
|
||||
.then(() => NCI.activateRE(emulator.P2P_RE_INDEX_0))
|
||||
.then(setTechDiscoveredHandler)
|
||||
.then(setAndFireTechLostHandler)
|
||||
.then(() => toggleNFC(false))
|
||||
@ -203,7 +203,7 @@ function setAndFireTechLostHandler() {
|
||||
techLostHandler);
|
||||
|
||||
// triggers tech-lost
|
||||
emulator.deactivate();
|
||||
NCI.deactivate();
|
||||
return deferred.promise;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user