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

Unified Diff: chrome/browser/google_apis/gdata_wapi_requests_unittest.cc

Issue 18659002: Remove use of TestBrowserThreadBundle from unit tests in c/b/google_apis. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
« no previous file with comments | « chrome/browser/google_apis/drive_api_requests_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/google_apis/gdata_wapi_requests_unittest.cc
diff --git a/chrome/browser/google_apis/gdata_wapi_requests_unittest.cc b/chrome/browser/google_apis/gdata_wapi_requests_unittest.cc
index 39302aca4d36c68a7447eedd22363ac8d9e51fd8..09db71d6aabf48543797eb12960724860d3477ef 100644
--- a/chrome/browser/google_apis/gdata_wapi_requests_unittest.cc
+++ b/chrome/browser/google_apis/gdata_wapi_requests_unittest.cc
@@ -11,6 +11,7 @@
#include "base/files/scoped_temp_dir.h"
#include "base/json/json_reader.h"
#include "base/json/json_writer.h"
+#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
@@ -22,8 +23,6 @@
#include "chrome/browser/google_apis/request_sender.h"
#include "chrome/browser/google_apis/test_util.h"
#include "chrome/test/base/testing_profile.h"
-#include "content/public/browser/browser_thread.h"
-#include "content/public/test/test_browser_thread_bundle.h"
#include "net/base/escape.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "net/test/embedded_test_server/http_request.h"
@@ -43,17 +42,14 @@ const char kTestDownloadPathPrefix[] = "/download/";
class GDataWapiRequestsTest : public testing::Test {
public:
GDataWapiRequestsTest()
- : thread_bundle_(content::TestBrowserThreadBundle::REAL_IO_THREAD),
- test_server_(content::BrowserThread::GetMessageLoopProxyForThread(
- content::BrowserThread::IO)) {
+ : test_server_(message_loop_.message_loop_proxy()) {
}
virtual void SetUp() OVERRIDE {
profile_.reset(new TestingProfile);
request_context_getter_ = new net::TestURLRequestContextGetter(
- content::BrowserThread::GetMessageLoopProxyForThread(
- content::BrowserThread::IO));
+ message_loop_.message_loop_proxy());
request_sender_.reset(new RequestSender(profile_.get(),
request_context_getter_.get(),
@@ -334,7 +330,7 @@ class GDataWapiRequestsTest : public testing::Test {
return response.PassAs<net::test_server::HttpResponse>();
}
- content::TestBrowserThreadBundle thread_bundle_;
+ base::MessageLoopForIO message_loop_; // Test server needs IO thread.
net::test_server::EmbeddedTestServer test_server_;
scoped_ptr<TestingProfile> profile_;
scoped_ptr<RequestSender> request_sender_;
« no previous file with comments | « chrome/browser/google_apis/drive_api_requests_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698