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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/push_messaging/resources/pushmessagedata-worker.js

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/push_messaging/resources/pushmessagedata-worker.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/push_messaging/resources/pushmessagedata-worker.js b/third_party/WebKit/LayoutTests/http/tests/push_messaging/resources/pushmessagedata-worker.js
index 36fa4437591d83b060fe331483da9b8477bf3c4a..6b9a49fd8d58d99fb48813531936a1f9b047aed3 100644
--- a/third_party/WebKit/LayoutTests/http/tests/push_messaging/resources/pushmessagedata-worker.js
+++ b/third_party/WebKit/LayoutTests/http/tests/push_messaging/resources/pushmessagedata-worker.js
@@ -108,3 +108,11 @@ test(function() {
assert_equals(data.text(), s, 'String should not be NFC-normalized.');
}, 'PushEventInit data is not normalized');
+
+if (self.SharedArrayBuffer) {
+ test(function() {
+ assert_throws(null, () => {
+ createPushMessageData(new Uint8Array(new SharedArrayBuffer(16)));
+ });
+ }, 'PushMessageData throws when passed SharedArrayBuffer view.');
+}

Powered by Google App Engine
This is Rietveld 408576698