Skip to content

Commit 3c38ba2

Browse files
committed
Fix tests
1 parent 5e747c7 commit 3c38ba2

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

crates/webidl/tests/expected/Event.rs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ impl Event {
9696
}
9797
#[allow(bad_style, unused_variables)]
9898
#[cfg(not(all(target_arch = "wasm32", not(target_os = "emscripten"))))]
99-
pub extern "C" fn new(type_: &str, event_init_dict: EventInit) -> Event {
99+
pub fn new(type_: &str, event_init_dict: EventInit) -> Event {
100100
panic!(
101101
"cannot call wasm-bindgen imported functions on \
102102
non-wasm targets"
@@ -140,7 +140,7 @@ impl Event {
140140
}
141141
#[allow(bad_style, unused_variables)]
142142
#[cfg(not(all(target_arch = "wasm32", not(target_os = "emscripten"))))]
143-
pub extern "C" fn event_phase(&self) -> u16 {
143+
pub fn event_phase(&self) -> u16 {
144144
panic!(
145145
"cannot call wasm-bindgen imported functions on \
146146
non-wasm targets"
@@ -180,7 +180,7 @@ impl Event {
180180
}
181181
#[allow(bad_style, unused_variables)]
182182
#[cfg(not(all(target_arch = "wasm32", not(target_os = "emscripten"))))]
183-
pub extern "C" fn stop_propagation(&self) {
183+
pub fn stop_propagation(&self) {
184184
panic!(
185185
"cannot call wasm-bindgen imported functions on \
186186
non-wasm targets"
@@ -220,7 +220,7 @@ impl Event {
220220
}
221221
#[allow(bad_style, unused_variables)]
222222
#[cfg(not(all(target_arch = "wasm32", not(target_os = "emscripten"))))]
223-
pub extern "C" fn stop_immediate_propagation(&self) {
223+
pub fn stop_immediate_propagation(&self) {
224224
panic!(
225225
"cannot call wasm-bindgen imported functions on \
226226
non-wasm targets"
@@ -264,7 +264,7 @@ impl Event {
264264
}
265265
#[allow(bad_style, unused_variables)]
266266
#[cfg(not(all(target_arch = "wasm32", not(target_os = "emscripten"))))]
267-
pub extern "C" fn bubbles(&self) -> bool {
267+
pub fn bubbles(&self) -> bool {
268268
panic!(
269269
"cannot call wasm-bindgen imported functions on \
270270
non-wasm targets"
@@ -308,7 +308,7 @@ impl Event {
308308
}
309309
#[allow(bad_style, unused_variables)]
310310
#[cfg(not(all(target_arch = "wasm32", not(target_os = "emscripten"))))]
311-
pub extern "C" fn cancelable(&self) -> bool {
311+
pub fn cancelable(&self) -> bool {
312312
panic!(
313313
"cannot call wasm-bindgen imported functions on \
314314
non-wasm targets"
@@ -348,7 +348,7 @@ impl Event {
348348
}
349349
#[allow(bad_style, unused_variables)]
350350
#[cfg(not(all(target_arch = "wasm32", not(target_os = "emscripten"))))]
351-
pub extern "C" fn prevent_default(&self) {
351+
pub fn prevent_default(&self) {
352352
panic!(
353353
"cannot call wasm-bindgen imported functions on \
354354
non-wasm targets"
@@ -392,7 +392,7 @@ impl Event {
392392
}
393393
#[allow(bad_style, unused_variables)]
394394
#[cfg(not(all(target_arch = "wasm32", not(target_os = "emscripten"))))]
395-
pub extern "C" fn default_prevented(&self) -> bool {
395+
pub fn default_prevented(&self) -> bool {
396396
panic!(
397397
"cannot call wasm-bindgen imported functions on \
398398
non-wasm targets"
@@ -436,7 +436,7 @@ impl Event {
436436
}
437437
#[allow(bad_style, unused_variables)]
438438
#[cfg(not(all(target_arch = "wasm32", not(target_os = "emscripten"))))]
439-
pub extern "C" fn composed(&self) -> bool {
439+
pub fn composed(&self) -> bool {
440440
panic!(
441441
"cannot call wasm-bindgen imported functions on \
442442
non-wasm targets"
@@ -480,7 +480,7 @@ impl Event {
480480
}
481481
#[allow(bad_style, unused_variables)]
482482
#[cfg(not(all(target_arch = "wasm32", not(target_os = "emscripten"))))]
483-
pub extern "C" fn is_trusted(&self) -> bool {
483+
pub fn is_trusted(&self) -> bool {
484484
panic!(
485485
"cannot call wasm-bindgen imported functions on \
486486
non-wasm targets"
@@ -524,7 +524,7 @@ impl Event {
524524
}
525525
#[allow(bad_style, unused_variables)]
526526
#[cfg(not(all(target_arch = "wasm32", not(target_os = "emscripten"))))]
527-
pub extern "C" fn time_stamp(&self) -> DOMHighResTimeStamp {
527+
pub fn time_stamp(&self) -> DOMHighResTimeStamp {
528528
panic!(
529529
"cannot call wasm-bindgen imported functions on \
530530
non-wasm targets"
@@ -578,7 +578,7 @@ impl Event {
578578
}
579579
#[allow(bad_style, unused_variables)]
580580
#[cfg(not(all(target_arch = "wasm32", not(target_os = "emscripten"))))]
581-
pub extern "C" fn init_event(&self, type_: &str, bubbles: bool, cancelable: bool) {
581+
pub fn init_event(&self, type_: &str, bubbles: bool, cancelable: bool) {
582582
panic!(
583583
"cannot call wasm-bindgen imported functions on \
584584
non-wasm targets"
@@ -622,7 +622,7 @@ impl Event {
622622
}
623623
#[allow(bad_style, unused_variables)]
624624
#[cfg(not(all(target_arch = "wasm32", not(target_os = "emscripten"))))]
625-
pub extern "C" fn cancel_bubble(&self) -> bool {
625+
pub fn cancel_bubble(&self) -> bool {
626626
panic!(
627627
"cannot call wasm-bindgen imported functions on \
628628
non-wasm targets"
@@ -668,7 +668,7 @@ impl Event {
668668
}
669669
#[allow(bad_style, unused_variables)]
670670
#[cfg(not(all(target_arch = "wasm32", not(target_os = "emscripten"))))]
671-
pub extern "C" fn set_cancel_bubble(&self, cancel_bubble: bool) {
671+
pub fn set_cancel_bubble(&self, cancel_bubble: bool) {
672672
panic!(
673673
"cannot call wasm-bindgen imported functions on \
674674
non-wasm targets"
@@ -681,4 +681,4 @@ pub type DOMHighResTimeStamp = f64;
681681
pub type EventInit = bool;
682682
#[allow(non_upper_case_globals)]
683683
#[wasm_custom_section = "__wasm_bindgen_unstable"]
684-
const __WASM_BINDGEN_GENERATED_wasm_bindgen_webidl_0_2_11_0 : [ u8 ; 3815usize ] = * b"\xE3\x0E\0\0{\"exports\":[],\"enums\":[],\"imports\":[{\"module\":null,\"version\":null,\"js_namespace\":null,\"kind\":{\"kind\":\"type\"}},{\"module\":null,\"version\":null,\"js_namespace\":null,\"kind\":{\"kind\":\"function\",\"shim\":\"__widl_f_new_Event\",\"catch\":false,\"method\":{\"class\":\"Event\",\"kind\":\"Constructor\",\"getter\":null,\"setter\":null},\"structural\":false,\"function\":{\"name\":\"new\"}}},{\"module\":null,\"version\":null,\"js_namespace\":null,\"kind\":{\"kind\":\"function\",\"shim\":\"__widl_f_event_phase_Event\",\"catch\":false,\"method\":{\"class\":\"Event\",\"kind\":\"Normal\",\"getter\":\"eventPhase\",\"setter\":null},\"structural\":false,\"function\":{\"name\":\"eventPhase\"}}},{\"module\":null,\"version\":null,\"js_namespace\":null,\"kind\":{\"kind\":\"function\",\"shim\":\"__widl_f_stop_propagation_Event\",\"catch\":false,\"method\":{\"class\":\"Event\",\"kind\":\"Normal\",\"getter\":null,\"setter\":null},\"structural\":false,\"function\":{\"name\":\"stopPropagation\"}}},{\"module\":null,\"version\":null,\"js_namespace\":null,\"kind\":{\"kind\":\"function\",\"shim\":\"__widl_f_stop_immediate_propagation_Event\",\"catch\":false,\"method\":{\"class\":\"Event\",\"kind\":\"Normal\",\"getter\":null,\"setter\":null},\"structural\":false,\"function\":{\"name\":\"stopImmediatePropagation\"}}},{\"module\":null,\"version\":null,\"js_namespace\":null,\"kind\":{\"kind\":\"function\",\"shim\":\"__widl_f_bubbles_Event\",\"catch\":false,\"method\":{\"class\":\"Event\",\"kind\":\"Normal\",\"getter\":\"bubbles\",\"setter\":null},\"structural\":false,\"function\":{\"name\":\"bubbles\"}}},{\"module\":null,\"version\":null,\"js_namespace\":null,\"kind\":{\"kind\":\"function\",\"shim\":\"__widl_f_cancelable_Event\",\"catch\":false,\"method\":{\"class\":\"Event\",\"kind\":\"Normal\",\"getter\":\"cancelable\",\"setter\":null},\"structural\":false,\"function\":{\"name\":\"cancelable\"}}},{\"module\":null,\"version\":null,\"js_namespace\":null,\"kind\":{\"kind\":\"function\",\"shim\":\"__widl_f_prevent_default_Event\",\"catch\":false,\"method\":{\"class\":\"Event\",\"kind\":\"Normal\",\"getter\":null,\"setter\":null},\"structural\":false,\"function\":{\"name\":\"preventDefault\"}}},{\"module\":null,\"version\":null,\"js_namespace\":null,\"kind\":{\"kind\":\"function\",\"shim\":\"__widl_f_default_prevented_Event\",\"catch\":false,\"method\":{\"class\":\"Event\",\"kind\":\"Normal\",\"getter\":\"defaultPrevented\",\"setter\":null},\"structural\":false,\"function\":{\"name\":\"defaultPrevented\"}}},{\"module\":null,\"version\":null,\"js_namespace\":null,\"kind\":{\"kind\":\"function\",\"shim\":\"__widl_f_composed_Event\",\"catch\":false,\"method\":{\"class\":\"Event\",\"kind\":\"Normal\",\"getter\":\"composed\",\"setter\":null},\"structural\":false,\"function\":{\"name\":\"composed\"}}},{\"module\":null,\"version\":null,\"js_namespace\":null,\"kind\":{\"kind\":\"function\",\"shim\":\"__widl_f_is_trusted_Event\",\"catch\":false,\"method\":{\"class\":\"Event\",\"kind\":\"Normal\",\"getter\":\"isTrusted\",\"setter\":null},\"structural\":false,\"function\":{\"name\":\"isTrusted\"}}},{\"module\":null,\"version\":null,\"js_namespace\":null,\"kind\":{\"kind\":\"function\",\"shim\":\"__widl_f_time_stamp_Event\",\"catch\":false,\"method\":{\"class\":\"Event\",\"kind\":\"Normal\",\"getter\":\"timeStamp\",\"setter\":null},\"structural\":false,\"function\":{\"name\":\"timeStamp\"}}},{\"module\":null,\"version\":null,\"js_namespace\":null,\"kind\":{\"kind\":\"function\",\"shim\":\"__widl_f_init_event_Event\",\"catch\":false,\"method\":{\"class\":\"Event\",\"kind\":\"Normal\",\"getter\":null,\"setter\":null},\"structural\":false,\"function\":{\"name\":\"initEvent\"}}},{\"module\":null,\"version\":null,\"js_namespace\":null,\"kind\":{\"kind\":\"function\",\"shim\":\"__widl_f_cancel_bubble_Event\",\"catch\":false,\"method\":{\"class\":\"Event\",\"kind\":\"Normal\",\"getter\":\"cancelBubble\",\"setter\":null},\"structural\":false,\"function\":{\"name\":\"cancelBubble\"}}},{\"module\":null,\"version\":null,\"js_namespace\":null,\"kind\":{\"kind\":\"function\",\"shim\":\"__widl_f_set_cancel_bubble_Event\",\"catch\":false,\"method\":{\"class\":\"Event\",\"kind\":\"Normal\",\"getter\":null,\"setter\":\"cancelBubble\"},\"structural\":false,\"function\":{\"name\":\"set_cancelBubble\"}}}],\"structs\":[],\"version\":\"0.2.11 (13c93c46f)\",\"schema_version\":\"5\"}" ;
684+
const __WASM_BINDGEN_GENERATED_wasm_bindgen_webidl_0_2_11_0 : [ u8 ; 4023usize ] = * b"\xB3\x0F\0\0{\"exports\":[],\"enums\":[],\"imports\":[{\"module\":null,\"version\":null,\"js_namespace\":null,\"kind\":{\"kind\":\"type\"}},{\"module\":null,\"version\":null,\"js_namespace\":null,\"kind\":{\"kind\":\"function\",\"shim\":\"__widl_f_new_Event\",\"catch\":false,\"method\":{\"class\":\"Event\",\"kind\":\"Constructor\"},\"structural\":false,\"function\":{\"name\":\"new\"}}},{\"module\":null,\"version\":null,\"js_namespace\":null,\"kind\":{\"kind\":\"function\",\"shim\":\"__widl_f_event_phase_Event\",\"catch\":false,\"method\":{\"class\":\"Event\",\"kind\":{\"Operation\":{\"is_static\":false,\"kind\":{\"Getter\":\"eventPhase\"}}}},\"structural\":false,\"function\":{\"name\":\"eventPhase\"}}},{\"module\":null,\"version\":null,\"js_namespace\":null,\"kind\":{\"kind\":\"function\",\"shim\":\"__widl_f_stop_propagation_Event\",\"catch\":false,\"method\":{\"class\":\"Event\",\"kind\":{\"Operation\":{\"is_static\":false,\"kind\":\"Regular\"}}},\"structural\":false,\"function\":{\"name\":\"stopPropagation\"}}},{\"module\":null,\"version\":null,\"js_namespace\":null,\"kind\":{\"kind\":\"function\",\"shim\":\"__widl_f_stop_immediate_propagation_Event\",\"catch\":false,\"method\":{\"class\":\"Event\",\"kind\":{\"Operation\":{\"is_static\":false,\"kind\":\"Regular\"}}},\"structural\":false,\"function\":{\"name\":\"stopImmediatePropagation\"}}},{\"module\":null,\"version\":null,\"js_namespace\":null,\"kind\":{\"kind\":\"function\",\"shim\":\"__widl_f_bubbles_Event\",\"catch\":false,\"method\":{\"class\":\"Event\",\"kind\":{\"Operation\":{\"is_static\":false,\"kind\":{\"Getter\":\"bubbles\"}}}},\"structural\":false,\"function\":{\"name\":\"bubbles\"}}},{\"module\":null,\"version\":null,\"js_namespace\":null,\"kind\":{\"kind\":\"function\",\"shim\":\"__widl_f_cancelable_Event\",\"catch\":false,\"method\":{\"class\":\"Event\",\"kind\":{\"Operation\":{\"is_static\":false,\"kind\":{\"Getter\":\"cancelable\"}}}},\"structural\":false,\"function\":{\"name\":\"cancelable\"}}},{\"module\":null,\"version\":null,\"js_namespace\":null,\"kind\":{\"kind\":\"function\",\"shim\":\"__widl_f_prevent_default_Event\",\"catch\":false,\"method\":{\"class\":\"Event\",\"kind\":{\"Operation\":{\"is_static\":false,\"kind\":\"Regular\"}}},\"structural\":false,\"function\":{\"name\":\"preventDefault\"}}},{\"module\":null,\"version\":null,\"js_namespace\":null,\"kind\":{\"kind\":\"function\",\"shim\":\"__widl_f_default_prevented_Event\",\"catch\":false,\"method\":{\"class\":\"Event\",\"kind\":{\"Operation\":{\"is_static\":false,\"kind\":{\"Getter\":\"defaultPrevented\"}}}},\"structural\":false,\"function\":{\"name\":\"defaultPrevented\"}}},{\"module\":null,\"version\":null,\"js_namespace\":null,\"kind\":{\"kind\":\"function\",\"shim\":\"__widl_f_composed_Event\",\"catch\":false,\"method\":{\"class\":\"Event\",\"kind\":{\"Operation\":{\"is_static\":false,\"kind\":{\"Getter\":\"composed\"}}}},\"structural\":false,\"function\":{\"name\":\"composed\"}}},{\"module\":null,\"version\":null,\"js_namespace\":null,\"kind\":{\"kind\":\"function\",\"shim\":\"__widl_f_is_trusted_Event\",\"catch\":false,\"method\":{\"class\":\"Event\",\"kind\":{\"Operation\":{\"is_static\":false,\"kind\":{\"Getter\":\"isTrusted\"}}}},\"structural\":false,\"function\":{\"name\":\"isTrusted\"}}},{\"module\":null,\"version\":null,\"js_namespace\":null,\"kind\":{\"kind\":\"function\",\"shim\":\"__widl_f_time_stamp_Event\",\"catch\":false,\"method\":{\"class\":\"Event\",\"kind\":{\"Operation\":{\"is_static\":false,\"kind\":{\"Getter\":\"timeStamp\"}}}},\"structural\":false,\"function\":{\"name\":\"timeStamp\"}}},{\"module\":null,\"version\":null,\"js_namespace\":null,\"kind\":{\"kind\":\"function\",\"shim\":\"__widl_f_init_event_Event\",\"catch\":false,\"method\":{\"class\":\"Event\",\"kind\":{\"Operation\":{\"is_static\":false,\"kind\":\"Regular\"}}},\"structural\":false,\"function\":{\"name\":\"initEvent\"}}},{\"module\":null,\"version\":null,\"js_namespace\":null,\"kind\":{\"kind\":\"function\",\"shim\":\"__widl_f_cancel_bubble_Event\",\"catch\":false,\"method\":{\"class\":\"Event\",\"kind\":{\"Operation\":{\"is_static\":false,\"kind\":{\"Getter\":\"cancelBubble\"}}}},\"structural\":false,\"function\":{\"name\":\"cancelBubble\"}}},{\"module\":null,\"version\":null,\"js_namespace\":null,\"kind\":{\"kind\":\"function\",\"shim\":\"__widl_f_set_cancel_bubble_Event\",\"catch\":false,\"method\":{\"class\":\"Event\",\"kind\":{\"Operation\":{\"is_static\":false,\"kind\":{\"Setter\":\"cancelBubble\"}}}},\"structural\":false,\"function\":{\"name\":\"set_cancelBubble\"}}}],\"structs\":[],\"version\":\"0.2.11 (bfec9e640)\",\"schema_version\":\"6\"}" ;

0 commit comments

Comments
 (0)