New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 718356 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Email to this user bounced
Closed: May 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

[webnfc]nfc.cancelWatch does not throw error when there are no active watchers

Reported by canx....@intel.com, May 4 2017

Issue description

Steps 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 there are no active watchers.
Code snippet:
return promise_rejects(test, "NotFoundError", navigator.nfc.cancelWatch())

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 there are no active watchers, "NotFoundError" should be thrown.
 
Owner: alexande...@intel.com
Same as https://bugs.chromium.org/p/chromium/issues/detail?id=718354

navigator.nfc.cancelWatch().catch(error => {console.log(error.name);}); Rejects promise with NotFoundError.
Components: Blink>NFC

Comment 3 by canx....@intel.com, May 8 2017

This issue cannot reproduce after enable the "WebNFC Android" flag.
Thanks!
Status: WontFix (was: Unconfirmed)

Sign in to add a comment