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

Issue 718354 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]No error thrown when nfc.cancelWatch with invalid watch ID

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 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.
 
Components: Blink>NFC
Owner: 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?

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

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

Sign in to add a comment