| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/metrics/field_trial.h" | 6 #include "base/metrics/field_trial.h" |
| 7 #include "base/metrics/histogram_base.h" | 7 #include "base/metrics/histogram_base.h" |
| 8 #include "base/metrics/histogram_samples.h" | 8 #include "base/metrics/histogram_samples.h" |
| 9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 #if defined(ENABLE_MANAGED_USERS) | 34 #if defined(ENABLE_MANAGED_USERS) |
| 35 #include "chrome/browser/supervised_user/supervised_user_service.h" | 35 #include "chrome/browser/supervised_user/supervised_user_service.h" |
| 36 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" | 36 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" |
| 37 #include "chrome/browser/supervised_user/supervised_user_url_filter.h" | 37 #include "chrome/browser/supervised_user/supervised_user_url_filter.h" |
| 38 #endif | 38 #endif |
| 39 | 39 |
| 40 namespace chrome { | 40 namespace chrome { |
| 41 | 41 |
| 42 class SearchTest : public BrowserWithTestWindowTest { | 42 class SearchTest : public BrowserWithTestWindowTest { |
| 43 protected: | 43 protected: |
| 44 virtual void SetUp() override { | 44 void SetUp() override { |
| 45 BrowserWithTestWindowTest::SetUp(); | 45 BrowserWithTestWindowTest::SetUp(); |
| 46 field_trial_list_.reset(new base::FieldTrialList( | 46 field_trial_list_.reset(new base::FieldTrialList( |
| 47 new metrics::SHA1EntropyProvider("42"))); | 47 new metrics::SHA1EntropyProvider("42"))); |
| 48 TemplateURLServiceFactory::GetInstance()->SetTestingFactoryAndUse( | 48 TemplateURLServiceFactory::GetInstance()->SetTestingFactoryAndUse( |
| 49 profile(), &TemplateURLServiceFactory::BuildInstanceFor); | 49 profile(), &TemplateURLServiceFactory::BuildInstanceFor); |
| 50 TemplateURLService* template_url_service = | 50 TemplateURLService* template_url_service = |
| 51 TemplateURLServiceFactory::GetForProfile(profile()); | 51 TemplateURLServiceFactory::GetForProfile(profile()); |
| 52 ui_test_utils::WaitForTemplateURLServiceToLoad(template_url_service); | 52 ui_test_utils::WaitForTemplateURLServiceToLoad(template_url_service); |
| 53 SetSearchProvider(true, false); | 53 SetSearchProvider(true, false); |
| 54 } | 54 } |
| (...skipping 949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1004 } | 1004 } |
| 1005 | 1005 |
| 1006 TEST_F(OriginChipTest, CommandLineOnSrp) { | 1006 TEST_F(OriginChipTest, CommandLineOnSrp) { |
| 1007 CommandLine::ForCurrentProcess()->AppendSwitch( | 1007 CommandLine::ForCurrentProcess()->AppendSwitch( |
| 1008 switches::kEnableOriginChipOnSrp); | 1008 switches::kEnableOriginChipOnSrp); |
| 1009 EXPECT_TRUE(ShouldDisplayOriginChip()); | 1009 EXPECT_TRUE(ShouldDisplayOriginChip()); |
| 1010 EXPECT_EQ(ORIGIN_CHIP_ON_SRP, GetOriginChipCondition()); | 1010 EXPECT_EQ(ORIGIN_CHIP_ON_SRP, GetOriginChipCondition()); |
| 1011 } | 1011 } |
| 1012 | 1012 |
| 1013 } // namespace chrome | 1013 } // namespace chrome |
| OLD | NEW |