OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // This file defines a unit test for the profile's token service. | 5 // This file defines a unit test for the profile's token service. |
6 | 6 |
7 #include "chrome/browser/signin/token_service_unittest.h" | 7 #include "chrome/browser/signin/token_service_unittest.h" |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "base/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
13 #include "base/synchronization/waitable_event.h" | 13 #include "base/synchronization/waitable_event.h" |
14 #include "chrome/browser/chrome_notification_types.h" | 14 #include "chrome/browser/chrome_notification_types.h" |
15 #include "chrome/browser/signin/token_service_factory.h" | 15 #include "chrome/browser/signin/token_service_factory.h" |
16 #include "chrome/browser/webdata/token_web_data.h" | 16 #include "chrome/browser/webdata/token_web_data.h" |
17 #include "chrome/common/chrome_switches.h" | 17 #include "chrome/common/chrome_switches.h" |
18 #include "components/webdata/encryptor/encryptor.h" | 18 #include "components/webdata/encryptor/encryptor.h" |
19 #include "google_apis/gaia/gaia_constants.h" | 19 #include "google_apis/gaia/gaia_constants.h" |
20 #include "google_apis/gaia/mock_url_fetcher_factory.h" | 20 #include "google_apis/gaia/mock_url_fetcher_factory.h" |
21 #include "net/url_request/test_url_fetcher_factory.h" | 21 #include "net/url_request/test_url_fetcher_factory.h" |
22 | 22 |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 | 419 |
420 *CommandLine::ForCurrentProcess() = original_cl; | 420 *CommandLine::ForCurrentProcess() = original_cl; |
421 } | 421 } |
422 }; | 422 }; |
423 | 423 |
424 TEST_F(TokenServiceCommandLineTest, TestValueOverride) { | 424 TEST_F(TokenServiceCommandLineTest, TestValueOverride) { |
425 EXPECT_TRUE(service_->HasTokenForService("my_service")); | 425 EXPECT_TRUE(service_->HasTokenForService("my_service")); |
426 EXPECT_EQ("my_value", service_->GetTokenForService("my_service")); | 426 EXPECT_EQ("my_value", service_->GetTokenForService("my_service")); |
427 } | 427 } |
428 #endif // ifndef NDEBUG | 428 #endif // ifndef NDEBUG |
OLD | NEW |