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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-matrix.html

Issue 2812833003: Revert of [SharedArrayBuffer] Prevent SharedArrayBuffer being used in Web APIs (Closed)
Patch Set: Created 3 years, 8 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 <script src="./resources/geometry-interfaces-test-helpers.js"></script> 4 <script src="./resources/geometry-interfaces-test-helpers.js"></script>
5 <script> 5 <script>
6 test(() => { 6 test(() => {
7 var matrix = new DOMMatrix(); 7 var matrix = new DOMMatrix();
8 assert_identity_2d_matrix(matrix); 8 assert_identity_2d_matrix(matrix);
9 }, "DOMMatrix() constructor"); 9 }, "DOMMatrix() constructor");
10 10
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 assert_throws(new TypeError(), () => { DOMMatrix.fromFloat32Array(new Float32A rray([1])); }, 113 assert_throws(new TypeError(), () => { DOMMatrix.fromFloat32Array(new Float32A rray([1])); },
114 "fromFloat32Array function only accepts 1 Float32Array with 6 or 16 elements "); 114 "fromFloat32Array function only accepts 1 Float32Array with 6 or 16 elements ");
115 assert_throws(new TypeError(), () => { DOMMatrix.fromFloat64Array(new Float64A rray([1])); }, 115 assert_throws(new TypeError(), () => { DOMMatrix.fromFloat64Array(new Float64A rray([1])); },
116 "fromFloat64Array function only accepts 1 Float64Array with 6 or 16 elements "); 116 "fromFloat64Array function only accepts 1 Float64Array with 6 or 16 elements ");
117 assert_throws(new TypeError(), () => { DOMMatrix.fromFloat32Array(new Float32A rray(65536)); }, 117 assert_throws(new TypeError(), () => { DOMMatrix.fromFloat32Array(new Float32A rray(65536)); },
118 "fromFloat32Array function only accepts 1 Float32Array with 6 or 16 elements "); 118 "fromFloat32Array function only accepts 1 Float32Array with 6 or 16 elements ");
119 assert_throws(new TypeError(), () => { DOMMatrix.fromFloat64Array(new Float64A rray(65536)); }, 119 assert_throws(new TypeError(), () => { DOMMatrix.fromFloat64Array(new Float64A rray(65536)); },
120 "fromFloat64Array function only accepts 1 Float64Array with 6 or 16 elements "); 120 "fromFloat64Array function only accepts 1 Float64Array with 6 or 16 elements ");
121 }, "DOMMatrix fromFloat*Array - invalid array size"); 121 }, "DOMMatrix fromFloat*Array - invalid array size");
122 122
123 if (window.SharedArrayBuffer) {
124 test(() => {
125 assert_throws(new TypeError(), () => { DOMMatrix.fromFloat32Array(new Float3 2Array(new SharedArrayBuffer(24))); },
126 "");
127 assert_throws(new TypeError(), () => { DOMMatrix.fromFloat64Array(new Float6 4Array(new SharedArrayBuffer(32))); },
128 "");
129 }, "DOMMatrix fromFloat*Array - can't use SharedArrayBuffer view");
130 }
131
132 test(() => { 123 test(() => {
133 assert_identity_2d_matrix(DOMMatrix.fromMatrix()); 124 assert_identity_2d_matrix(DOMMatrix.fromMatrix());
134 }, "DOMMatrix.fromMatrix() with no parameter"); 125 }, "DOMMatrix.fromMatrix() with no parameter");
135 126
136 test(() => { 127 test(() => {
137 assert_identity_2d_matrix(DOMMatrix.fromMatrix(null)); 128 assert_identity_2d_matrix(DOMMatrix.fromMatrix(null));
138 }, "DOMMatrix.fromMatrix() with null"); 129 }, "DOMMatrix.fromMatrix() with null");
139 130
140 test(() => { 131 test(() => {
141 assert_identity_2d_matrix(DOMMatrix.fromMatrix(undefined)); 132 assert_identity_2d_matrix(DOMMatrix.fromMatrix(undefined));
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 "using relative units should throw a SyntaxError"); 229 "using relative units should throw a SyntaxError");
239 assert_throws(new TypeError(), () => { 230 assert_throws(new TypeError(), () => {
240 var matrix = DOMMatrix.fromMatrix({a: 1, b: 2, m33: 3, m44: 4, is2D: true}); 231 var matrix = DOMMatrix.fromMatrix({a: 1, b: 2, m33: 3, m44: 4, is2D: true});
241 }, "The 'is2D' property is set to true but the input matrix is 3d matrix"); 232 }, "The 'is2D' property is set to true but the input matrix is 3d matrix");
242 assert_throws(new TypeError(), () => { 233 assert_throws(new TypeError(), () => {
243 var matrix = DOMMatrix.fromMatrix({a: 1, b: 2, m11: 3}); 234 var matrix = DOMMatrix.fromMatrix({a: 1, b: 2, m11: 3});
244 }, "The 'a' property should equal the 'm11' property"); 235 }, "The 'a' property should equal the 'm11' property");
245 }, "DOMMatrix.fromMatrix(): Exception test"); 236 }, "DOMMatrix.fromMatrix(): Exception test");
246 237
247 </script> 238 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698