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