Closed Bug 1000981 Opened 11 years ago Closed 11 years ago

[NFC] NfcManager handleNdefMessage tests, NfcUtils tests moved to separate file

Categories

(Firefox OS Graveyard :: NFC, defect)

defect
Not set
normal

Tracking

(feature-b2g:2.0, tracking-b2g:backlog, b2g-v2.0 fixed)

RESOLVED FIXED
2.0 S1 (9may)
feature-b2g 2.0
tracking-b2g backlog
Tracking Status
b2g-v2.0 --- fixed

People

(Reporter: tauzen, Assigned: tauzen)

References

Details

(Whiteboard: [p=2])

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/537.36

Steps to reproduce:

NfcManager.handleNdefMessage processes NDEF message and returns an object which is used to create MozActivity later on. handleNdefMessage uses several helper methods (formatXXX) which basing on TNF (and record type in case of well known record). Test suit for all these methods should be implemented, as a result it may later on lead to some refactoring of these methods.
I would like to work on that.
You could also check Bug 1000830 I filed yesterday for the refactoring in handleNDEFMessage.
Assignee: nobody → kmioduszewski
Blocks: NFC-Gaia
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
blocking-b2g: --- → backlog
Target Milestone: --- → 2.0 S1 (9may)
Blocks: 1004438
Blocks: 1003723
Summary: [NFC] NfcManager test suit for handleNdefMessage and formatXXX methods → [NFC] NfcManager test suite for handleNdefMessage and formatXXX methods
Blocks: 1004967
Attached file pull_request.txt (deleted) —
List of changes:
1. moved NfcUtils and NfcUtilsManager tests to separate file in apps/system/test/unit/nfc_utils_test.js
2. Added 'handleNdefMessage' test suit with following test cases: tnf empty, tnf well known rtd text utf-8, tnf well known rtd uri, tnf well known rtd smart poster, tnf mime text/plain
3. Added 'handleNdefMessage not supported records' test suit. This test suit is skipped and contains 4 tests, each for bugs which I found working on this patch. Bug numbers are available in comments.

Once this lands and bugs from point 3. would be cleared I propose to move formatXXX methods to NfcManagerUtils with suitable test cases moved to separate file (nfc_manager_utils_test.js)
Attachment #8416721 - Flags: review?(alive)
Summary: [NFC] NfcManager test suite for handleNdefMessage and formatXXX methods → [NFC] NfcManager handleNdefMessage tests, NfcUtils tests moved to separate file
This bug blocks NFC 2.0 release.
Blocks: b2g-NFC-2.0
Attachment #8416721 - Flags: review?(alive) → review+
This patch has added new test file nfc_utils_test.js. Will it be automatically picked up by test runner and TravisCI? Or do we need to configure it somewhere? Locally I had to add it to gaia/dev_apps/test-agent/config.json to run the tests. But this file is no tracked by git.
Keywords: checkin-needed
Blocks: 1005820
The PR needs to be rebased.
Keywords: checkin-needed
rebased
Keywords: checkin-needed
Master: https://github.com/mozilla-b2g/gaia/commit/1cf9ee86885dc6f7a18e8df0a70d57dc5c722c40
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Whiteboard: [p=2]
feature-b2g: --- → 2.0
Flags: in-moztrap-
blocking-b2g: backlog → ---
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: