OLD | NEW |
| (Empty) |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "chrome/test/device_management_test_util.h" | |
6 | |
7 #include <string> | |
8 | |
9 #include "chrome/browser/net/gaia/token_service.h" | |
10 #include "chrome/common/net/gaia/gaia_constants.h" | |
11 #include "chrome/common/notification_service.h" | |
12 #include "chrome/common/notification_source.h" | |
13 #include "chrome/common/notification_type.h" | |
14 | |
15 namespace policy { | |
16 | |
17 namespace { | |
18 | |
19 static const char kFakeGaiaAuthToken[] = "FakeGAIAToken"; | |
20 | |
21 } // namespace | |
22 | |
23 void SimulateSuccessfulLogin() { | |
24 const std::string service(GaiaConstants::kDeviceManagementService); | |
25 const std::string auth_token(kFakeGaiaAuthToken); | |
26 TokenService::TokenAvailableDetails details(service, auth_token); | |
27 NotificationService::current()->Notify( | |
28 NotificationType::TOKEN_AVAILABLE, | |
29 Source<TokenService>(NULL), | |
30 Details<const TokenService::TokenAvailableDetails>(&details)); | |
31 } | |
32 | |
33 } // namespace policy | |
OLD | NEW |