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

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

Issue 2857333005: [css-typed-om] make all attributes of CSSScale mutable. (Closed)
Patch Set: [css-typed-om] make all attributes of CSSScale mutable. Created 3 years, 7 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 EPSILON = 1e-6; // float epsilon 6 var EPSILON = 1e-6; // float epsilon
7 var values = [ 7 var values = [
8 {input: new CSSScale(0, 0), x: 0, y: 0, z: 1, is2D: true, 8 {input: new CSSScale(0, 0), x: 0, y: 0, z: 1, is2D: true,
9 cssText: "scale(0, 0)"}, 9 cssText: "scale(0, 0)"},
10 {input: new CSSScale(1, 2), x: 1, y: 2, z: 1, is2D: true, 10 {input: new CSSScale(1, 2), x: 1, y: 2, z: 1, is2D: true,
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 for (var attribute in expectedMatrix) { 84 for (var attribute in expectedMatrix) {
85 if (typeof expectedMatrix[attribute] === "number") { 85 if (typeof expectedMatrix[attribute] === "number") {
86 assert_approx_equals(inputAsMatrix[attribute], expectedMatrix[attribute] , EPSILON); 86 assert_approx_equals(inputAsMatrix[attribute], expectedMatrix[attribute] , EPSILON);
87 } else { 87 } else {
88 assert_equals(inputAsMatrix[attribute], expectedMatrix[attribute]); 88 assert_equals(inputAsMatrix[attribute], expectedMatrix[attribute]);
89 } 89 }
90 } 90 }
91 } 91 }
92 }, "Test that asMatrix is constructed correctly for CSSScale."); 92 }, "Test that asMatrix is constructed correctly for CSSScale.");
93 93
94 test(function() {
95 var actual = new CSSScale(0, 0, 0);
96 actual.x = 1;
97 actual.y = 2;
98 actual.z = 3;
99 assert_equals(actual.x, 1);
100 assert_equals(actual.y, 2);
101 assert_equals(actual.z, 3);
102 }, "Test that x, y, z are mutable attributes.");
94 </script> 103 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698