10
10
//!
11
11
//! @see https://github.com/rustwasm/wasm-bindgen/issues/1005
12
12
13
- use wasm_bindgen:: prelude:: * ;
14
13
use web_sys:: { WebGl2RenderingContext , WebGlRenderingContext , WebSocket } ;
15
- use wasm_bindgen_test:: * ;
16
14
17
- wasm_bindgen_test_configure ! ( run_in_browser) ;
18
-
19
- #[ wasm_bindgen( module = "/tests/wasm/element.js" ) ]
20
- extern "C" {
21
- fn new_webgl_rendering_context ( ) -> WebGlRenderingContext ;
22
- fn new_webgl2_rendering_context ( ) -> WebGl2RenderingContext ;
23
- fn new_websocket ( ) -> WebSocket ;
24
- // TODO: Add a function to create another type to test here.
25
- // These functions come from element.js
26
- }
27
-
28
- // Ensure that our whitelisted WebGlRenderingContext methods work
29
- // GECKODRIVER=geckodriver cargo test -p web-sys --target wasm32-unknown-unknown --all-features test_webgl_rendering_context_immutable_slices
30
- #[ wasm_bindgen_test]
15
+ // Ensure that our whitelisted WebGlRenderingContext methods compile with immutable slices.
31
16
fn test_webgl_rendering_context_immutable_slices ( ) {
32
17
let gl = new_webgl_rendering_context ( ) ;
33
18
@@ -70,8 +55,7 @@ fn test_webgl_rendering_context_immutable_slices() {
70
55
gl. compressed_tex_image_2d_with_u8_array ( 0 , 0 , 0 , 0 , 0 , 0 , & [ 1 ] ) ;
71
56
}
72
57
73
- // GECKODRIVER=geckodriver cargo test -p web-sys --target wasm32-unknown-unknown --all-features test_webgl2_rendering_context_immutable_slices
74
- #[ wasm_bindgen_test]
58
+ // Ensure that our whitelisted WebGl2RenderingContext methods compile with immutable slices.
75
59
fn test_webgl2_rendering_context_immutable_slices ( ) {
76
60
let gl = new_webgl2_rendering_context ( ) ;
77
61
@@ -80,8 +64,7 @@ fn test_webgl2_rendering_context_immutable_slices() {
80
64
gl. compressed_tex_image_3d_with_u8_array ( 0 , 0 , 0 , 0 , 0 , 0 , 0 , & [ 1 ] ) ;
81
65
}
82
66
83
- // GECKODRIVER=geckodriver cargo test -p web-sys --target wasm32-unknown-unknown --all-features test_websocket_immutable_slices
84
- #[ wasm_bindgen_test]
67
+ // Ensure that our whitelisted WebSocket methods compile with immutable slices.
85
68
fn test_websocket_immutable_slices ( ) {
86
69
let ws = new_websocket ( ) ;
87
70
ws. send_with_u8_array ( & [ 0 ] ) ;
0 commit comments