1 use wasm_bindgen::prelude::*;
2 use wasm_bindgen_test::*;
3 use web_sys::HtmlMetaElement;
4 
5 #[wasm_bindgen(module = "/tests/wasm/element.js")]
6 extern "C" {
new_meta() -> HtmlMetaElement7     fn new_meta() -> HtmlMetaElement;
8 }
9 
10 #[wasm_bindgen_test]
test_meter_element()11 fn test_meter_element() {
12     let meta = new_meta();
13 
14     meta.set_name("keywords");
15     assert_eq!(
16         meta.name(),
17         "keywords",
18         "Meta should have the name value we gave it."
19     );
20 
21     meta.set_http_equiv("content-type");
22     assert_eq!(
23         meta.http_equiv(),
24         "content-type",
25         "Meta should have the http_equiv value we gave it."
26     );
27 
28     meta.set_content("HTML, CSS, XML, JavaScript");
29     assert_eq!(
30         meta.content(),
31         "HTML, CSS, XML, JavaScript",
32         "Meta should have the content value we gave it."
33     );
34 
35     meta.set_scheme("text");
36     assert_eq!(
37         meta.scheme(),
38         "text",
39         "Meta should have the scheme value we gave it."
40     );
41 }
42