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 #include "content/public/test/browser_test_base.h" | 5 #include "content/public/test/browser_test_base.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
223 | 223 |
224 if (use_software_gl && !use_software_compositing_) | 224 if (use_software_gl && !use_software_compositing_) |
225 command_line->AppendSwitch(switches::kOverrideUseSoftwareGLForTests); | 225 command_line->AppendSwitch(switches::kOverrideUseSoftwareGLForTests); |
226 | 226 |
227 test_host_resolver_ = base::MakeUnique<TestHostResolver>(); | 227 test_host_resolver_ = base::MakeUnique<TestHostResolver>(); |
228 | 228 |
229 ContentBrowserSanityChecker scoped_enable_sanity_checks; | 229 ContentBrowserSanityChecker scoped_enable_sanity_checks; |
230 | 230 |
231 SetUpInProcessBrowserTestFixture(); | 231 SetUpInProcessBrowserTestFixture(); |
232 | 232 |
233 DCHECK(!command_line->HasSwitch(switches::kEnableFeatures)) | |
234 << "Should not use CommandLine to modify features."; | |
Ilya Sherman
2017/06/13 22:42:48
Please list this as a comment if you'd like to inc
chaopeng
2017/06/28 14:16:51
Done.
| |
235 DCHECK(!command_line->HasSwitch(switches::kDisableFeatures)) | |
236 << "Should not use CommandLine to modify features."; | |
237 | |
233 // At this point, copy features to the command line, since BrowserMain will | 238 // At this point, copy features to the command line, since BrowserMain will |
234 // wipe out the current feature list. | 239 // wipe out the current feature list. |
235 std::string enabled_features; | 240 std::string enabled_features; |
236 std::string disabled_features; | 241 std::string disabled_features; |
237 if (base::FeatureList::GetInstance()) { | 242 if (base::FeatureList::GetInstance()) { |
238 base::FeatureList::GetInstance()->GetFeatureOverrides(&enabled_features, | 243 base::FeatureList::GetInstance()->GetFeatureOverrides(&enabled_features, |
239 &disabled_features); | 244 &disabled_features); |
240 } | 245 } |
241 if (!enabled_features.empty()) { | 246 if (!enabled_features.empty()) { |
242 command_line->AppendSwitchASCII(switches::kEnableFeatures, | 247 command_line->AppendSwitchASCII(switches::kEnableFeatures, |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
407 return; | 412 return; |
408 | 413 |
409 mojom::NetworkServiceTestPtr network_service_test; | 414 mojom::NetworkServiceTestPtr network_service_test; |
410 ServiceManagerConnection::GetForProcess()->GetConnector()->BindInterface( | 415 ServiceManagerConnection::GetForProcess()->GetConnector()->BindInterface( |
411 mojom::kNetworkServiceName, &network_service_test); | 416 mojom::kNetworkServiceName, &network_service_test); |
412 mojo::SyncCallRestrictions::ScopedAllowSyncCall allow_sync_call; | 417 mojo::SyncCallRestrictions::ScopedAllowSyncCall allow_sync_call; |
413 network_service_test->AddRules(std::move(mojo_rules)); | 418 network_service_test->AddRules(std::move(mojo_rules)); |
414 } | 419 } |
415 | 420 |
416 } // namespace content | 421 } // namespace content |
OLD | NEW |