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

Unified Diff: components/autofill/content/browser/wallet/wallet_signin_helper_unittest.cc

Issue 17465003: Fix most tests in //components/autofill/content to not depend on //chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove IO thread, seems not needed. Created 7 years, 6 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: components/autofill/content/browser/wallet/wallet_signin_helper_unittest.cc
diff --git a/components/autofill/content/browser/wallet/wallet_signin_helper_unittest.cc b/components/autofill/content/browser/wallet/wallet_signin_helper_unittest.cc
index c768151d3d609f7892f6bf893813fbb3571b0cd3..4014d9603029ece321393142ae42c2402f2d4c3a 100644
--- a/components/autofill/content/browser/wallet/wallet_signin_helper_unittest.cc
+++ b/components/autofill/content/browser/wallet/wallet_signin_helper_unittest.cc
@@ -7,9 +7,9 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/strings/stringprintf.h"
-#include "chrome/test/base/testing_profile.h"
#include "components/autofill/content/browser/wallet/wallet_service_url.h"
#include "components/autofill/content/browser/wallet/wallet_signin_helper_delegate.h"
+#include "content/public/test/test_browser_context.h"
#include "content/public/test/test_browser_thread.h"
#include "google_apis/gaia/gaia_constants.h"
#include "google_apis/gaia/gaia_urls.h"
@@ -75,21 +75,17 @@ class WalletSigninHelperForTesting : public WalletSigninHelper {
class WalletSigninHelperTest : public testing::Test {
public:
- WalletSigninHelperTest() : io_thread_(content::BrowserThread::IO) {}
+ WalletSigninHelperTest() {}
virtual void SetUp() OVERRIDE {
- io_thread_.StartIOThread();
- profile_.CreateRequestContext();
signin_helper_.reset(new WalletSigninHelperForTesting(
&mock_delegate_,
- profile_.GetRequestContext()));
+ browser_context_.GetRequestContext()));
EXPECT_EQ(WalletSigninHelperForTesting::IDLE, state());
}
virtual void TearDown() OVERRIDE {
signin_helper_.reset();
- profile_.ResetRequestContext();
- io_thread_.Stop();
}
protected:
@@ -180,10 +176,8 @@ class WalletSigninHelperTest : public testing::Test {
MockWalletSigninHelperDelegate mock_delegate_;
private:
- // The profile's request context must be released on the IO thread.
- content::TestBrowserThread io_thread_;
net::TestURLFetcherFactory factory_;
- TestingProfile profile_;
+ content::TestBrowserContext browser_context_;
};
TEST_F(WalletSigninHelperTest, PassiveSigninSuccessful) {

Powered by Google App Engine
This is Rietveld 408576698