Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(326)

Unified Diff: content/browser/devtools/shared_worker_devtools_manager_unittest.cc

Issue 1864583006: Simplify BrowserContext by removing redundant methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/devtools/shared_worker_devtools_manager_unittest.cc
diff --git a/content/browser/devtools/shared_worker_devtools_manager_unittest.cc b/content/browser/devtools/shared_worker_devtools_manager_unittest.cc
index 9ea0926858cc5c7e933cad8ed66dbfac332c6669..c9c299e8e4d2b433ce3fa385c8cbebd9b923cafa 100644
--- a/content/browser/devtools/shared_worker_devtools_manager_unittest.cc
+++ b/content/browser/devtools/shared_worker_devtools_manager_unittest.cc
@@ -9,14 +9,16 @@
#include <memory>
#include "base/macros.h"
-#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "content/browser/browser_thread_impl.h"
#include "content/browser/devtools/devtools_agent_host_impl.h"
#include "content/browser/devtools/shared_worker_devtools_agent_host.h"
#include "content/browser/shared_worker/shared_worker_instance.h"
#include "content/browser/shared_worker/worker_storage_partition.h"
+#include "content/public/browser/browser_context.h"
+#include "content/public/browser/storage_partition.h"
#include "content/public/test/test_browser_context.h"
+#include "content/public/test/test_browser_thread_bundle.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace content {
@@ -48,17 +50,18 @@ class SharedWorkerDevToolsManagerTest : public testing::Test {
typedef SharedWorkerDevToolsAgentHost::WorkerState WorkerState;
SharedWorkerDevToolsManagerTest()
- : ui_thread_(BrowserThread::UI, &message_loop_),
+ : browser_thread_bundle_(TestBrowserThreadBundle::IO_MAINLOOP),
browser_context_(new TestBrowserContext()),
- partition_(
- new WorkerStoragePartition(browser_context_->GetRequestContext(),
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL)),
+ partition_(new WorkerStoragePartition(
+ BrowserContext::GetDefaultStoragePartition(browser_context_.get())->
+ GetURLRequestContext(),
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL)),
partition_id_(*partition_.get()) {}
protected:
@@ -90,8 +93,7 @@ class SharedWorkerDevToolsManagerTest : public testing::Test {
EXPECT_EQ(size, manager_->workers_.size());
}
- base::MessageLoopForIO message_loop_;
- BrowserThreadImpl ui_thread_;
+ TestBrowserThreadBundle browser_thread_bundle_;
std::unique_ptr<TestBrowserContext> browser_context_;
std::unique_ptr<WorkerStoragePartition> partition_;
const WorkerStoragePartitionId partition_id_;

Powered by Google App Engine
This is Rietveld 408576698