[webnfc]No error thrown when reject the nfc.cancelPush pending promise
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_push_exceptions.https.html Test Name: nfc.cancelPush should reject pending promise with AbortError. Code snippet is as below: let promise = navigator.nfc.push(test_text_data); navigator.nfc.cancelPush(); return promise_rejects(t, 'AbortError', promise); What is the expected behavior? AbortError is thrown. What went wrong? No error, test case time out. Did this work before? N/A 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 According to the spec: https://w3c.github.io/web-nfc/#cancelPush Description: Reject the instance's pending promise with "AbortError" and abort the steps of the instance.
,
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.push("Test").catch(error => {console.log(error.name);}); navigator.nfc.cancelPush(); Works on device and there is layout test for that. canx.cao@ could you please re-test?