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

Unified Diff: chrome/browser/ui/sync/one_click_signin_helper_unittest.cc

Issue 14197014: Add TestBrowserThreadBundle into RenderViewHostTestHarness. Kill some unnecessary real threads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged ToT 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: chrome/browser/ui/sync/one_click_signin_helper_unittest.cc
diff --git a/chrome/browser/ui/sync/one_click_signin_helper_unittest.cc b/chrome/browser/ui/sync/one_click_signin_helper_unittest.cc
index 2d1537d5af9c15f1f2e2ceaadc8ff03cb45d7a3e..8088bc35c417855852f748807c73146a71085419 100644
--- a/chrome/browser/ui/sync/one_click_signin_helper_unittest.cc
+++ b/chrome/browser/ui/sync/one_click_signin_helper_unittest.cc
@@ -30,7 +30,6 @@
#include "content/public/common/password_form.h"
#include "content/public/common/url_constants.h"
#include "content/public/test/mock_render_process_host.h"
-#include "content/public/test/test_browser_thread.h"
#include "content/public/test/test_renderer_host.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -227,9 +226,6 @@ class OneClickSigninHelperTest : public content::RenderViewHostTestHarness {
TestingProfile* profile_;
private:
- // Members to fake that we are on the UI thread.
- content::TestBrowserThread ui_thread_;
-
// The ID of the signin process the test will assume to be trusted.
// By default, set to the test RenderProcessHost's process ID, but
// overridden by SetTrustedSigninProcessID.
@@ -240,7 +236,6 @@ class OneClickSigninHelperTest : public content::RenderViewHostTestHarness {
OneClickSigninHelperTest::OneClickSigninHelperTest()
: profile_(NULL),
- ui_thread_(content::BrowserThread::UI, &message_loop_),
trusted_signin_process_id_(-1) {
}
@@ -334,7 +329,6 @@ void OneClickSigninHelperTest::SubmitGAIAPassword(
class OneClickSigninHelperIOTest : public OneClickSigninHelperTest {
public:
OneClickSigninHelperIOTest();
- virtual ~OneClickSigninHelperIOTest();
virtual void SetUp() OVERRIDE;
@@ -346,23 +340,13 @@ class OneClickSigninHelperIOTest : public OneClickSigninHelperTest {
const GURL valid_gaia_url_;
private:
- content::TestBrowserThread db_thread_;
- content::TestBrowserThread fub_thread_;
- content::TestBrowserThread io_thread_;
-
DISALLOW_COPY_AND_ASSIGN(OneClickSigninHelperIOTest);
};
OneClickSigninHelperIOTest::OneClickSigninHelperIOTest()
: testing_profile_manager_(
TestingBrowserProcess::GetGlobal()),
- valid_gaia_url_("https://accounts.google.com/"),
- db_thread_(content::BrowserThread::DB, &message_loop_),
- fub_thread_(content::BrowserThread::FILE_USER_BLOCKING, &message_loop_),
- io_thread_(content::BrowserThread::IO, &message_loop_) {
-}
-
-OneClickSigninHelperIOTest::~OneClickSigninHelperIOTest() {
+ valid_gaia_url_("https://accounts.google.com/") {
}
void OneClickSigninHelperIOTest::SetUp() {
@@ -667,6 +651,7 @@ TEST_F(OneClickSigninHelperTest, SigninFromWebstoreWithConfigSyncfirst) {
OneClickSigninHelper::CreateForWebContents(contents);
OneClickSigninHelper* helper =
OneClickSigninHelper::FromWebContents(contents);
+ helper->SetDoNotClearPendingEmailForTesting();
GURL continueUrl("https://chrome.google.com/webstore?source=5");
OneClickSigninHelper::ShowInfoBarUIThread(
« no previous file with comments | « chrome/browser/ui/sync/one_click_signin_helper.cc ('k') | chrome/browser/ui/tabs/tab_strip_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698