mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Remove the url! plugin.
In rust-url 1.0 the `Url` struct is going to have private fields, and there is no way to to create an aribitrary one without going through the parser. The plugin never had a clear demonstrated performance benefit, it was made mostly because it was possible and relatively easy at the time.
This commit is contained in:
parent
87d5424d4d
commit
6889f37d9e
27 changed files with 84 additions and 296 deletions
|
@ -21,7 +21,7 @@ fn test_exit() {
|
|||
fn test_bad_scheme() {
|
||||
let resource_thread = new_resource_thread("".to_owned(), None);
|
||||
let (start_chan, start) = ipc::channel().unwrap();
|
||||
let url = url!("bogus://whatever");
|
||||
let url = Url::parse("bogus://whatever").unwrap();
|
||||
resource_thread.send(ControlMsg::Load(LoadData::new(LoadContext::Browsing, url, None),
|
||||
LoadConsumer::Channel(start_chan), None)).unwrap();
|
||||
let response = start.recv().unwrap();
|
||||
|
@ -156,13 +156,13 @@ fn test_replace_hosts() {
|
|||
host_table.insert("foo.bar.com".to_owned(), "127.0.0.1".to_owned());
|
||||
host_table.insert("servo.test.server".to_owned(), "127.0.0.2".to_owned());
|
||||
|
||||
let url = url!("http://foo.bar.com:8000/foo");
|
||||
let url = Url::parse("http://foo.bar.com:8000/foo").unwrap();
|
||||
assert_eq!(host_replacement(&host_table, &url).domain().unwrap(), "127.0.0.1");
|
||||
|
||||
let url = url!("http://servo.test.server");
|
||||
let url = Url::parse("http://servo.test.server").unwrap();
|
||||
assert_eq!(host_replacement(&host_table, &url).domain().unwrap(), "127.0.0.2");
|
||||
|
||||
let url = url!("http://a.foo.bar.com");
|
||||
let url = Url::parse("http://a.foo.bar.com").unwrap();
|
||||
assert_eq!(host_replacement(&host_table, &url).domain().unwrap(), "a.foo.bar.com");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue