2018-07-30 18:14:50 +03:00
|
|
|
use wasm_bindgen::prelude::*;
|
2018-09-26 18:26:00 +03:00
|
|
|
use wasm_bindgen_test::*;
|
2018-07-30 18:14:50 +03:00
|
|
|
use web_sys::HtmlDivElement;
|
|
|
|
|
|
|
|
#[wasm_bindgen(module = "./tests/wasm/element.js")]
|
2018-09-26 18:26:00 +03:00
|
|
|
extern "C" {
|
2018-07-30 21:10:48 +03:00
|
|
|
fn new_div() -> HtmlDivElement;
|
2018-07-30 18:14:50 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
#[wasm_bindgen_test]
|
|
|
|
fn test_div_element() {
|
2018-07-30 21:10:48 +03:00
|
|
|
let element = new_div();
|
2018-07-30 18:14:50 +03:00
|
|
|
assert_eq!(element.align(), "", "Shouldn't have a align");
|
|
|
|
element.set_align("right");
|
|
|
|
assert_eq!(element.align(), "right", "Should have a align");
|
|
|
|
}
|