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

Issue 714037 link

Starred by 1 user

Issue metadata

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


Show other hotlists

Hotlists containing this issue:
NFC


Sign in to add a comment

[webnfc] nfc.push should throw TimeoutError when timer expires

Reported by canx....@intel.com, Apr 21 2017

Issue description

Steps to reproduce the problem:
Test case: https://thewebera.github.io/web-test-suite/web-nfc/nfc/nfc_push_exceptions.https.html
Test name: nfc.push should fail with TimeoutError when timer expires.

1.Set the invalid timeout value, e.g. navigator.nfc.push(“test”, { timeout: "1"})

What is the expected behavior?
Test should fail with TimeoutError.

What went wrong?
No error thrown.

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 60.0.3074.0  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/#the-push-method
Description: If timer expires, reject promise with "TimeoutError" and abort these steps.
 

Comment 1 by canx....@intel.com, Apr 21 2017

Cc: wanming.lin@intel.com , alexander.shalamov@intel.com 
Please take a look. Thanks.
Owner: alexande...@intel.com
Status: Assigned (was: Unconfirmed)
Components: Blink>NFC
Status: Started (was: Assigned)

Comment 5 Deleted

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

@alexander.shalamov, My steps to reproduce the problem is ambiguous, so I
update description of the steps to reproduce problem:
Change "Set the invalid timeout value, e.g. navigator.nfc.push(“test”, { timeout: "1"})" to  
"Set timeout with timer expires value, e.g. navigator.nfc.push(“test”, { timeout: 1})".

Sorry, this is my mistake.
Thanks!
Project Member

Comment 7 by bugdroid1@chromium.org, May 4 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b49d34931454bc1fdffdba99d6a0b344430746b5

commit b49d34931454bc1fdffdba99d6a0b344430746b5
Author: alexander.shalamov <alexander.shalamov@intel.com>
Date: Thu May 04 08:44:57 2017

[webnfc] Cancel nfc.push operation when timeout expires

This CL adds missing timeout handling functionality [1]. When user
provides timeout value for the push operation, and NFC tag is not
in proximity for the duration of timeout value, operation must be
rejected with timeout error. Unit test is added to test new
functionality.

https://w3c.github.io/web-nfc/#the-push-method (Step 14).

BUG= 714037 

Review-Url: https://codereview.chromium.org/2851453004
Cr-Commit-Position: refs/heads/master@{#469294}

[modify] https://crrev.com/b49d34931454bc1fdffdba99d6a0b344430746b5/device/nfc/android/java/src/org/chromium/device/nfc/NfcImpl.java
[modify] https://crrev.com/b49d34931454bc1fdffdba99d6a0b344430746b5/device/nfc/android/junit/src/org/chromium/device/nfc/NFCTest.java

Status: Fixed (was: Started)
canx.cao@ Could you please verify? Thanks.
OK, I will verify it once the fix landed in new Chrome.

Comment 11 by canx....@intel.com, May 10 2017

I retest this issue with chrome 60.0.3094.0, it has been fixed.
Close.
Status: Verified (was: Fixed)

Sign in to add a comment