File tree 1 file changed +18
-0
lines changed
testing/web-platform/tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers
1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change
1
+ test ( ( ) => {
2
+ const sab = new SharedArrayBuffer ( ) ;
3
+ const channel = new MessageChannel ( ) ;
4
+ assert_throws ( "DataCloneError" , ( ) => channel . port1 . postMessage ( sab ) ) ;
5
+ } , "SharedArrayBuffer over MessageChannel without COOP+COEP" ) ;
6
+
7
+ test ( ( ) => {
8
+ const sab = new SharedArrayBuffer ( ) ;
9
+ const channel = new BroadcastChannel ( "Is mir egal" ) ;
10
+ assert_throws ( "DataCloneError" , ( ) => channel . postMessage ( sab ) ) ;
11
+ } , "SharedArrayBuffer over BroadcastChannel without COOP+COEP" ) ;
12
+
13
+ if ( self . GLOBAL . isWindow ( ) ) {
14
+ test ( ( ) => {
15
+ const sab = new SharedArrayBuffer ( ) ;
16
+ assert_throws ( "DataCloneError" , ( ) => self . postMessage ( sab ) ) ;
17
+ } , "SharedArrayBuffer over postMessage() without COOP+COEP" ) ;
18
+ }
You can’t perform that action at this time.
0 commit comments