| 781 | |
| 782 | #[test] |
| 783 | fn extra_css() { |
| 784 | let html = html!("h1 {background-color: blue;}", "<h1>Hello world!</h1>"); |
| 785 | let options = InlineOptions { |
| 786 | inline_style_tags: false, |
| 787 | extra_css: Some("h1 {background-color: green;}".into()), |
| 788 | ..Default::default() |
| 789 | }; |
| 790 | let inliner = CSSInliner::new(options); |
| 791 | let result = inliner.inline(&html).unwrap(); |
| 792 | assert_eq!( |
| 793 | result, |
| 794 | "<html><head></head><body><h1 style=\"background-color: green;\">Hello world!</h1></body></html>" |
| 795 | ) |
| 796 | } |
| 797 | |
| 798 | #[test] |
| 799 | fn remote_file_stylesheet() { |