You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: crates/web-sys/tests/wasm/select_element.rs
+15-8
Original file line number
Diff line number
Diff line change
@@ -26,9 +26,12 @@ fn test_select_element() {
26
26
"Select element should have a false autofocus property."
27
27
);
28
28
29
-
// TODO: This test currently fails on Firefox, but not Chrome. In Firefox, even though we select.set_autocomplete(), select.autocomplete() yields an empty String.
30
-
// select.set_autocomplete("tomato");
31
-
// assert_eq!(select.autocomplete(), "tomato", "Select element should have a 'tomato' autocomplete property.");
29
+
select.set_autocomplete("country");
30
+
assert_eq!(
31
+
select.autocomplete(),
32
+
"country",
33
+
"Select element should have a 'country' autocomplete property."
34
+
);
32
35
33
36
select.set_disabled(true);
34
37
assert_eq!(
@@ -173,9 +176,13 @@ fn test_select_element() {
173
176
"There should be no labels associated with our select element."
174
177
);
175
178
176
-
// TODO: This test won't work until this bug is fixed: https://www.w3.org/Bugs/Public/show_bug.cgi?id=20720. Sometime in the future, either remove this test or uncomment after bug is fixed.
177
-
// assert!(select.named_item("tomato").is_some(), "Should be able to find the 'tomato' option before removing it.");
178
-
// select.remove(0);
179
-
// assert!(select.named_item("tomato").is_none(), "Shouldn't be able to find the 'tomato' option after removing it.")
180
-
// TODO: As a result, we are missing a test for the remove() method.
179
+
assert!(
180
+
select.named_item("tomato").is_some(),
181
+
"Should be able to find the 'tomato' option before removing it."
182
+
);
183
+
select.remove_with_index(0);
184
+
assert!(
185
+
select.named_item("tomato").is_none(),
186
+
"Shouldn't be able to find the 'tomato' option after removing it."
Copy file name to clipboardExpand all lines: crates/web-sys/tests/wasm/slot_element.rs
+7-4
Original file line number
Diff line number
Diff line change
@@ -9,8 +9,11 @@ extern "C" {
9
9
10
10
#[wasm_bindgen_test]
11
11
fntest_slot_element(){
12
-
let _slot = new_slot();
13
-
// TODO: Test fails in Firefox, but not in Chrome. Error in Firefox is 'ReferenceError: HTMLSlotElement is not defined'. https://w3c-test.org/shadow-dom/HTMLSlotElement-interface.html
14
-
// slot.set_name("root_separator");
15
-
// assert_eq!(slot.name(), "root_separator", "Slot name should 'root_separator'.");
0 commit comments