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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/websocket/send-arraybufferview.html

Issue 2707243006: [SharedArrayBuffer] Prevent SharedArrayBuffer being used in Web APIs (Closed)
Patch Set: update comment, add TODO 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/websocket/send-arraybufferview.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/websocket/send-arraybufferview.html b/third_party/WebKit/LayoutTests/http/tests/websocket/send-arraybufferview.html
index b85476f8fc604b8e33ea5e5d746fd04815886449..a25a24687089fd7baf387cb9ff748de953e1c404 100644
--- a/third_party/WebKit/LayoutTests/http/tests/websocket/send-arraybufferview.html
+++ b/third_party/WebKit/LayoutTests/http/tests/websocket/send-arraybufferview.html
@@ -40,6 +40,11 @@ function createArrayBufferViewContainingAllDistinctBytes()
return array;
}
+function createSharedArrayBufferView()
+{
+ return new Uint8Array(new SharedArrayBuffer(16));
+}
+
var url = "ws://127.0.0.1:8880/check-binary-messages";
var ws = new WebSocket(url);
var closeEvent;
@@ -49,6 +54,10 @@ ws.onopen = function()
ws.send(createArrayBufferViewContainingHelloWorld());
ws.send(createEmptyArrayBufferView());
ws.send(createArrayBufferViewContainingAllDistinctBytes());
+
+ if (window.SharedArrayBuffer) {
+ shouldThrow("ws.send(createSharedArrayBufferView())");
+ }
};
ws.onmessage = function(event)

Powered by Google App Engine
This is Rietveld 408576698