Commit 9d2aebf5 authored by Clark DuVall's avatar Clark DuVall Committed by Commit Bot

Fix appcache fuzzer crashing on DCHECK for browser_context

Bug: 1007607
Change-Id: If71e3b363fdcf191dac41da7f79c55aa917e9d52
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1827771
Commit-Queue: Clark DuVall <cduvall@chromium.org>
Commit-Queue: Marijn Kruisselbrink <mek@chromium.org>
Auto-Submit: Clark DuVall <cduvall@chromium.org>
Reviewed-by: default avatarMarijn Kruisselbrink <mek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#700430}
parent 4dfcf173
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include "content/browser/appcache/chrome_appcache_service.h" #include "content/browser/appcache/chrome_appcache_service.h"
#include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_task_traits.h"
#include "content/public/test/browser_task_environment.h" #include "content/public/test/browser_task_environment.h"
#include "content/public/test/test_browser_context.h"
#include "content/test/test_content_browser_client.h" #include "content/test/test_content_browser_client.h"
#include "content/test/test_content_client.h" #include "content/test/test_content_client.h"
#include "mojo/core/embedder/embedder.h" #include "mojo/core/embedder/embedder.h"
...@@ -47,11 +48,11 @@ struct Env { ...@@ -47,11 +48,11 @@ struct Env {
appcache_service = base::MakeRefCounted<ChromeAppCacheService>( appcache_service = base::MakeRefCounted<ChromeAppCacheService>(
/*proxy=*/nullptr, /*partition=*/nullptr); /*proxy=*/nullptr, /*partition=*/nullptr);
base::PostTask(FROM_HERE, {BrowserThread::UI}, base::PostTask(
base::BindOnce(&ChromeAppCacheService::Initialize, FROM_HERE, {BrowserThread::UI},
appcache_service, base::FilePath(), base::BindOnce(&ChromeAppCacheService::Initialize, appcache_service,
/*browser_context=*/nullptr, base::FilePath(), &test_browser_context,
/*special_storage_policy=*/nullptr)); /*special_storage_policy=*/nullptr));
task_environment.RunUntilIdle(); task_environment.RunUntilIdle();
} }
...@@ -59,6 +60,7 @@ struct Env { ...@@ -59,6 +60,7 @@ struct Env {
scoped_refptr<ChromeAppCacheService> appcache_service; scoped_refptr<ChromeAppCacheService> appcache_service;
std::unique_ptr<TestContentClient> test_content_client; std::unique_ptr<TestContentClient> test_content_client;
std::unique_ptr<TestContentBrowserClient> test_content_browser_client; std::unique_ptr<TestContentBrowserClient> test_content_browser_client;
TestBrowserContext test_browser_context;
// used by ICU integration. // used by ICU integration.
base::AtExitManager at_exit_manager; base::AtExitManager at_exit_manager;
......
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