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

Unified Diff: blimp/client/core/blimp_client_context_impl_unittest.cc

Issue 2190753002: Add network setup code to BlimpClientContextImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@split-blimp-client-session
Patch Set: Changed to get a SingleThreadTaskRunner in constructor Created 4 years, 5 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: blimp/client/core/blimp_client_context_impl_unittest.cc
diff --git a/blimp/client/core/blimp_client_context_impl_unittest.cc b/blimp/client/core/blimp_client_context_impl_unittest.cc
index e37dee7241e7fe84ae843e63c06112541b576964..dc5fbde3b3348bf6e7aa00703d0bd03b9c46dcf1 100644
--- a/blimp/client/core/blimp_client_context_impl_unittest.cc
+++ b/blimp/client/core/blimp_client_context_impl_unittest.cc
@@ -4,6 +4,8 @@
#include "blimp/client/core/blimp_client_context_impl.h"
+#include "base/message_loop/message_loop.h"
+#include "base/threading/thread.h"
#include "blimp/client/public/blimp_client_context_delegate.h"
#include "blimp/client/public/contents/blimp_contents.h"
#include "blimp/client/test/test_blimp_client_context_delegate.h"
@@ -14,7 +16,15 @@ namespace client {
namespace {
TEST(BlimpClientContextImpl, CreatedBlimpContentsGetsHelpersAttached) {
- BlimpClientContextImpl blimp_client_context;
+ base::MessageLoop message_loop;
+
+ // Start IO thread.
+ base::Thread io_thread("BlimpTestIO");
+ base::Thread::Options options;
+ options.message_loop_type = base::MessageLoop::TYPE_IO;
+ io_thread.StartWithOptions(options);
+
+ BlimpClientContextImpl blimp_client_context(io_thread.task_runner());
TestBlimpClientContextDelegate delegate;
blimp_client_context.SetDelegate(&delegate);

Powered by Google App Engine
This is Rietveld 408576698