2022-10-18 03:20:35 +03:00
|
|
|
use std::path::PathBuf;
|
|
|
|
|
|
|
|
use common::{document_dom_visualizer, document_span_visualizer};
|
|
|
|
use swc_html_parser::parser::ParserConfig;
|
|
|
|
|
|
|
|
use crate::common::document_test;
|
|
|
|
|
|
|
|
#[path = "common/mod.rs"]
|
|
|
|
mod common;
|
|
|
|
|
|
|
|
#[testing::fixture("tests/iframe_srcdoc/**/*.html")]
|
|
|
|
fn pass_iframe_srcdoc(input: PathBuf) {
|
|
|
|
document_test(
|
|
|
|
input,
|
|
|
|
ParserConfig {
|
|
|
|
iframe_srcdoc: true,
|
|
|
|
..Default::default()
|
|
|
|
},
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
#[testing::fixture("tests/iframe_srcdoc/**/*.html")]
|
|
|
|
fn span_visualizer(input: PathBuf) {
|
2023-03-29 11:48:45 +03:00
|
|
|
document_span_visualizer(
|
|
|
|
input,
|
|
|
|
ParserConfig {
|
|
|
|
..Default::default()
|
|
|
|
},
|
|
|
|
false,
|
|
|
|
)
|
2022-10-18 03:20:35 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
#[testing::fixture("tests/iframe_srcdoc/**/*.html")]
|
|
|
|
fn dom_visualizer(input: PathBuf) {
|
2023-03-29 11:48:45 +03:00
|
|
|
document_dom_visualizer(
|
|
|
|
input,
|
|
|
|
ParserConfig {
|
|
|
|
..Default::default()
|
|
|
|
},
|
|
|
|
)
|
2022-10-18 03:20:35 +03:00
|
|
|
}
|