Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(202)

Side by Side Diff: third_party/WebKit/LayoutTests/typedcssom/cssMatrixComponent.html

Issue 2942653002: [css-typed-om] remove asMatrix() method in CSSTransformComponent.idl (Closed)
Patch Set: rebase Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../resources/testharness.js"></script> 2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script> 3 <script src="../resources/testharnessreport.js"></script>
4 4
5 <script> 5 <script>
6 var values = [ 6 var values = [
7 {input: new CSSMatrixComponent(new DOMMatrixReadOnly([0, 0, 0, 0, 0, 0])), 7 {input: new CSSMatrixComponent(new DOMMatrixReadOnly([0, 0, 0, 0, 0, 0])),
8 a: 0, b: 0, c: 0, d: 0, e: 0, f: 0, 8 a: 0, b: 0, c: 0, d: 0, e: 0, f: 0,
9 is2D: true, cssText: "matrix(0, 0, 0, 0, 0, 0)"}, 9 is2D: true, cssText: "matrix(0, 0, 0, 0, 0, 0)"},
10 {input: new CSSMatrixComponent(new DOMMatrixReadOnly([2, 4, 6, 8, 10, 12])), 10 {input: new CSSMatrixComponent(new DOMMatrixReadOnly([2, 4, 6, 8, 10, 12])),
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 }, "Test that the toString for CSSMatrixComponent is correct."); 57 }, "Test that the toString for CSSMatrixComponent is correct.");
58 58
59 test(function() { 59 test(function() {
60 assert_throws(new TypeError(), function() { new CSSMatrixComponent() }); 60 assert_throws(new TypeError(), function() { new CSSMatrixComponent() });
61 assert_throws(new TypeError(), function() { new CSSMatrixComponent(0) }); 61 assert_throws(new TypeError(), function() { new CSSMatrixComponent(0) });
62 assert_throws(new TypeError(), function() { new CSSMatrixComponent("string") } ); 62 assert_throws(new TypeError(), function() { new CSSMatrixComponent("string") } );
63 assert_throws(new TypeError(), function() { new CSSMatrixComponent(null) }); 63 assert_throws(new TypeError(), function() { new CSSMatrixComponent(null) });
64 assert_throws(new TypeError(), function() { new CSSMatrixComponent(undefined) }); 64 assert_throws(new TypeError(), function() { new CSSMatrixComponent(undefined) });
65 }, "Test that invalid number of arguments for CSSMatrixComponent throws an excep tion."); 65 }, "Test that invalid number of arguments for CSSMatrixComponent throws an excep tion.");
66 66
67 test(function() {
68 var attributeValues = attributeValues2D.concat(attributeValues3D);
69 for (var i = 0; i < values.length; ++i) {
70 var inputAsMatrix = values[i].input.asMatrix();
71 for (var j = 0; j < attributeValues.length; ++j) {
72 var attribute = attributeValues[j];
73 assert_equals(inputAsMatrix[attribute], values[i].input[attribute]);
74 }
75 assert_equals(inputAsMatrix.is2D(), values[i].input.is2D());
76 assert_equals(inputAsMatrix.toString(), values[i].input.toString());
77 }
78 }, "Test that asMatrix has all the same properties as the original CSSMatrixComp onent.");
79
80 </script> 67 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698