2018-07-31 16:57:16 +01:00
|
|
|
use wasm_bindgen::prelude::*;
|
2018-09-26 08:26:00 -07:00
|
|
|
use wasm_bindgen_test::*;
|
2018-07-31 16:57:16 +01:00
|
|
|
use web_sys::HtmlHeadingElement;
|
|
|
|
|
2019-02-26 08:33:14 -08:00
|
|
|
#[wasm_bindgen(module = "/tests/wasm/element.js")]
|
2018-09-26 08:26:00 -07:00
|
|
|
extern "C" {
|
2018-07-31 16:57:16 +01:00
|
|
|
fn new_heading() -> HtmlHeadingElement;
|
|
|
|
}
|
|
|
|
|
|
|
|
#[wasm_bindgen_test]
|
|
|
|
fn heading_element() {
|
|
|
|
let element = new_heading();
|
|
|
|
assert_eq!(element.align(), "", "Shouldn't have an align");
|
|
|
|
element.set_align("justify");
|
|
|
|
assert_eq!(element.align(), "justify", "Should have an align");
|
|
|
|
}
|