blob: d393edeeb39d4ef61a30740fa5c4080a2d0ed9f7 [file] [log] [blame]
<!DOCTYPE HTML>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="./resources/geometry-interfaces-test-helpers.js"></script>
<script>
test(function() {
var matrix2d = new DOMMatrixReadOnly([1, 2, 3, 3.1, 2, 1]);
var flipX = matrix2d.flipX();
assert_2d_matrix_equals(flipX, [-1, -2, 3, 3.1, 2, 1]);
}, "DOMMatrixReadOnly flipX - 2D matrix");
test(function() {
var matrix3d = new DOMMatrixReadOnly([1, 2, 3, 4, 5, 6, 7, 8, 9, 10.1, 11, 12, 13, 14, 15, 16.6]);
var flipX = matrix3d.flipX();
assert_3d_matrix_equals(flipX, [-1, -2, -3, -4, 5, 6, 7, 8, 9, 10.1, 11, 12, 13, 14, 15, 16.6]);
}, "DOMMatrixReadOnly flipX - 3D matrix");
test(function() {
var matrix2d = new DOMMatrixReadOnly([1, 2, 3, 3.1, 2, 1]);
var flipY = matrix2d.flipY();
assert_2d_matrix_equals(flipY, [1, 2, -3, -3.1, 2, 1]);
}, "DOMMatrixReadOnly flipY - 2D matrix");
test(function() {
var matrix3d = new DOMMatrixReadOnly([1, 2, 3, 4, 5, 6, 7, 8, 9, 10.1, 11, 12, 13, 14, 15, 16.6]);
var flipY = matrix3d.flipY();
assert_3d_matrix_equals(flipY, [1, 2, 3, 4, -5, -6, -7, -8, 9, 10.1, 11, 12, 13, 14, 15, 16.6]);
}, "DOMMatrixReadOnly flipY - 3D matrix");
</script>