Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1388)

Side by Side Diff: chrome/browser/autocomplete/search_provider_unittest.cc

Issue 286063004: Move active field trial API to variations component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 16 matching lines...) Expand all
27 #include "chrome/browser/history/history_service_factory.h" 27 #include "chrome/browser/history/history_service_factory.h"
28 #include "chrome/browser/omnibox/omnibox_field_trial.h" 28 #include "chrome/browser/omnibox/omnibox_field_trial.h"
29 #include "chrome/browser/search_engines/search_engine_type.h" 29 #include "chrome/browser/search_engines/search_engine_type.h"
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/metrics/variations/variations_util.h"
38 #include "chrome/common/pref_names.h" 37 #include "chrome/common/pref_names.h"
39 #include "chrome/test/base/testing_browser_process.h" 38 #include "chrome/test/base/testing_browser_process.h"
40 #include "chrome/test/base/testing_profile.h" 39 #include "chrome/test/base/testing_profile.h"
41 #include "components/signin/core/browser/signin_manager.h" 40 #include "components/signin/core/browser/signin_manager.h"
42 #include "components/sync_driver/pref_names.h" 41 #include "components/sync_driver/pref_names.h"
43 #include "components/variations/entropy_provider.h" 42 #include "components/variations/entropy_provider.h"
43 #include "components/variations/variations_associated_data.h"
44 #include "content/public/test/test_browser_thread_bundle.h" 44 #include "content/public/test/test_browser_thread_bundle.h"
45 #include "net/url_request/test_url_fetcher_factory.h" 45 #include "net/url_request/test_url_fetcher_factory.h"
46 #include "net/url_request/url_request_status.h" 46 #include "net/url_request/url_request_status.h"
47 #include "testing/gtest/include/gtest/gtest.h" 47 #include "testing/gtest/include/gtest/gtest.h"
48 48
49 using base::ASCIIToUTF16; 49 using base::ASCIIToUTF16;
50 50
51 namespace { 51 namespace {
52 52
53 // Returns the first match in |matches| with |allowed_to_be_default_match| 53 // Returns the first match in |matches| with |allowed_to_be_default_match|
(...skipping 3110 matching lines...) Expand 10 before | Expand all | Expand 10 after
3164 3164
3165 // The expiration time is always updated. 3165 // The expiration time is always updated.
3166 provider_->GetSessionToken(); 3166 provider_->GetSessionToken();
3167 base::TimeTicks expiration_time_1 = provider_->token_expiration_time_; 3167 base::TimeTicks expiration_time_1 = provider_->token_expiration_time_;
3168 base::PlatformThread::Sleep(kSmallDelta); 3168 base::PlatformThread::Sleep(kSmallDelta);
3169 provider_->GetSessionToken(); 3169 provider_->GetSessionToken();
3170 base::TimeTicks expiration_time_2 = provider_->token_expiration_time_; 3170 base::TimeTicks expiration_time_2 = provider_->token_expiration_time_;
3171 EXPECT_GT(expiration_time_2, expiration_time_1); 3171 EXPECT_GT(expiration_time_2, expiration_time_1);
3172 EXPECT_GE(expiration_time_2, expiration_time_1 + kSmallDelta); 3172 EXPECT_GE(expiration_time_2, expiration_time_1 + kSmallDelta);
3173 } 3173 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698