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 16 matching lines...) Expand all Loading... |
27 #include "content/public/app/content_main.h" | 27 #include "content/public/app/content_main.h" |
28 #include "content/public/browser/browser_thread.h" | 28 #include "content/public/browser/browser_thread.h" |
29 #include "content/public/common/content_switches.h" | 29 #include "content/public/common/content_switches.h" |
30 #include "content/public/common/main_function_params.h" | 30 #include "content/public/common/main_function_params.h" |
31 #include "content/public/common/network_service_test.mojom.h" | 31 #include "content/public/common/network_service_test.mojom.h" |
32 #include "content/public/common/service_manager_connection.h" | 32 #include "content/public/common/service_manager_connection.h" |
33 #include "content/public/common/service_names.mojom.h" | 33 #include "content/public/common/service_names.mojom.h" |
34 #include "content/public/test/test_launcher.h" | 34 #include "content/public/test/test_launcher.h" |
35 #include "content/public/test/test_utils.h" | 35 #include "content/public/test/test_utils.h" |
36 #include "content/test/content_browser_sanity_checker.h" | 36 #include "content/test/content_browser_sanity_checker.h" |
| 37 #include "mojo/public/cpp/bindings/sync_call_restrictions.h" |
37 #include "net/dns/mock_host_resolver.h" | 38 #include "net/dns/mock_host_resolver.h" |
38 #include "net/test/embedded_test_server/embedded_test_server.h" | 39 #include "net/test/embedded_test_server/embedded_test_server.h" |
39 #include "services/service_manager/public/cpp/connector.h" | 40 #include "services/service_manager/public/cpp/connector.h" |
40 #include "ui/base/platform_window_defaults.h" | 41 #include "ui/base/platform_window_defaults.h" |
41 #include "ui/base/test/material_design_controller_test_api.h" | 42 #include "ui/base/test/material_design_controller_test_api.h" |
42 #include "ui/compositor/compositor_switches.h" | 43 #include "ui/compositor/compositor_switches.h" |
43 #include "ui/gl/gl_implementation.h" | 44 #include "ui/gl/gl_implementation.h" |
44 #include "ui/gl/gl_switches.h" | 45 #include "ui/gl/gl_switches.h" |
45 | 46 |
46 #if defined(OS_POSIX) | 47 #if defined(OS_POSIX) |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 mojo_rule->replacement = rule.replacement; | 402 mojo_rule->replacement = rule.replacement; |
402 mojo_rules.push_back(std::move(mojo_rule)); | 403 mojo_rules.push_back(std::move(mojo_rule)); |
403 } | 404 } |
404 | 405 |
405 if (mojo_rules.empty()) | 406 if (mojo_rules.empty()) |
406 return; | 407 return; |
407 | 408 |
408 mojom::NetworkServiceTestPtr network_service_test; | 409 mojom::NetworkServiceTestPtr network_service_test; |
409 ServiceManagerConnection::GetForProcess()->GetConnector()->BindInterface( | 410 ServiceManagerConnection::GetForProcess()->GetConnector()->BindInterface( |
410 mojom::kNetworkServiceName, &network_service_test); | 411 mojom::kNetworkServiceName, &network_service_test); |
| 412 mojo::SyncCallRestrictions::ScopedAllowSyncCall allow_sync_call; |
411 network_service_test->AddRules(std::move(mojo_rules)); | 413 network_service_test->AddRules(std::move(mojo_rules)); |
412 } | 414 } |
413 | 415 |
414 } // namespace content | 416 } // namespace content |
OLD | NEW |