aboutsummaryrefslogtreecommitdiffstats
path: root/components/net/tests/resource_thread.rs
diff options
context:
space:
mode:
authorOJ Kwon <kwon.ohjoong@gmail.com>2018-03-30 12:15:57 -0700
committerOJ Kwon <kwon.ohjoong@gmail.com>2018-04-27 12:22:38 -0700
commitc4c0d263e9aa4c4301f3a1499b5d4aa84e51436f (patch)
tree664620758a4200bf2a0c3550595a563bb4a5d7f4 /components/net/tests/resource_thread.rs
parentf69b12444471937245bdde0dc54782e7296dc1ae (diff)
downloadservo-c4c0d263e9aa4c4301f3a1499b5d4aa84e51436f.tar.gz
servo-c4c0d263e9aa4c4301f3a1499b5d4aa84e51436f.zip
test(net): update test cases
Diffstat (limited to 'components/net/tests/resource_thread.rs')
-rw-r--r--components/net/tests/resource_thread.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/components/net/tests/resource_thread.rs b/components/net/tests/resource_thread.rs
index adf1e305698..1e6c52378d9 100644
--- a/components/net/tests/resource_thread.rs
+++ b/components/net/tests/resource_thread.rs
@@ -8,7 +8,9 @@ use net::test::parse_hostsfile;
use net_traits::CoreResourceMsg;
use profile_traits::mem::ProfilerChan as MemProfilerChan;
use profile_traits::time::ProfilerChan;
+use script_traits::ConstellationMsg;
use std::net::IpAddr;
+use std::sync::mpsc::channel;
fn ip(s: &str) -> IpAddr {
s.parse().unwrap()
@@ -18,9 +20,12 @@ fn ip(s: &str) -> IpAddr {
fn test_exit() {
let (tx, _rx) = ipc::channel().unwrap();
let (mtx, _mrx) = ipc::channel().unwrap();
+ let (constellation, _) = channel();
let (sender, receiver) = ipc::channel().unwrap();
- let (resource_thread, _private_resource_thread) = new_core_resource_thread(
+ let (resource_thread, _private_resource_thread, constellation_sender) = new_core_resource_thread(
"".into(), None, ProfilerChan(tx), MemProfilerChan(mtx), None);
+ constellation_sender.send(constellation.clone()).unwrap();
+ let _ = constellation.send(ConstellationMsg::Exit);
resource_thread.send(CoreResourceMsg::Exit(sender)).unwrap();
receiver.recv().unwrap();
}