| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #include "chrome/browser/autocomplete/search_provider.h" | 5 #include "chrome/browser/autocomplete/search_provider.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 #include "chrome/browser/search_engines/template_url.h" | 30 #include "chrome/browser/search_engines/template_url.h" |
| 31 #include "chrome/browser/search_engines/template_url_service.h" | 31 #include "chrome/browser/search_engines/template_url_service.h" |
| 32 #include "chrome/browser/search_engines/template_url_service_factory.h" | 32 #include "chrome/browser/search_engines/template_url_service_factory.h" |
| 33 #include "chrome/browser/signin/signin_manager_factory.h" | 33 #include "chrome/browser/signin/signin_manager_factory.h" |
| 34 #include "chrome/browser/sync/profile_sync_service.h" | 34 #include "chrome/browser/sync/profile_sync_service.h" |
| 35 #include "chrome/browser/sync/profile_sync_service_factory.h" | 35 #include "chrome/browser/sync/profile_sync_service_factory.h" |
| 36 #include "chrome/common/chrome_switches.h" | 36 #include "chrome/common/chrome_switches.h" |
| 37 #include "chrome/common/pref_names.h" | 37 #include "chrome/common/pref_names.h" |
| 38 #include "chrome/test/base/testing_browser_process.h" | 38 #include "chrome/test/base/testing_browser_process.h" |
| 39 #include "chrome/test/base/testing_profile.h" | 39 #include "chrome/test/base/testing_profile.h" |
| 40 #include "components/google/core/browser/google_switches.h" |
| 40 #include "components/signin/core/browser/signin_manager.h" | 41 #include "components/signin/core/browser/signin_manager.h" |
| 41 #include "components/sync_driver/pref_names.h" | 42 #include "components/sync_driver/pref_names.h" |
| 42 #include "components/variations/entropy_provider.h" | 43 #include "components/variations/entropy_provider.h" |
| 43 #include "components/variations/variations_associated_data.h" | 44 #include "components/variations/variations_associated_data.h" |
| 44 #include "content/public/test/test_browser_thread_bundle.h" | 45 #include "content/public/test/test_browser_thread_bundle.h" |
| 45 #include "net/url_request/test_url_fetcher_factory.h" | 46 #include "net/url_request/test_url_fetcher_factory.h" |
| 46 #include "net/url_request/url_request_status.h" | 47 #include "net/url_request/url_request_status.h" |
| 47 #include "testing/gtest/include/gtest/gtest.h" | 48 #include "testing/gtest/include/gtest/gtest.h" |
| 48 | 49 |
| 49 using base::ASCIIToUTF16; | 50 using base::ASCIIToUTF16; |
| (...skipping 3114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3164 | 3165 |
| 3165 // The expiration time is always updated. | 3166 // The expiration time is always updated. |
| 3166 provider_->GetSessionToken(); | 3167 provider_->GetSessionToken(); |
| 3167 base::TimeTicks expiration_time_1 = provider_->token_expiration_time_; | 3168 base::TimeTicks expiration_time_1 = provider_->token_expiration_time_; |
| 3168 base::PlatformThread::Sleep(kSmallDelta); | 3169 base::PlatformThread::Sleep(kSmallDelta); |
| 3169 provider_->GetSessionToken(); | 3170 provider_->GetSessionToken(); |
| 3170 base::TimeTicks expiration_time_2 = provider_->token_expiration_time_; | 3171 base::TimeTicks expiration_time_2 = provider_->token_expiration_time_; |
| 3171 EXPECT_GT(expiration_time_2, expiration_time_1); | 3172 EXPECT_GT(expiration_time_2, expiration_time_1); |
| 3172 EXPECT_GE(expiration_time_2, expiration_time_1 + kSmallDelta); | 3173 EXPECT_GE(expiration_time_2, expiration_time_1 + kSmallDelta); |
| 3173 } | 3174 } |
| OLD | NEW |