diff --git a/test/content/api.jl b/test/content/api.jl index 976e945..d561df7 100644 --- a/test/content/api.jl +++ b/test/content/api.jl @@ -3,15 +3,15 @@ using Base.Test @testset "content! Tests" begin w = Window(Blink.@d(:show => false)); sleep(5.0) - body!(w, ""); sleep(1.0) # body! is not synchronous. + body!(w, "", async=false); @test (@js w document.querySelector("body").innerHTML) == "" # Test reloading body and a selector element. html = """
hi world
bye
""" - body!(w, html); sleep(1.0) + body!(w, html, async=false); @test (@js w document.getElementById("a").innerHTML) == "hi world" @test (@js w document.getElementById("b").innerHTML) == "bye" - content!(w, "div", "hello world"); sleep(1.0) + content!(w, "div", "hello world", async=false); @test (@js w document.getElementById("a").innerHTML) == "hello world" # TODO(nhdaly): Is this right? Should content!(w,"div",...) change _all_ divs? @test (@js w document.getElementById("b").innerHTML) == "bye" @@ -22,14 +22,14 @@ using Base.Test # Must create a new window to ensure javascript is reset. w = Window(Blink.@d(:show => false)); sleep(5.0) - body!(w, fadeTestHtml; fade=true); sleep(1.0) + body!(w, fadeTestHtml; fade=true, async=false); @test (@js w testJS) == "test" end @testset "Fade False" begin # Must create a new window to ensure javascript is reset. w = Window(Blink.@d(:show => false)); sleep(5.0) - body!(w, fadeTestHtml; fade=false); sleep(1.0) + body!(w, fadeTestHtml; fade=false, async=false); @test (@js w testJS) == "test" end end