| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <utility> | 6 #include <utility> |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/feature_list.h" | 10 #include "base/feature_list.h" |
| (...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 936 web_contents_observer_.reset( | 936 web_contents_observer_.reset( |
| 937 new TestWebContentsObserver(web_contents_.get())); | 937 new TestWebContentsObserver(web_contents_.get())); |
| 938 web_contents_filter_ = new TestFilterSpecifyingChild( | 938 web_contents_filter_ = new TestFilterSpecifyingChild( |
| 939 browser_context_->GetResourceContext(), | 939 browser_context_->GetResourceContext(), |
| 940 web_contents_->GetRenderProcessHost()->GetID()); | 940 web_contents_->GetRenderProcessHost()->GetID()); |
| 941 child_ids_.insert(web_contents_->GetRenderProcessHost()->GetID()); | 941 child_ids_.insert(web_contents_->GetRenderProcessHost()->GetID()); |
| 942 | 942 |
| 943 base::FeatureList::ClearInstanceForTesting(); | 943 base::FeatureList::ClearInstanceForTesting(); |
| 944 switch (GetParam()) { | 944 switch (GetParam()) { |
| 945 case TestConfig::kDefault: | 945 case TestConfig::kDefault: |
| 946 base::FeatureList::InitializeInstance(); | 946 base::FeatureList::InitializeInstance(std::string(), std::string()); |
| 947 break; | 947 break; |
| 948 case TestConfig::kOptimizeIPCForSmallResourceEnabled: { | 948 case TestConfig::kOptimizeIPCForSmallResourceEnabled: { |
| 949 scoped_ptr<base::FeatureList> feature_list(new base::FeatureList); | 949 scoped_ptr<base::FeatureList> feature_list(new base::FeatureList); |
| 950 feature_list->InitializeFromCommandLine( | 950 feature_list->InitializeFromCommandLine( |
| 951 features::kOptimizeIPCForSmallResource.name, std::string()); | 951 features::kOptimizeIPCForSmallResource.name, std::string()); |
| 952 base::FeatureList::SetInstance(std::move(feature_list)); | 952 base::FeatureList::SetInstance(std::move(feature_list)); |
| 953 ASSERT_TRUE(base::FeatureList::IsEnabled( | 953 ASSERT_TRUE(base::FeatureList::IsEnabled( |
| 954 features::kOptimizeIPCForSmallResource)); | 954 features::kOptimizeIPCForSmallResource)); |
| 955 break; | 955 break; |
| 956 } | 956 } |
| (...skipping 2872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3829 return nullptr; | 3829 return nullptr; |
| 3830 } | 3830 } |
| 3831 | 3831 |
| 3832 INSTANTIATE_TEST_CASE_P( | 3832 INSTANTIATE_TEST_CASE_P( |
| 3833 ResourceDispatcherHostTests, | 3833 ResourceDispatcherHostTests, |
| 3834 ResourceDispatcherHostTest, | 3834 ResourceDispatcherHostTest, |
| 3835 testing::Values(TestConfig::kDefault, | 3835 testing::Values(TestConfig::kDefault, |
| 3836 TestConfig::kOptimizeIPCForSmallResourceEnabled)); | 3836 TestConfig::kOptimizeIPCForSmallResourceEnabled)); |
| 3837 | 3837 |
| 3838 } // namespace content | 3838 } // namespace content |
| OLD | NEW |