[webnfc]No error thrown when nfc.cancelWatch with invalid watch ID
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_watch.https.html Test Name: Test that nfc.cancelWatch fails if invalid watch ID is provided. Code snippet: return promise_rejects(test, "NotFoundError", navigator.nfc.cancelWatch(1)); What is the expected behavior? NotFoundError 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 spec: 10.8.4 The cancelWatch() method (https://w3c.github.io/web-nfc/#the-cancelwatch-method) Description: If the parameter id is undefined, then remove all watches and filters set by successive calls of the NFC watch() method on all NFC adapters. Otherwise, if the parameter id matches the local identifier of one of the previously set up watches, remove the corresponding watch. Otherwise, reject promise with "NotFoundError" and abort these steps. So if we set the invalid watch ID, "NotFoundError" should be thrown.
,
May 8 2017
This issue cannot reproduce after enable the "WebNFC Android" flag.
,
May 8 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by alexande...@intel.com
, May 4 2017Owner: alexande...@intel.com
navigator.nfc.cancelWatch(1).catch(error => {console.log(error.name);}); Works for me, on device and using blink layout tests. canx.cao@ Maybe there is a bug in your tests?