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

Side by Side Diff: chrome/browser/sync/engine/auth_watcher_unittest.cc

Issue 1956001: Moved XMPP notifier library from chrome/browser/sync to chrome/common.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 7 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
« no previous file with comments | « chrome/browser/sync/engine/auth_watcher.cc ('k') | chrome/browser/sync/engine/syncapi.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 file. 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"
14 #include "chrome/browser/sync/util/user_settings.h" 13 #include "chrome/browser/sync/util/user_settings.h"
15 #include "chrome/common/deprecated/event_sys-inl.h" 14 #include "chrome/common/deprecated/event_sys-inl.h"
15 #include "chrome/common/net/notifier/listener/talk_mediator_impl.h"
16 #include "chrome/test/sync/engine/mock_server_connection.h" 16 #include "chrome/test/sync/engine/mock_server_connection.h"
17 #include "chrome/test/sync/engine/test_directory_setter_upper.h" 17 #include "chrome/test/sync/engine/test_directory_setter_upper.h"
18 #include "testing/gtest/include/gtest/gtest.h" 18 #include "testing/gtest/include/gtest/gtest.h"
19 19
20 static FilePath::CharType kUserSettingsDB[] = 20 static FilePath::CharType kUserSettingsDB[] =
21 FILE_PATH_LITERAL("Settings.sqlite3"); 21 FILE_PATH_LITERAL("Settings.sqlite3");
22 static const char* kTestUserAgent = "useragent"; 22 static const char* kTestUserAgent = "useragent";
23 static const char* kTestServiceId = "serviceid"; 23 static const char* kTestServiceId = "serviceid";
24 static const char* kTestGaiaURL = "http://gaia_url"; 24 static const char* kTestGaiaURL = "http://gaia_url";
25 static const char* kUserDisplayName = "Mr. Auth Watcher"; 25 static const char* kUserDisplayName = "Mr. Auth Watcher";
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 EXPECT_EQ(AuthWatcherEvent::AUTHENTICATION_ATTEMPT_START, ConsumeNextEvent()); 224 EXPECT_EQ(AuthWatcherEvent::AUTHENTICATION_ATTEMPT_START, ConsumeNextEvent());
225 EXPECT_EQ(AuthWatcherEvent::AUTH_SUCCEEDED, ConsumeNextEvent()); 225 EXPECT_EQ(AuthWatcherEvent::AUTH_SUCCEEDED, ConsumeNextEvent());
226 226
227 auth_watcher()->RenewAuthToken("updated_token"); 227 auth_watcher()->RenewAuthToken("updated_token");
228 EXPECT_EQ(AuthWatcherEvent::AUTH_RENEWED, ConsumeNextEvent()); 228 EXPECT_EQ(AuthWatcherEvent::AUTH_RENEWED, ConsumeNextEvent());
229 EXPECT_EQ(gaia_auth()->renewed_token(), "updated_token"); 229 EXPECT_EQ(gaia_auth()->renewed_token(), "updated_token");
230 EXPECT_EQ(connection()->auth_token(), "updated_token"); 230 EXPECT_EQ(connection()->auth_token(), "updated_token");
231 } 231 }
232 232
233 } // namespace browser_sync 233 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/engine/auth_watcher.cc ('k') | chrome/browser/sync/engine/syncapi.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698