mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-12 12:31:22 +00:00
Fix web-sys Location
test
This commit is contained in:
@ -1,56 +1,60 @@
|
||||
use wasm_bindgen_test::*;
|
||||
use web_sys::Window;
|
||||
use web_sys::{self, Location};
|
||||
|
||||
fn location() -> Location {
|
||||
web_sys::window().unwrap().location()
|
||||
}
|
||||
|
||||
#[wasm_bindgen_test]
|
||||
fn href() {
|
||||
let loc = Window::location();
|
||||
let loc = location();
|
||||
loc.href().unwrap();
|
||||
}
|
||||
|
||||
#[wasm_bindgen_test]
|
||||
fn origin() {
|
||||
let loc = Window::location();
|
||||
let loc = location();
|
||||
loc.origin().unwrap();
|
||||
}
|
||||
|
||||
#[wasm_bindgen_test]
|
||||
fn protocol() {
|
||||
let loc = Window::location();
|
||||
let loc = location();
|
||||
loc.protocol().unwrap();
|
||||
}
|
||||
|
||||
#[wasm_bindgen_test]
|
||||
fn host() {
|
||||
let loc = Window::location();
|
||||
let loc = location();
|
||||
loc.host().unwrap();
|
||||
}
|
||||
|
||||
#[wasm_bindgen_test]
|
||||
fn hostname() {
|
||||
let loc = Window::location();
|
||||
let loc = location();
|
||||
loc.hostname().unwrap();
|
||||
}
|
||||
|
||||
#[wasm_bindgen_test]
|
||||
fn port() {
|
||||
let loc = Window::location();
|
||||
let loc = location();
|
||||
loc.port().unwrap();
|
||||
}
|
||||
|
||||
#[wasm_bindgen_test]
|
||||
fn pathname() {
|
||||
let loc = Window::location();
|
||||
let loc = location();
|
||||
loc.pathname().unwrap();
|
||||
}
|
||||
|
||||
#[wasm_bindgen_test]
|
||||
fn search() {
|
||||
let loc = Window::location();
|
||||
let loc = location();
|
||||
loc.search().unwrap();
|
||||
}
|
||||
|
||||
#[wasm_bindgen_test]
|
||||
fn hash() {
|
||||
let loc = Window::location();
|
||||
let loc = location();
|
||||
loc.hash().unwrap();
|
||||
}
|
||||
|
Reference in New Issue
Block a user