| 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 "base/file_path.h" | 5 #include "base/file_path.h" |
| 6 #include "base/files/scoped_temp_dir.h" | 6 #include "base/files/scoped_temp_dir.h" |
| 7 #include "content/test/content_browser_test.h" | 7 #include "content/test/content_browser_test.h" |
| 8 | 8 |
| 9 class GURL; | 9 class GURL; |
| 10 | 10 |
| 11 namespace content { | 11 namespace content { |
| 12 class LayoutTestHttpServer; | 12 class LayoutTestHttpServer; |
| 13 class WebKitTestController; | 13 class WebKitTestController; |
| 14 | 14 |
| 15 class InProcessBrowserLayoutTest : public ContentBrowserTest { | 15 class InProcessBrowserLayoutTest : public ContentBrowserTest { |
| 16 public: | 16 public: |
| 17 explicit InProcessBrowserLayoutTest(const FilePath& test_parent_dir, | 17 InProcessBrowserLayoutTest(const FilePath& test_parent_dir, |
| 18 const FilePath& test_case_dir); | 18 const FilePath& test_case_dir); |
| 19 // Used when running HTTP layout tests. Starts the server in the constructor | 19 // Used when running HTTP layout tests. Starts the server in the constructor |
| 20 // and keeps it running through the lifetime of this test. This is done to | 20 // and keeps it running through the lifetime of this test. This is done to |
| 21 // avoid flakiness in restarting the server while the port is still in use. | 21 // avoid flakiness in restarting the server while the port is still in use. |
| 22 // If -1 is passed for |port|, a random number will be used. This is | 22 // If -1 is passed for |port|, a random number will be used. This is |
| 23 // recommended when possible, in case multiple tests are running at the same | 23 // recommended when possible, in case multiple tests are running at the same |
| 24 // time. For some tests this isn't possible though, because they use resources | 24 // time. For some tests this isn't possible though, because they use resources |
| 25 // that hardcode a specific port. | 25 // that hardcode a specific port. |
| 26 InProcessBrowserLayoutTest(const FilePath& test_parent_dir, | 26 InProcessBrowserLayoutTest(const FilePath& test_parent_dir, |
| 27 const FilePath& test_case_dir, | 27 const FilePath& test_case_dir, |
| 28 int port); | 28 int port); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 52 FilePath rebase_result_win_dir_; | 52 FilePath rebase_result_win_dir_; |
| 53 int port_; // -2 means no port. -1 means random. | 53 int port_; // -2 means no port. -1 means random. |
| 54 scoped_ptr<LayoutTestHttpServer> test_http_server_; | 54 scoped_ptr<LayoutTestHttpServer> test_http_server_; |
| 55 | 55 |
| 56 scoped_ptr<WebKitTestController> test_controller_; | 56 scoped_ptr<WebKitTestController> test_controller_; |
| 57 | 57 |
| 58 DISALLOW_COPY_AND_ASSIGN(InProcessBrowserLayoutTest); | 58 DISALLOW_COPY_AND_ASSIGN(InProcessBrowserLayoutTest); |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 } // namespace content | 61 } // namespace content |
| OLD | NEW |