mirror of
https://github.com/servo/servo.git
synced 2025-09-30 08:39:16 +01:00
Implement 'url!(..)' macro
https://github.com/servo/rust-url/issues/136 https://github.com/servo/rust-url/pull/137
This commit is contained in:
parent
0146751bb2
commit
f34da4120d
30 changed files with 346 additions and 128 deletions
|
@ -9,7 +9,6 @@ use std::sync::Arc;
|
|||
use string_cache::Atom;
|
||||
use style::properties::{PropertyDeclaration, PropertyDeclarationBlock, DeclaredValue, longhands};
|
||||
use style::stylesheets::{CSSRule, StyleRule, Origin, Stylesheet};
|
||||
use url::Url;
|
||||
|
||||
|
||||
#[test]
|
||||
|
@ -21,7 +20,7 @@ fn test_parse_stylesheet() {
|
|||
html , body /**/ { display: block; }
|
||||
#d1 > .ok { background: blue; }
|
||||
";
|
||||
let url = Url::parse("about::test").unwrap();
|
||||
let url = url!("about::test");
|
||||
let stylesheet = Stylesheet::from_str(css, url, Origin::UserAgent);
|
||||
assert_eq!(stylesheet, Stylesheet {
|
||||
origin: Origin::UserAgent,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue