Commit 58506c58 authored by Kenichi Ishibashi's avatar Kenichi Ishibashi Committed by Commit Bot

S13nServiceWorker: Fix some SharedWorkerHostTests

Pass a mock URLLoaderFactoryPtrInfo to URLLoaderFactoryBundleInfo
as SharedWorkerHost requires the default loader factory when
S13nServiceWorker is on.

Bug: 891997
Cq-Include-Trybots: luci.chromium.try:linux_mojo
Change-Id: Id656e2fe26fd44a25b6b367bb401553201d4b17a
Reviewed-on: https://chromium-review.googlesource.com/c/1260783
Commit-Queue: Kenichi Ishibashi <bashi@chromium.org>
Reviewed-by: default avatarHiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/master@{#596499}
parent 3029f607
...@@ -147,7 +147,16 @@ class SharedWorkerHostTest : public testing::Test { ...@@ -147,7 +147,16 @@ class SharedWorkerHostTest : public testing::Test {
mojo::MakeStrongAssociatedBinding( mojo::MakeStrongAssociatedBinding(
std::make_unique<NotImplementedNetworkURLLoaderFactory>(), std::make_unique<NotImplementedNetworkURLLoaderFactory>(),
mojo::MakeRequest(&main_script_loader_factory)); mojo::MakeRequest(&main_script_loader_factory));
subresource_loader_factories.reset(new URLLoaderFactoryBundleInfo());
network::mojom::URLLoaderFactoryPtr default_factory_ptr;
mojo::MakeStrongBinding(
std::make_unique<NotImplementedNetworkURLLoaderFactory>(),
mojo::MakeRequest(&default_factory_ptr));
subresource_loader_factories.reset(new URLLoaderFactoryBundleInfo(
default_factory_ptr.PassInterface(),
URLLoaderFactoryBundleInfo::SchemeMap(),
URLLoaderFactoryBundleInfo::OriginMap(),
true /* bypass_redirect_checks */));
} }
host->Start(std::move(factory), std::move(provider_info), host->Start(std::move(factory), std::move(provider_info),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment