diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/net/fetch.rs | 9 | ||||
-rw-r--r-- | tests/unit/net/http_loader.rs | 10 |
2 files changed, 8 insertions, 11 deletions
diff --git a/tests/unit/net/fetch.rs b/tests/unit/net/fetch.rs index 217cc8ccee5..7f368516656 100644 --- a/tests/unit/net/fetch.rs +++ b/tests/unit/net/fetch.rs @@ -19,7 +19,7 @@ use hyper::server::{Handler, Listening, Server}; use hyper::server::{Request as HyperRequest, Response as HyperResponse}; use hyper::status::StatusCode; use hyper::uri::RequestUri; -use msg::constellation_msg::{PipelineId, ReferrerPolicy}; +use msg::constellation_msg::{ReferrerPolicy, TEST_PIPELINE_ID}; use net::fetch::cors_cache::CORSCache; use net::fetch::methods::{FetchContext, fetch, fetch_with_cors_cache}; use net::http_loader::HttpState; @@ -776,8 +776,7 @@ fn test_fetch_with_devtools() { let (mut server, url) = make_server(handler); let origin = Origin::Origin(url.origin()); - let pipeline_id = PipelineId::fake_root_pipeline_id(); - let request = Request::new(url.clone(), Some(origin), false, Some(pipeline_id)); + let request = Request::new(url.clone(), Some(origin), false, Some(TEST_PIPELINE_ID)); *request.referrer.borrow_mut() = Referrer::NoReferrer; let (devtools_chan, devtools_port) = channel::<DevtoolsControlMsg>(); @@ -815,7 +814,7 @@ fn test_fetch_with_devtools() { method: Method::Get, headers: headers, body: None, - pipeline_id: pipeline_id, + pipeline_id: TEST_PIPELINE_ID, startedDateTime: devhttprequest.startedDateTime, timeStamp: devhttprequest.timeStamp, connect_time: devhttprequest.connect_time, @@ -832,7 +831,7 @@ fn test_fetch_with_devtools() { headers: Some(response_headers), status: Some((200, b"OK".to_vec())), body: None, - pipeline_id: pipeline_id, + pipeline_id: TEST_PIPELINE_ID, }; assert_eq!(devhttprequest, httprequest); diff --git a/tests/unit/net/http_loader.rs b/tests/unit/net/http_loader.rs index e6545a9c818..aee43ac0e2b 100644 --- a/tests/unit/net/http_loader.rs +++ b/tests/unit/net/http_loader.rs @@ -18,7 +18,7 @@ use hyper::http::RawStatus; use hyper::method::Method; use hyper::mime::{Mime, SubLevel, TopLevel}; use hyper::status::StatusCode; -use msg::constellation_msg::{PipelineId, ReferrerPolicy}; +use msg::constellation_msg::{PipelineId, ReferrerPolicy, TEST_PIPELINE_ID}; use net::cookie::Cookie; use net::cookie_storage::CookieStorage; use net::hsts::HstsEntry; @@ -47,7 +47,7 @@ impl LoadOrigin for HttpTest { None } fn pipeline_id(&self) -> Option<PipelineId> { - Some(PipelineId::fake_root_pipeline_id()) + Some(TEST_PIPELINE_ID) } } @@ -472,8 +472,6 @@ fn test_request_and_response_data_with_network_messages() { let url = Url::parse("https://mozilla.com").unwrap(); let (devtools_chan, devtools_port) = mpsc::channel::<DevtoolsControlMsg>(); - // This will probably have to be changed as it uses fake_root_pipeline_id which is marked for removal. - let pipeline_id = PipelineId::fake_root_pipeline_id(); let mut load_data = LoadData::new(LoadContext::Browsing, url.clone(), &HttpTest); let mut request_headers = Headers::new(); request_headers.set(Host { hostname: "bar.foo".to_owned(), port: None }); @@ -521,7 +519,7 @@ fn test_request_and_response_data_with_network_messages() { method: Method::Get, headers: headers, body: None, - pipeline_id: pipeline_id, + pipeline_id: TEST_PIPELINE_ID, startedDateTime: devhttprequest.startedDateTime, timeStamp: devhttprequest.timeStamp, connect_time: devhttprequest.connect_time, @@ -538,7 +536,7 @@ fn test_request_and_response_data_with_network_messages() { headers: Some(response_headers), status: Some((200, b"OK".to_vec())), body: None, - pipeline_id: pipeline_id, + pipeline_id: TEST_PIPELINE_ID, }; assert_eq!(devhttprequest, httprequest); |