mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1034660 - Exchange NDEF's PAYLOAD and ID fields in emulator interface. r=dlee
The emulator used PAYLOAD and ID fields of NDEF records in an incorrect order. The fix makes the command-line interface incompatible with the current test cases. This patch adapts the test cases by putting ID before PAYLOAD.
This commit is contained in:
parent
3823b26562
commit
160a24ce35
@ -95,7 +95,7 @@ let TAG = (function() {
|
||||
function setData(re, flag, tnf, type, payload) {
|
||||
let deferred = Promise.defer();
|
||||
let cmd = "nfc tag set " + re +
|
||||
" [" + flag + "," + tnf + "," + type + "," + payload + ",]";
|
||||
" [" + flag + "," + tnf + "," + type + ",," + payload + "]";
|
||||
|
||||
emulator.run(cmd, function(result) {
|
||||
is(result.pop(), "OK", "set NDEF data of tag" + re);
|
||||
@ -122,13 +122,13 @@ let TAG = (function() {
|
||||
}());
|
||||
|
||||
let SNEP = (function() {
|
||||
function put(dsap, ssap, flags, tnf, type, payload, id) {
|
||||
function put(dsap, ssap, flags, tnf, type, id, payload) {
|
||||
let deferred = Promise.defer();
|
||||
let cmd = "nfc snep put " + dsap + " " + ssap + " [" + flags + "," +
|
||||
tnf + "," +
|
||||
type + "," +
|
||||
payload + "," +
|
||||
id + "]";
|
||||
id + "," +
|
||||
payload + "]";
|
||||
emulator.run(cmd, function(result) {
|
||||
is(result.pop(), "OK", "send SNEP PUT");
|
||||
deferred.resolve();
|
||||
|
@ -6,8 +6,8 @@ MARIONETTE_HEAD_JS = 'head.js';
|
||||
|
||||
let tnf = NDEF.TNF_WELL_KNOWN;
|
||||
let type = "U";
|
||||
let payload = "https://www.example.com";
|
||||
let id = "";
|
||||
let payload = "https://www.example.com";
|
||||
|
||||
let ndef = null;
|
||||
|
||||
@ -35,7 +35,7 @@ function testReceiveNDEF() {
|
||||
toggleNFC(true)
|
||||
.then(() => NCI.activateRE(emulator.P2P_RE_INDEX_0))
|
||||
.then(() => SNEP.put(SNEP.SAP_NDEF, SNEP.SAP_NDEF, 0, tnf, btoa(type),
|
||||
btoa(payload), btoa(id)));
|
||||
btoa(id), btoa(payload)));
|
||||
}
|
||||
|
||||
let tests = [
|
||||
|
Loading…
Reference in New Issue
Block a user