mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-14 12:13:22 +00:00
Bug 1028046 - NFC testcase failure with error message "setTagData undefined". r=yoshi
This commit is contained in:
parent
973ba72400
commit
def0bdbf3c
@ -59,30 +59,18 @@ function handleTechnologyDiscoveredRE0ForP2PRegFailure(msg) {
|
||||
}
|
||||
}
|
||||
|
||||
function activateRE(re) {
|
||||
let deferred = Promise.defer();
|
||||
let cmd = "nfc nci rf_intf_activated_ntf " + re;
|
||||
|
||||
emulator.run(cmd, function(result) {
|
||||
is(result.pop(), "OK", "check activation of RE" + re);
|
||||
deferred.resolve();
|
||||
});
|
||||
|
||||
return deferred.promise;
|
||||
}
|
||||
|
||||
function testPeerReady() {
|
||||
window.navigator.mozSetMessageHandler(
|
||||
"nfc-manager-tech-discovered", handleTechnologyDiscoveredRE0);
|
||||
|
||||
toggleNFC(true).then(() => activateRE(0));
|
||||
toggleNFC(true).then(() => emulator.activateRE(0));
|
||||
}
|
||||
|
||||
function testCheckP2PRegFailure() {
|
||||
window.navigator.mozSetMessageHandler(
|
||||
"nfc-manager-tech-discovered", handleTechnologyDiscoveredRE0ForP2PRegFailure);
|
||||
|
||||
toggleNFC(true).then(() => activateRE(0));
|
||||
toggleNFC(true).then(() => emulator.activateRE(0));
|
||||
}
|
||||
|
||||
function testCheckNfcPeerObjForInvalidToken() {
|
||||
|
@ -35,8 +35,8 @@ function testUrlTagDiscover(re) {
|
||||
});
|
||||
|
||||
toggleNFC(true)
|
||||
.then(() => setTagData(re, flag, tnf, btoa(type), btoa(payload)))
|
||||
.then(() => activateRE(re));
|
||||
.then(() => emulator.setTagData(re, flag, tnf, btoa(type), btoa(payload)))
|
||||
.then(() => emulator.activateRE(re));
|
||||
}
|
||||
|
||||
function testUrlT1TDiscover() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user