mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #7139 - samfoo:testable-net-load, r=jdm
Testable net load... *The goal of this PR is to get early feedback on this before I go too far down the rabbit hole. This new code path is working, and there's several tests I've written as a proof of concept. There are still some regressions that I'll be fixing in the coming days.* I've abstracted out the request/response cycle so that it's no longer dependent on the Hyper request/response structs. Since request/response @ hyper are structs, not traits, it made mocking them for tests impossible. Current issues/concerns: * This relies on boxing the `HttpResponse` that gets returned from the `HttpRequester` because `HttpResponse` is unsized. I don't know if there's a more idiomatic rust-y way of doing this? * This relies on boxing the `Read` that is now returned from `load` for the same reason. * The devtools and resource manager channels are still passed into `load`. It might be easier to inject these as trait dependencies instead of chans as well? * Needs more tests. 🎩 #6727 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7139) <!-- Reviewable:end -->
This commit is contained in:
commit
7dda183022
8 changed files with 1156 additions and 298 deletions
1
components/servo/Cargo.lock
generated
1
components/servo/Cargo.lock
generated
|
@ -1061,6 +1061,7 @@ name = "net_tests"
|
|||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"cookie 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"flate2 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ipc-channel 0.1.0 (git+https://github.com/pcwalton/ipc-channel)",
|
||||
"net 0.0.1",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue