Commit 7e8c0421 authored by Alexander Shalamov's avatar Alexander Shalamov Committed by Commit Bot

[sensors] Fix orientation sensor layout test

Layout test for orientation sensor is using assert_array_equals
for DOMMatrix objects, thus, assert will always pass. This CL
fixes this issue by converting DOMMatrix to Float64Array.

Bug: 751015
Change-Id: I599f864e631c667ce90b193590bfc4dda534cab6
Reviewed-on: https://chromium-review.googlesource.com/601971Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Alexander Shalamov <alexander.shalamov@intel.com>
Cr-Commit-Position: refs/heads/master@{#491999}
parent 08cdea0d
...@@ -71,7 +71,8 @@ function checkPopulateMatrix(sensor, sensorType) { ...@@ -71,7 +71,8 @@ function checkPopulateMatrix(sensor, sensorType) {
let rotationDOMMatrix = new DOMMatrix(); let rotationDOMMatrix = new DOMMatrix();
sensorObject.populateMatrix(rotationDOMMatrix); sensorObject.populateMatrix(rotationDOMMatrix);
assert_array_equals(rotationDOMMatrix, kRotationDOMMatrix); assert_array_equals(rotationDOMMatrix.toFloat64Array(),
kRotationMatrix);
// Sets every matrix element. // Sets every matrix element.
rotationMatrix64.fill(123); rotationMatrix64.fill(123);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment