mirror of
https://github.com/servo/servo.git
synced 2025-08-25 07:08:21 +01:00
Add timeline markers for HTTP requests, JS evaluation, and HTML parsing.
This commit is contained in:
parent
36df00ae96
commit
9e8cf19e51
19 changed files with 126 additions and 30 deletions
|
@ -14,6 +14,7 @@ net_traits = {path = "../../../components/net_traits"}
|
|||
util = {path = "../../../components/util"}
|
||||
msg = {path = "../../../components/msg"}
|
||||
plugins = {path = "../../../components/plugins"}
|
||||
profile_traits = {path = "../../../components/profile_traits"}
|
||||
devtools_traits = {path = "../../../components/devtools_traits"}
|
||||
ipc-channel = {git = "https://github.com/servo/ipc-channel"}
|
||||
cookie = "0.2"
|
||||
|
|
|
@ -13,6 +13,7 @@ extern crate ipc_channel;
|
|||
extern crate msg;
|
||||
extern crate net;
|
||||
extern crate net_traits;
|
||||
extern crate profile_traits;
|
||||
extern crate time;
|
||||
extern crate unicase;
|
||||
extern crate url;
|
||||
|
|
|
@ -6,6 +6,7 @@ use ipc_channel::ipc;
|
|||
use net::resource_thread::new_resource_thread;
|
||||
use net_traits::hosts::{parse_hostsfile, host_replacement};
|
||||
use net_traits::{ControlMsg, LoadData, LoadConsumer, LoadContext, NetworkError, ProgressMsg};
|
||||
use profile_traits::time::ProfilerChan;
|
||||
use std::borrow::ToOwned;
|
||||
use std::collections::HashMap;
|
||||
use std::net::IpAddr;
|
||||
|
@ -18,13 +19,15 @@ fn ip(s: &str) -> IpAddr {
|
|||
|
||||
#[test]
|
||||
fn test_exit() {
|
||||
let resource_thread = new_resource_thread("".to_owned(), None);
|
||||
let (tx, _rx) = ipc::channel().unwrap();
|
||||
let resource_thread = new_resource_thread("".to_owned(), None, ProfilerChan(tx));
|
||||
resource_thread.send(ControlMsg::Exit).unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_bad_scheme() {
|
||||
let resource_thread = new_resource_thread("".to_owned(), None);
|
||||
let (tx, _rx) = ipc::channel().unwrap();
|
||||
let resource_thread = new_resource_thread("".to_owned(), None, ProfilerChan(tx));
|
||||
let (start_chan, start) = ipc::channel().unwrap();
|
||||
let url = Url::parse("bogus://whatever").unwrap();
|
||||
resource_thread.send(ControlMsg::Load(LoadData::new(LoadContext::Browsing, url, None, None, None),
|
||||
|
@ -200,7 +203,8 @@ fn test_cancelled_listener() {
|
|||
}
|
||||
});
|
||||
|
||||
let resource_thread = new_resource_thread("".to_owned(), None);
|
||||
let (tx, _rx) = ipc::channel().unwrap();
|
||||
let resource_thread = new_resource_thread("".to_owned(), None, ProfilerChan(tx));
|
||||
let (sender, receiver) = ipc::channel().unwrap();
|
||||
let (id_sender, id_receiver) = ipc::channel().unwrap();
|
||||
let (sync_sender, sync_receiver) = ipc::channel().unwrap();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue