Closed
Bug 949370
Opened 11 years ago
Closed 11 years ago
B2G NFC: HasNfcSupport is never used.
Categories
(Firefox OS Graveyard :: NFC, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: allstars.chh, Assigned: allstars.chh)
References
Details
Attachments
(1 file)
(deleted),
patch
|
Details | Diff | Splinter Review |
This is found by Henry.
In Bug 674741, a static function called Navigator::HasNfcSupport is added, but actually it's never been called.
When I try to call the function from MozNfc.webidl, I spotted some mochitest error.
The error should be caused by
1. win is null when running XBL test.
This problem is also met by Henry in https://bugzilla.mozilla.org/show_bug.cgi?id=946815#c11,
also there should be another bug Bug 946815 is tracking permission bugs during mochitest.
2. manifest.webapp didn't add 'nfc' permission.
Assignee | ||
Comment 1•11 years ago
|
||
Assignee | ||
Comment 2•11 years ago
|
||
Try : https://tbpl.mozilla.org/?tree=Try&rev=5ae05be0a8de
No sure if I also have to update gaia/test_external_apps/mochitest/manifest.webapp as well.
Assignee | ||
Comment 3•11 years ago
|
||
Comment on attachment 8346434 [details] [diff] [review]
WIP - Patch.
Hi BZ
Since you also mentioned the permission problem in https://bugzilla.mozilla.org/show_bug.cgi?id=939056#c43
So my proposal is to fix HasNfcSupport to use principal and update MozNfc.webidl and add nfc permission in manifest.webapp.
Then in Bug 939056(which you already r+ed), since MozNfc will be only available on some device, we'll need another patch to remove MozNfc from dom/tests/mochitest/general/test_interfaces.html.
And add the MozNfc back to the test_interfaces.html when emulator (or emulator on JellyBean) supports NFC.(Could be another bug)
Or should we simply add another patch to remove MozNfc from test_interfaces.html in Bug 939056 ? (which means we don't have to use principal to check permission in Navigator::HasNfcSupport.)
How do you think?
Attachment #8346434 -
Flags: feedback?(bzbarsky)
Comment 4•11 years ago
|
||
Comment on attachment 8346434 [details] [diff] [review]
WIP - Patch.
Well, which behavior do we actually want? Should this interface be available in XBL scopes or not?
Assignee | ||
Comment 5•11 years ago
|
||
(In reply to Boris Zbarsky [:bz] from comment #4)
> Comment on attachment 8346434 [details] [diff] [review]
> WIP - Patch.
>
> Well, which behavior do we actually want? Should this interface be
> available in XBL scopes or not?
I don't know XBL well, but I think it should *not* in XBL scope, but it seems from the test_interfaces.html the test case would like MozNfc to be in the XBL scope.
But I also found other B2G API are also in XBL scope like MozIccManager, MobileConnection, ...etc.
Thanks for your comments anyway, but I just found MozNfc has been removed from test_interfaces.html in Bug 946047. (Which I don't think it's correct, at least it should be removed in Bug 939056), so I'll cancel the feedback and close this bug as WONTFIX first.
Thank you, BZ. :)
Assignee | ||
Updated•11 years ago
|
Attachment #8346434 -
Flags: feedback?(bzbarsky)
Assignee | ||
Updated•11 years ago
|
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•