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

Unified Diff: third_party/WebKit/LayoutTests/virtual/sharedarraybuffer/fast/xmlhttprequest/xmlhttprequest-send-sharedarraybuffer.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/virtual/sharedarraybuffer/fast/xmlhttprequest/xmlhttprequest-send-sharedarraybuffer.html
diff --git a/third_party/WebKit/LayoutTests/virtual/sharedarraybuffer/fast/xmlhttprequest/xmlhttprequest-send-sharedarraybuffer.html b/third_party/WebKit/LayoutTests/virtual/sharedarraybuffer/fast/xmlhttprequest/xmlhttprequest-send-sharedarraybuffer.html
new file mode 100644
index 0000000000000000000000000000000000000000..ffe1250ecc76680b9994b241c5f1827dae48aa81
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/virtual/sharedarraybuffer/fast/xmlhttprequest/xmlhttprequest-send-sharedarraybuffer.html
@@ -0,0 +1,14 @@
+<html>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script src="../../../../resources/js-test.js"></script>
+<script>
+description('This test checks if sending a SharedArrayBuffer throws an exception');
+
+var xhr = new XMLHttpRequest();
+xhr.open('POST', 'resources/plist.app', true);
+
+shouldThrow('xhr.send(new Uint8Array(new SharedArrayBuffer(10)))', '"TypeError: Failed to execute \'send\' on \'XMLHttpRequest\': parameter 1 is a view of a SharedArrayBuffer."');
+</script>
+</body>

Powered by Google App Engine
This is Rietveld 408576698