browser_tester 1.5.0

Deterministic lightweight browser runtime for Rust tests
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use super::*;

#[test]
fn assigning_window_open_fallback_does_not_fail_harness_from_html() -> Result<()> {
    let html = r#"
        <div id='x'>ok</div>
        <script>
          window.open = window.open || function(){};
        </script>
        "#;

    let h = Harness::from_html(html)?;
    h.assert_text("#x", "ok")?;
    Ok(())
}