| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/net/gaia/token_service_unittest.h" | 7 #include "chrome/browser/net/gaia/token_service_unittest.h" |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/message_loop.h" |
| 10 #include "base/synchronization/waitable_event.h" | 11 #include "base/synchronization/waitable_event.h" |
| 11 #include "base/test/signaling_task.h" | 12 #include "base/test/signaling_task.h" |
| 12 #include "chrome/browser/password_manager/encryptor.h" | 13 #include "chrome/browser/password_manager/encryptor.h" |
| 13 #include "chrome/common/chrome_notification_types.h" | 14 #include "chrome/common/chrome_notification_types.h" |
| 14 #include "chrome/common/chrome_switches.h" | 15 #include "chrome/common/chrome_switches.h" |
| 15 #include "chrome/common/net/gaia/gaia_auth_fetcher_unittest.h" | 16 #include "chrome/common/net/gaia/gaia_auth_fetcher_unittest.h" |
| 16 #include "chrome/common/net/gaia/gaia_constants.h" | 17 #include "chrome/common/net/gaia/gaia_constants.h" |
| 17 #include "content/test/test_url_fetcher_factory.h" | 18 #include "content/test/test_url_fetcher_factory.h" |
| 18 | 19 |
| 19 using content::BrowserThread; | 20 using content::BrowserThread; |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 | 507 |
| 507 *CommandLine::ForCurrentProcess() = original_cl; | 508 *CommandLine::ForCurrentProcess() = original_cl; |
| 508 } | 509 } |
| 509 }; | 510 }; |
| 510 | 511 |
| 511 TEST_F(TokenServiceCommandLineTest, TestValueOverride) { | 512 TEST_F(TokenServiceCommandLineTest, TestValueOverride) { |
| 512 EXPECT_TRUE(service_.HasTokenForService("my_service")); | 513 EXPECT_TRUE(service_.HasTokenForService("my_service")); |
| 513 EXPECT_EQ("my_value", service_.GetTokenForService("my_service")); | 514 EXPECT_EQ("my_value", service_.GetTokenForService("my_service")); |
| 514 } | 515 } |
| 515 #endif // ifndef NDEBUG | 516 #endif // ifndef NDEBUG |
| OLD | NEW |