make protocol handlers registrable (#33104)

Signed-off-by: webbeef <me@webbeef.org>
This commit is contained in:
webbeef 2024-08-21 21:11:16 -07:00 committed by GitHub
parent 562d32c051
commit 663a92a5df
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 516 additions and 219 deletions

View file

@ -27,6 +27,7 @@ use net::fetch::cors_cache::CorsCache;
use net::fetch::methods::{self, CancellationListener, FetchContext};
use net::filemanager_thread::FileManager;
use net::hsts::HstsEntry;
use net::protocols::ProtocolRegistry;
use net::resource_thread::CoreResourceThreadPool;
use net::test::HttpState;
use net_traits::filemanager_thread::FileTokenCheck;
@ -769,6 +770,7 @@ fn test_fetch_with_hsts() {
timing: ServoArc::new(Mutex::new(ResourceFetchTiming::new(
ResourceTimingType::Navigation,
))),
protocols: Arc::new(ProtocolRegistry::default()),
};
// The server certificate is self-signed, so we need to add an override
@ -828,6 +830,7 @@ fn test_load_adds_host_to_hsts_list_when_url_is_https() {
timing: ServoArc::new(Mutex::new(ResourceFetchTiming::new(
ResourceTimingType::Navigation,
))),
protocols: Arc::new(ProtocolRegistry::default()),
};
// The server certificate is self-signed, so we need to add an override
@ -885,6 +888,7 @@ fn test_fetch_self_signed() {
timing: ServoArc::new(Mutex::new(ResourceFetchTiming::new(
ResourceTimingType::Navigation,
))),
protocols: Arc::new(ProtocolRegistry::default()),
};
let mut request = RequestBuilder::new(url.clone(), Referrer::NoReferrer)