Add CefTestServer that supports both HTTP and HTTPS (see issue #3348)

This commit is contained in:
Marshall Greenblatt
2022-07-29 12:34:30 -04:00
parent ce18bb98ab
commit f24dd61329
25 changed files with 2637 additions and 7 deletions

View File

@@ -592,5 +592,10 @@ patches = [
# https://chromium-review.googlesource.com/c/linux-syscall-support/+/3786946/
'name': 'linux_arm_1292951',
'path': 'third_party/lss',
},
{
# Fix deadlock in EmbeddedTestServer::ShutdownAndWaitUntilComplete.
# https://chromium-review.googlesource.com/c/chromium/src/+/3798752
'name': 'net_test_server_3798752'
}
]

View File

@@ -0,0 +1,22 @@
diff --git net/test/embedded_test_server/embedded_test_server.cc net/test/embedded_test_server/embedded_test_server.cc
index 01233b6c48eb3..d5f8e53a499b1 100644
--- net/test/embedded_test_server/embedded_test_server.cc
+++ net/test/embedded_test_server/embedded_test_server.cc
@@ -974,7 +974,7 @@ bool EmbeddedTestServer::PostTaskToIOThreadAndWait(base::OnceClosure closure) {
if (!base::CurrentThread::Get())
temporary_loop = std::make_unique<base::SingleThreadTaskExecutor>();
- base::RunLoop run_loop;
+ base::RunLoop run_loop(base::RunLoop::Type::kNestableTasksAllowed);
if (!io_thread_->task_runner()->PostTaskAndReply(
FROM_HERE, std::move(closure), run_loop.QuitClosure())) {
return false;
@@ -1001,7 +1001,7 @@ bool EmbeddedTestServer::PostTaskToIOThreadAndWaitWithResult(
if (!base::CurrentThread::Get())
temporary_loop = std::make_unique<base::SingleThreadTaskExecutor>();
- base::RunLoop run_loop;
+ base::RunLoop run_loop(base::RunLoop::Type::kNestableTasksAllowed);
bool task_result = false;
if (!base::PostTaskAndReplyWithResult(
io_thread_->task_runner().get(), FROM_HERE, std::move(task),