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

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

Issue 1526183004: Prevent SharedArrayBuffer views from being used in bindings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: some tests Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-matrix.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-matrix.html b/third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-matrix.html
index 998c3daa58a1dfba068d886cfb2e3a135fc72a91..a6e9021f7598e46eca08c5d1289d744e62aafb1d 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-matrix.html
+++ b/third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-matrix.html
@@ -120,6 +120,19 @@ test(() => {
"fromFloat64Array function only accepts 1 Float64Array with 6 or 16 elements");
}, "DOMMatrix fromFloat*Array - invalid array size");
+if (window.internals && internals.runtimeFlags.sharedArrayBufferEnabled && window.SharedArrayBuffer) {
+
+ test(() => {
+ assert_throws(new TypeError(), () => { DOMMatrix.fromFloat32Array(new Float32Array(new SharedArrayBuffer(16))) },
+ "fromFloat32Array function should throw when passed a SharedArrayBuffer Float32Array");
+ });
+
+ test(() => {
+ assert_throws(new TypeError(), () => { DOMMatrix.fromFloat64Array(new Float64Array(new SharedArrayBuffer(16))) },
+ "fromFloat64Array function should throw when passed a SharedArrayBuffer Float64Array");
+ });
+}
+
test(() => {
assert_identity_2d_matrix(DOMMatrix.fromMatrix());
}, "DOMMatrix.fromMatrix() with no parameter");

Powered by Google App Engine
This is Rietveld 408576698