Skip to content

Commit

Permalink
fix(ci): fix running benchmarks (#1281)
Browse files Browse the repository at this point in the history
Signed-off-by: rhysd <[email protected]>
  • Loading branch information
rhysd authored Jun 1, 2024
1 parent 4c42a03 commit a4d553a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions bench/tests/src/hello_world.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,15 @@ fn main() -> wry::Result<()> {
let event_loop = EventLoop::new();
let window = WindowBuilder::new().build(&event_loop).unwrap();

let url = r#"data:text/html,
let html = r#"
<!DOCTYPE html>
<body>
<script>
document.addEventListener('DOMContentLoaded', () => {
ipc.postMessage('dom-loaded')
})
</script>
</body>
"#;

let handler = |req: Request<String>| {
Expand Down Expand Up @@ -56,7 +59,7 @@ fn main() -> wry::Result<()> {
let vbox = window.default_vbox().unwrap();
WebViewBuilder::new_gtk(vbox)
};
let _webview = builder.with_url(url).with_ipc_handler(handler).build()?;
let _webview = builder.with_html(html).with_ipc_handler(handler).build()?;

event_loop.run(move |event, _, control_flow| {
*control_flow = ControlFlow::Wait;
Expand Down

0 comments on commit a4d553a

Please sign in to comment.