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

Issue 709908 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Email to this user bounced
Closed: Apr 2017
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

[sensor]Incorrect exception is thrown when passing wrong type of parameter to 'sensor.populateMatrix()' method

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

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36

Steps to reproduce the problem:
Test Case:https://thewebera.github.io/web-test-suite/generic-sensor/sensors/AbsoluteOrientationSensor.https.html
Test Name: exception is thrown when 'populateMatrix' event has a wrong parameter

Passing parameter with string type to sensor.poplateMatrix() method.

What is the expected behavior?
The "SyntaxError" is thrown.

What went wrong?
The "TypeError" is thrown.

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 59.0.3064.0  Channel: canary
OS Version: 10
Flash Version: Shockwave Flash 25.0 r0

This issue also exist on Android.
Spec Link: https://w3c.github.io/orientation-sensor/#orientationsensor-populatematrix 
Description: If targetMatrix is not of type defined by RotationMatrixType union, throw a "SyntaxError" DOMException and abort these steps.
 
Owner: mikhail....@intel.com
I think it is spec error, we need to throw TypeError when invalid type is provided to the function. Created spec issue https://github.com/w3c/orientation-sensor/issues/31
Status: Verified (was: Unconfirmed)
Fixed in spec https://github.com/w3c/orientation-sensor/pull/32

Comment 3 by canx....@intel.com, Apr 18 2017

Thanks a lot. The spec has been update.

Sign in to add a comment