| 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 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 | 453 |
| 453 *CommandLine::ForCurrentProcess() = original_cl; | 454 *CommandLine::ForCurrentProcess() = original_cl; |
| 454 } | 455 } |
| 455 }; | 456 }; |
| 456 | 457 |
| 457 TEST_F(TokenServiceCommandLineTest, TestValueOverride) { | 458 TEST_F(TokenServiceCommandLineTest, TestValueOverride) { |
| 458 EXPECT_TRUE(service_.HasTokenForService("my_service")); | 459 EXPECT_TRUE(service_.HasTokenForService("my_service")); |
| 459 EXPECT_EQ("my_value", service_.GetTokenForService("my_service")); | 460 EXPECT_EQ("my_value", service_.GetTokenForService("my_service")); |
| 460 } | 461 } |
| 461 #endif // ifndef NDEBUG | 462 #endif // ifndef NDEBUG |
| OLD | NEW |