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

Side by Side Diff: chrome/browser/chromeos/login/online_attempt_unittest.cc

Issue 7744039: Switch ChromeTestSuite to the same convention as ContentTestSuite: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more fixing Created 9 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <string> 5 #include <string>
6 6
7 #include "base/memory/ref_counted.h" 7 #include "base/memory/ref_counted.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "chrome/browser/chromeos/cros/cros_library.h" 9 #include "chrome/browser/chromeos/cros/cros_library.h"
10 #include "chrome/browser/chromeos/cros/mock_library_loader.h" 10 #include "chrome/browser/chromeos/cros/mock_library_loader.h"
11 #include "chrome/browser/chromeos/login/auth_attempt_state.h" 11 #include "chrome/browser/chromeos/login/auth_attempt_state.h"
12 #include "chrome/browser/chromeos/login/mock_auth_attempt_state_resolver.h" 12 #include "chrome/browser/chromeos/login/mock_auth_attempt_state_resolver.h"
13 #include "chrome/browser/chromeos/login/mock_url_fetchers.h" 13 #include "chrome/browser/chromeos/login/mock_url_fetchers.h"
14 #include "chrome/browser/chromeos/login/online_attempt.h" 14 #include "chrome/browser/chromeos/login/online_attempt.h"
15 #include "chrome/browser/chromeos/login/test_attempt_state.h" 15 #include "chrome/browser/chromeos/login/test_attempt_state.h"
16 #include "chrome/common/net/gaia/gaia_auth_consumer.h" 16 #include "chrome/common/net/gaia/gaia_auth_consumer.h"
17 #include "chrome/common/net/gaia/gaia_auth_fetcher_unittest.h" 17 #include "chrome/common/net/gaia/gaia_auth_fetcher_unittest.h"
18 #include "chrome/test/base/testing_browser_process_test.h"
19 #include "chrome/test/base/testing_profile.h" 18 #include "chrome/test/base/testing_profile.h"
20 #include "content/browser/browser_thread.h" 19 #include "content/browser/browser_thread.h"
21 #include "googleurl/src/gurl.h" 20 #include "googleurl/src/gurl.h"
22 #include "testing/gmock/include/gmock/gmock.h" 21 #include "testing/gmock/include/gmock/gmock.h"
23 #include "testing/gtest/include/gtest/gtest.h" 22 #include "testing/gtest/include/gtest/gtest.h"
24 23
25 using ::testing::AnyNumber; 24 using ::testing::AnyNumber;
26 using ::testing::Invoke; 25 using ::testing::Invoke;
27 using ::testing::Return; 26 using ::testing::Return;
28 using ::testing::_; 27 using ::testing::_;
29 28
30 namespace chromeos { 29 namespace chromeos {
31 30
32 class OnlineAttemptTest : public TestingBrowserProcessTest { 31 class OnlineAttemptTest : public testing::Test {
33 public: 32 public:
34 OnlineAttemptTest() 33 OnlineAttemptTest()
35 : message_loop_(MessageLoop::TYPE_UI), 34 : message_loop_(MessageLoop::TYPE_UI),
36 ui_thread_(BrowserThread::UI, &message_loop_), 35 ui_thread_(BrowserThread::UI, &message_loop_),
37 io_thread_(BrowserThread::IO), 36 io_thread_(BrowserThread::IO),
38 state_("", "", "", "", "", false), 37 state_("", "", "", "", "", false),
39 resolver_(new MockAuthAttemptStateResolver) { 38 resolver_(new MockAuthAttemptStateResolver) {
40 } 39 }
41 40
42 virtual ~OnlineAttemptTest() {} 41 virtual ~OnlineAttemptTest() {}
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 error)); 267 error));
269 268
270 // Force IO thread to finish tasks so I can verify |state_|. 269 // Force IO thread to finish tasks so I can verify |state_|.
271 io_thread_.Stop(); 270 io_thread_.Stop();
272 EXPECT_TRUE(GoogleServiceAuthError::None() == 271 EXPECT_TRUE(GoogleServiceAuthError::None() ==
273 state_.online_outcome().error()); 272 state_.online_outcome().error());
274 EXPECT_TRUE(GaiaAuthConsumer::ClientLoginResult() == state_.credentials()); 273 EXPECT_TRUE(GaiaAuthConsumer::ClientLoginResult() == state_.credentials());
275 } 274 }
276 275
277 } // namespace chromeos 276 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698