Issue metadata
Sign in to add a comment
|
[webnfc]No error thrown when invoking NFC interface with NFC module disabled or a device without NFC support
Reported by
canx....@intel.com,
May 4 2017
|
||||||||||||||||||||
Issue descriptionSteps to reproduce the problem: Test Case: https://thewebera.github.io/web-test-suite/web-nfc/nfc/nfc_hw_disabled-manual.https.html Test Case: https://thewebera.github.io/web-test-suite/web-nfc/nfc/nfc_hw_notsupported-manual.https.html 1.Disable the NFC in system or test on device without NFC hardware 2.Run test cases. What is the expected behavior? NotSupportedError is thrown. What went wrong? No error, test case time out. Did this work before? Yes 60.0.3074.0 Does this work in other browsers? N/A Chrome version: 60.0.3087.3 Channel: canary OS Version: Nexus 7(Android 5.1) Flash Version: Shockwave Flash 25.0 r0 (1)According to spec:10.7.1 The push() method (https://w3c.github.io/web-nfc/#the-push-method) Description: An implementation may reject promise with "NotSupportedError" and abort these steps. (2) According to spec:10.8.3 The watch() method (https://w3c.github.io/web-nfc/#the-watch-method) Description: If there is no support for the functionality of receiving data from an NFC peer or NFC tag in proximity range, reject promise with "NotSupportedError" and abort these steps. If the request fails, reject promise with "NotSupportedError" and abort these steps.
,
May 8 2017
This issue cannot reproduce after enable the "WebNFC Android" flag. Thanks!
,
May 8 2017
|
|||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||
Comment 1 by alexande...@intel.com
, May 4 2017Owner: alexande...@intel.com
navigator.nfc.watch((message) => { console.log(JSON.stringify(message)); }).catch(error => {console.log(error.name);}); navigator.nfc.push("Test").catch(error => {console.log(error.name);}); Both reject promise with NotSupportedError when NFC is disabled from settings. Works for me. canx.cao@ could you re-test or check the tests?