| Index: content/public/test/test_browser_thread_bundle.cc
|
| diff --git a/content/public/test/test_browser_thread_bundle.cc b/content/public/test/test_browser_thread_bundle.cc
|
| index 9ddd800c3e54bb2f09e838a99823a2b7e92d3e2a..b2f65c08581a9f8079e789fa8892ba432ae078d8 100644
|
| --- a/content/public/test/test_browser_thread_bundle.cc
|
| +++ b/content/public/test/test_browser_thread_bundle.cc
|
| @@ -9,6 +9,10 @@
|
| #include "content/browser/browser_thread_impl.h"
|
| #include "content/public/test/test_browser_thread.h"
|
|
|
| +#if defined(OS_ANDROID)
|
| +#include "content/public/test/nested_message_pump_android.h"
|
| +#endif // OS_ANDROID
|
| +
|
| namespace content {
|
|
|
| TestBrowserThreadBundle::TestBrowserThreadBundle()
|
| @@ -57,10 +61,20 @@ void TestBrowserThreadBundle::Init() {
|
| CHECK(!(options_ & IO_MAINLOOP) || !(options_ & REAL_IO_THREAD));
|
| // There must be a thread to start to use DONT_START_THREADS
|
| CHECK((options_ & ~IO_MAINLOOP) != DONT_START_THREADS);
|
| + // MessageLoopForIO doesn't currently support custom message pumps.
|
| + CHECK(!(options_ & IO_MAINLOOP) || !(options_ & NESTED_JAVA_ON_ANDROID));
|
|
|
| if (options_ & IO_MAINLOOP) {
|
| message_loop_.reset(new base::MessageLoopForIO());
|
| - } else {
|
| + }
|
| +#if defined(OS_ANDROID)
|
| + else if (options_ & NESTED_JAVA_ON_ANDROID) {
|
| + message_loop_.reset(new base::MessageLoopForUI(
|
| + scoped_ptr<base::MessagePump>(new NestedMessagePumpAndroid())));
|
| + static_cast<base::MessageLoopForUI*>(message_loop_.get())->Start();
|
| + }
|
| +#endif // OS_ANDROID
|
| + else {
|
| message_loop_.reset(new base::MessageLoopForUI());
|
| }
|
|
|
|
|