OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 entry. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/scoped_ptr.h" | 5 #include "base/scoped_ptr.h" |
6 #include "base/scoped_temp_dir.h" | 6 #include "base/scoped_temp_dir.h" |
7 #include "base/test/test_file_util.h" | 7 #include "base/test/test_file_util.h" |
8 #include "base/waitable_event.h" | 8 #include "base/waitable_event.h" |
9 #include "chrome/browser/sync/engine/all_status.h" | 9 #include "chrome/browser/sync/engine/all_status.h" |
10 #include "chrome/browser/sync/engine/auth_watcher.h" | 10 #include "chrome/browser/sync/engine/auth_watcher.h" |
11 #include "chrome/browser/sync/engine/net/gaia_authenticator.h" | 11 #include "chrome/browser/sync/engine/net/gaia_authenticator.h" |
12 #include "chrome/browser/sync/engine/net/http_return.h" | 12 #include "chrome/browser/sync/engine/net/http_return.h" |
13 #include "chrome/browser/sync/notifier/listener/talk_mediator_impl.h" | 13 #include "chrome/browser/sync/notifier/listener/talk_mediator_impl.h" |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 EXPECT_EQ(AuthWatcherEvent::SERVICE_AUTH_FAILED, ConsumeNextEvent()); | 202 EXPECT_EQ(AuthWatcherEvent::SERVICE_AUTH_FAILED, ConsumeNextEvent()); |
203 } | 203 } |
204 | 204 |
205 TEST_F(AuthWatcherTest, AuthenticateWithTokenSuccess) { | 205 TEST_F(AuthWatcherTest, AuthenticateWithTokenSuccess) { |
206 auth_watcher()->AuthenticateWithToken(kTestEmail, kValidAuthToken); | 206 auth_watcher()->AuthenticateWithToken(kTestEmail, kValidAuthToken); |
207 EXPECT_EQ(AuthWatcherEvent::AUTH_SUCCEEDED, ConsumeNextEvent()); | 207 EXPECT_EQ(AuthWatcherEvent::AUTH_SUCCEEDED, ConsumeNextEvent()); |
208 EXPECT_EQ(kUserDisplayEmail, user_email()); | 208 EXPECT_EQ(kUserDisplayEmail, user_email()); |
209 } | 209 } |
210 | 210 |
211 } // namespace browser_sync | 211 } // namespace browser_sync |
OLD | NEW |