fix window creation
This commit is contained in:
parent
a95a8a3c78
commit
347dd0aca7
3 changed files with 53 additions and 12 deletions
|
@ -185,7 +185,7 @@ fn main() {
|
|||
InteractiveTest(name="notification::show_notification",test=notification::show_notification())
|
||||
InteractiveTest(name="global_shortcut::register_all",test=global_shortcut::register_all())
|
||||
|
||||
// Test(name="window::WebviewWindow::new",test=window::create_window())
|
||||
Test(name="window::WebviewWindow::new",test=window::create_window())
|
||||
|
||||
Terminate
|
||||
// }
|
||||
|
|
|
@ -2,10 +2,12 @@ use anyhow::ensure;
|
|||
use tauri_sys::window;
|
||||
|
||||
pub async fn create_window() -> anyhow::Result<()> {
|
||||
let win = window::WebviewWindowBuilder::new("foo").build()?;
|
||||
let win = window::WebviewWindowBuilder::new("foo-win")
|
||||
.set_url("/")
|
||||
.build()
|
||||
.await?;
|
||||
|
||||
ensure!(win.is_visible().await?);
|
||||
// ensure!(win.label() == "foo".to_string());
|
||||
|
||||
win.close().await?;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue