chrome: Support client-created request contexts (see issue #2969)

RequestContextTest and URLRequestTest suites now pass with the Chrome runtime
enabled.
This commit is contained in:
Marshall Greenblatt
2021-04-06 18:09:45 -04:00
parent 1cddbeb12f
commit 09fa22898d
23 changed files with 279 additions and 74 deletions

View File

@@ -26,9 +26,8 @@ ExtensionTestHandler::ExtensionTestHandler(
ExtensionTestHandler::~ExtensionTestHandler() {
if (!request_context_temp_dir_.IsEmpty()) {
// Delete temporary directories on shutdown.
CefTestSuite::GetInstance()->RegisterTempDirectory(
request_context_temp_dir_.Take());
// Temporary directory will be deleted on shutdown.
request_context_temp_dir_.Take();
}
}
@@ -65,7 +64,8 @@ void ExtensionTestHandler::RunTest() {
if (request_context_on_disk()) {
// Create a new temporary directory.
EXPECT_TRUE(request_context_temp_dir_.CreateUniqueTempDir());
EXPECT_TRUE(request_context_temp_dir_.CreateUniqueTempDirUnderPath(
CefTestSuite::GetInstance()->root_cache_path()));
CefString(&settings.cache_path) = request_context_temp_dir_.GetPath();
}