#include "chrome/enterprise_companion/url_loader_factory_provider.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/thread_pool.h"
#include "base/test/task_environment.h"
#include "build/build_config.h"
#include "chrome/enterprise_companion/ipc_support.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "services/network/public/mojom/url_loader_factory.mojom.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace enterprise_companion {
class URLLoaderFactoryProviderTest : public ::testing::Test { … };
#if BUILDFLAG(IS_MAC)
TEST_F(URLLoaderFactoryProviderTest, ProxyDisconnectHandler) {
mojo::PendingReceiver<network::mojom::URLLoaderFactory> receiver;
base::RunLoop run_loop;
base::SequenceBound<URLLoaderFactoryProvider> url_loader_factory_provider =
CreateUrlLoaderFactoryProviderProxy(
base::SequencedTaskRunner::GetCurrentDefault(),
receiver.InitWithNewPipeAndPassRemote(), run_loop.QuitClosure());
receiver.reset();
run_loop.Run();
}
#endif
TEST_F(URLLoaderFactoryProviderTest, StubDisconnectHandler) { … }
}