OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/utf_string_conversions.h" | 6 #include "base/utf_string_conversions.h" |
7 #include "chrome/browser/content_settings/cookie_settings.h" | 7 #include "chrome/browser/content_settings/cookie_settings.h" |
8 #include "chrome/browser/prefs/pref_service.h" | 8 #include "chrome/browser/prefs/pref_service.h" |
9 #include "chrome/browser/prefs/scoped_user_pref_update.h" | 9 #include "chrome/browser/prefs/scoped_user_pref_update.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 private: | 283 private: |
284 content::TestBrowserThread db_thread_; | 284 content::TestBrowserThread db_thread_; |
285 content::TestBrowserThread fub_thread_; | 285 content::TestBrowserThread fub_thread_; |
286 content::TestBrowserThread io_thread_; | 286 content::TestBrowserThread io_thread_; |
287 | 287 |
288 DISALLOW_COPY_AND_ASSIGN(OneClickSigninHelperIOTest); | 288 DISALLOW_COPY_AND_ASSIGN(OneClickSigninHelperIOTest); |
289 }; | 289 }; |
290 | 290 |
291 OneClickSigninHelperIOTest::OneClickSigninHelperIOTest() | 291 OneClickSigninHelperIOTest::OneClickSigninHelperIOTest() |
292 : testing_profile_manager_( | 292 : testing_profile_manager_( |
293 static_cast<TestingBrowserProcess*>(g_browser_process)), | 293 TestingBrowserProcess::GetGlobal()), |
294 valid_gaia_url_("https://accounts.google.com/"), | 294 valid_gaia_url_("https://accounts.google.com/"), |
295 db_thread_(content::BrowserThread::DB, &message_loop_), | 295 db_thread_(content::BrowserThread::DB, &message_loop_), |
296 fub_thread_(content::BrowserThread::FILE_USER_BLOCKING, &message_loop_), | 296 fub_thread_(content::BrowserThread::FILE_USER_BLOCKING, &message_loop_), |
297 io_thread_(content::BrowserThread::IO, &message_loop_) { | 297 io_thread_(content::BrowserThread::IO, &message_loop_) { |
298 } | 298 } |
299 | 299 |
300 OneClickSigninHelperIOTest::~OneClickSigninHelperIOTest() { | 300 OneClickSigninHelperIOTest::~OneClickSigninHelperIOTest() { |
301 } | 301 } |
302 | 302 |
303 void OneClickSigninHelperIOTest::SetUp() { | 303 void OneClickSigninHelperIOTest::SetUp() { |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
664 valid_gaia_url_, "", &request_, io_data.get())); | 664 valid_gaia_url_, "", &request_, io_data.get())); |
665 } | 665 } |
666 | 666 |
667 TEST_F(OneClickSigninHelperIOTest, CanOfferOnIOThreadNoSigninCookies) { | 667 TEST_F(OneClickSigninHelperIOTest, CanOfferOnIOThreadNoSigninCookies) { |
668 AllowSigninCookies(false); | 668 AllowSigninCookies(false); |
669 scoped_ptr<TestProfileIOData> io_data(CreateTestProfileIOData(false)); | 669 scoped_ptr<TestProfileIOData> io_data(CreateTestProfileIOData(false)); |
670 EXPECT_EQ(OneClickSigninHelper::DONT_OFFER, | 670 EXPECT_EQ(OneClickSigninHelper::DONT_OFFER, |
671 OneClickSigninHelper::CanOfferOnIOThreadImpl( | 671 OneClickSigninHelper::CanOfferOnIOThreadImpl( |
672 valid_gaia_url_, "", &request_, io_data.get())); | 672 valid_gaia_url_, "", &request_, io_data.get())); |
673 } | 673 } |
OLD | NEW |