Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: content/test/layout_browsertest.h

Issue 16268011: Remove InProcessBrowserLayoutTest, since we now run layout tests in content_shell (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/public/common/content_paths.h ('k') | content/test/layout_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "base/files/file_path.h"
6 #include "base/files/scoped_temp_dir.h"
7 #include "content/test/content_browser_test.h"
8
9 class GURL;
10
11 namespace content {
12 class LayoutTestHttpServer;
13 class WebKitTestController;
14
15 class InProcessBrowserLayoutTest : public ContentBrowserTest {
16 public:
17 explicit InProcessBrowserLayoutTest(const base::FilePath& test_parent_dir,
18 const base::FilePath& test_case_dir);
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
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
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
25 // that hardcode a specific port.
26 InProcessBrowserLayoutTest(const base::FilePath& test_parent_dir,
27 const base::FilePath& test_case_dir,
28 int port);
29 virtual ~InProcessBrowserLayoutTest();
30
31 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE;
32 virtual void SetUpOnMainThread() OVERRIDE;
33 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE;
34 // Runs a layout test given its filename relative to the path given to the
35 // constructor.
36 void RunLayoutTest(const std::string& test_case_file_name);
37 // Runs a layout test using the HTTP test server. The second constructor must
38 // have been used.
39 void RunHttpLayoutTest(const std::string& test_case_file_name);
40
41 private:
42 void RunLayoutTestInternal(const std::string& test_case_file_name,
43 const GURL& url);
44 std::string SaveResults(const std::string& expected,
45 const std::string& actual);
46
47 base::FilePath layout_test_dir_;
48 base::FilePath test_parent_dir_;
49 base::FilePath test_case_dir_;
50 base::FilePath rebase_result_dir_;
51 base::FilePath rebase_result_chromium_dir_;
52 base::FilePath rebase_result_win_dir_;
53 int port_; // -2 means no port. -1 means random.
54 scoped_ptr<LayoutTestHttpServer> test_http_server_;
55
56 scoped_ptr<WebKitTestController> test_controller_;
57
58 DISALLOW_COPY_AND_ASSIGN(InProcessBrowserLayoutTest);
59 };
60
61 } // namespace content
OLDNEW
« no previous file with comments | « content/public/common/content_paths.h ('k') | content/test/layout_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698