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

Unified Diff: chrome/browser/search/iframe_source_unittest.cc

Issue 17127002: Correctly integrate StoragePartition into TestingProfile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix InstantNTP test. 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
Index: chrome/browser/search/iframe_source_unittest.cc
diff --git a/chrome/browser/search/iframe_source_unittest.cc b/chrome/browser/search/iframe_source_unittest.cc
index 0dfee16ab9c10182f50cb385aaf949b3c5243b9c..38cbba9c515394a526c6cee1ab096f27461ac046 100644
--- a/chrome/browser/search/iframe_source_unittest.cc
+++ b/chrome/browser/search/iframe_source_unittest.cc
@@ -12,10 +12,11 @@
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/resource_request_info.h"
#include "content/public/test/mock_resource_context.h"
-#include "content/public/test/test_browser_thread.h"
+#include "content/public/test/test_browser_thread_bundle.h"
#include "grit/browser_resources.h"
#include "net/url_request/url_request.h"
#include "net/url_request/url_request_context.h"
+#include "net/url_request/url_request_test_util.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
@@ -73,11 +74,10 @@ class IframeSourceTest : public testing::Test {
// else happen on the IO thread. This setup is a hacky way to satisfy all
// those constraints.
IframeSourceTest()
- : message_loop_(base::MessageLoop::TYPE_IO),
- ui_thread_(content::BrowserThread::UI, &message_loop_),
- io_thread_(content::BrowserThread::IO, &message_loop_),
- instant_io_context_(NULL),
- response_(NULL) {
+ : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
+ resource_context_(&test_url_request_context_),
+ instant_io_context_(NULL),
+ response_(NULL) {
}
TestIframeSource* source() { return source_.get(); }
@@ -121,7 +121,7 @@ class IframeSourceTest : public testing::Test {
}
private:
- virtual void SetUp() {
+ virtual void SetUp() OVERRIDE {
source_.reset(new TestIframeSource());
callback_ = base::Bind(&IframeSourceTest::SaveResponse,
base::Unretained(this));
@@ -140,10 +140,9 @@ class IframeSourceTest : public testing::Test {
response_ = data;
}
- base::MessageLoop message_loop_;
- content::TestBrowserThread ui_thread_;
- content::TestBrowserThread io_thread_;
+ content::TestBrowserThreadBundle thread_bundle_;
+ net::TestURLRequestContext test_url_request_context_;
content::MockResourceContext resource_context_;
scoped_ptr<TestIframeSource> source_;
content::URLDataSource::GotDataCallback callback_;

Powered by Google App Engine
This is Rietveld 408576698