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

Issue 728497 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

[webnfc]SyntaxError is thrown when nfc.push with "empty" record

Reported by canx....@intel.com, Jun 1 2017

Issue description

Steps to reproduce the problem:
Test Case:https://01org.github.io/web-test-suite/chromium/web-nfc/nfc_push_exceptions.https.html
Test Name:nfc.push with 'empty' record should succeed.
1.Set nfc.push with 'empty' record

  return navigator.nfc.push(createMessage([createRecord('empty')]));
2.Test code:
https://github.com/01org/web-test-suite/blob/gh-pages/chromium/web-nfc/nfc_push_exceptions.https.html#L153

What is the expected behavior?
No error.

What went wrong?
SyntaxError is thrown.
Error Message:promise_test: Unhandled rejection with value: object "SyntaxError: Invalid NFC message was provided."

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 61.0.3116.0  Channel: canary
OS Version: Nexus 7(Andorid 5.1)
Flash Version: 

Run layout test in chromium, it works fine. No error thrown.
 
Components: Blink>NFC
Owner: alexande...@intel.com
Status: Assigned (was: Unconfirmed)
Status: Started (was: Assigned)
Project Member

Comment 4 by bugdroid1@chromium.org, Jun 15 2017

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

commit 09ab0857a3fd76bb950622fb270cb618007c3f47
Author: Alexander Shalamov <alexander.shalamov@intel.com>
Date: Thu Jun 15 08:29:59 2017

[webnfc] Allow 'empty' NFC records on Android platform

An 'empty' NFC record is a valid record and according to the
specification it can be present in a NFCMessage [1]. This PR relaxes NFC
record validation and allows 'empty' NFC records. New tests added to
test conversion between Android and mojom data types.

BUG= 728497 

[1] https://w3c.github.io/web-nfc/#mapping-empty-record-to-ndef

Change-Id: I8a9855a47b79ce34eaaf0c27b075064efdaff39a
Reviewed-on: https://chromium-review.googlesource.com/532873
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Alexander Shalamov <alexander.shalamov@intel.com>
Cr-Commit-Position: refs/heads/master@{#479640}
[modify] https://crrev.com/09ab0857a3fd76bb950622fb270cb618007c3f47/services/device/nfc/android/java/src/org/chromium/device/nfc/NfcMessageValidator.java
[modify] https://crrev.com/09ab0857a3fd76bb950622fb270cb618007c3f47/services/device/nfc/android/java/src/org/chromium/device/nfc/NfcTypeConverter.java
[modify] https://crrev.com/09ab0857a3fd76bb950622fb270cb618007c3f47/services/device/nfc/android/junit/src/org/chromium/device/nfc/NFCTest.java

Status: Fixed (was: Started)

Comment 6 by canx....@intel.com, Jun 16 2017

I will verify it once the fix landed in new Chrome.Thanks.

Comment 7 by canx....@intel.com, Jun 20 2017

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

Sign in to add a comment