| 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 #ifndef CONTENT_PUBLIC_TEST_BROWSER_TEST_BASE_H_ | 5 #ifndef CONTENT_PUBLIC_TEST_BROWSER_TEST_BASE_H_ |
| 6 #define CONTENT_PUBLIC_TEST_BROWSER_TEST_BASE_H_ | 6 #define CONTENT_PUBLIC_TEST_BROWSER_TEST_BASE_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/threading/thread.h" | 10 #include "base/threading/thread.h" |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 // instead. | 125 // instead. |
| 126 void UseSoftwareCompositing(); | 126 void UseSoftwareCompositing(); |
| 127 | 127 |
| 128 // Returns true if the test will be using GL acceleration via OSMesa. | 128 // Returns true if the test will be using GL acceleration via OSMesa. |
| 129 bool UsingOSMesa() const; | 129 bool UsingOSMesa() const; |
| 130 | 130 |
| 131 private: | 131 private: |
| 132 void ProxyRunTestOnMainThreadLoop(); | 132 void ProxyRunTestOnMainThreadLoop(); |
| 133 | 133 |
| 134 // Testing server, started on demand. | 134 // Testing server, started on demand. |
| 135 scoped_ptr<net::SpawnedTestServer> spawned_test_server_; | 135 std::unique_ptr<net::SpawnedTestServer> spawned_test_server_; |
| 136 | 136 |
| 137 // Embedded test server, cheap to create, started on demand. | 137 // Embedded test server, cheap to create, started on demand. |
| 138 scoped_ptr<net::EmbeddedTestServer> embedded_test_server_; | 138 std::unique_ptr<net::EmbeddedTestServer> embedded_test_server_; |
| 139 | 139 |
| 140 // Host resolver used during tests. | 140 // Host resolver used during tests. |
| 141 scoped_refptr<net::RuleBasedHostResolverProc> rule_based_resolver_; | 141 scoped_refptr<net::RuleBasedHostResolverProc> rule_based_resolver_; |
| 142 | 142 |
| 143 // Expected exit code (default is 0). | 143 // Expected exit code (default is 0). |
| 144 int expected_exit_code_; | 144 int expected_exit_code_; |
| 145 | 145 |
| 146 // When true, the compositor will produce pixel output that can be read back | 146 // When true, the compositor will produce pixel output that can be read back |
| 147 // for pixel tests. | 147 // for pixel tests. |
| 148 bool enable_pixel_output_; | 148 bool enable_pixel_output_; |
| 149 | 149 |
| 150 // When true, do compositing with the software backend instead of using GL. | 150 // When true, do compositing with the software backend instead of using GL. |
| 151 bool use_software_compositing_; | 151 bool use_software_compositing_; |
| 152 | 152 |
| 153 // Whether SetUp was called. This value is checked in the destructor of this | 153 // Whether SetUp was called. This value is checked in the destructor of this |
| 154 // class to ensure that SetUp was called. If it's not called, the test will | 154 // class to ensure that SetUp was called. If it's not called, the test will |
| 155 // not run and report a false positive result. | 155 // not run and report a false positive result. |
| 156 bool set_up_called_; | 156 bool set_up_called_; |
| 157 | 157 |
| 158 #if defined(OS_POSIX) | 158 #if defined(OS_POSIX) |
| 159 bool handle_sigterm_; | 159 bool handle_sigterm_; |
| 160 #endif | 160 #endif |
| 161 }; | 161 }; |
| 162 | 162 |
| 163 } // namespace content | 163 } // namespace content |
| 164 | 164 |
| 165 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_BASE_H_ | 165 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_BASE_H_ |
| OLD | NEW |