diff options
author | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-26 15:20:04 +0000 |
---|---|---|
committer | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-26 15:20:04 +0000 |
commit | 118310616de7a8a6344aa46a7596b542e2329605 (patch) | |
tree | 1848c6689bc1ec2c19969e7bc906904b37bf7551 /content/test/layout_browsertest.h | |
parent | a55be12bd48805850f2a3404af9116b09b1c4ebb (diff) | |
download | chromium_src-118310616de7a8a6344aa46a7596b542e2329605.zip chromium_src-118310616de7a8a6344aa46a7596b542e2329605.tar.gz chromium_src-118310616de7a8a6344aa46a7596b542e2329605.tar.bz2 |
Rewrite layout_browsertests to use content_shell --dump-render-tree to execute layout tests
break down of changes
- refactor WebKitTestResultPrinter to print to a stream
- allow for swapping the result printer
- add testRunner.workerThreadCount implementation and testRunner.overridePreference stub
- rip out the fake testRunner and result getting / formatting code from InProcessBrowserLayoutTest
- make it use WebKitTestController to run the tests
- remove all the code for copying resources around (since we don't need to patch the tests, we can just read the original)
BUG=none
TEST=layout_browsertests passes
Review URL: https://chromiumcodereview.appspot.com/10941011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@158803 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/test/layout_browsertest.h')
-rw-r--r-- | content/test/layout_browsertest.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/content/test/layout_browsertest.h b/content/test/layout_browsertest.h index 00c1213..c406466 100644 --- a/content/test/layout_browsertest.h +++ b/content/test/layout_browsertest.h @@ -8,6 +8,9 @@ class GURL; class LayoutTestHttpServer; +namespace content { +class WebKitTestController; +} class InProcessBrowserLayoutTest : public content::ContentBrowserTest { public: @@ -26,33 +29,31 @@ class InProcessBrowserLayoutTest : public content::ContentBrowserTest { virtual ~InProcessBrowserLayoutTest(); virtual void SetUpInProcessBrowserTestFixture() OVERRIDE; + virtual void SetUpOnMainThread() OVERRIDE; + virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; // Runs a layout test given its filename relative to the path given to the // constructor. void RunLayoutTest(const std::string& test_case_file_name); // Runs a layout test using the HTTP test server. The second constructor must // have been used. void RunHttpLayoutTest(const std::string& test_case_file_name); - void AddResourceForLayoutTest(const FilePath& parent_dir, - const FilePath& resource_name); private: void RunLayoutTestInternal(const std::string& test_case_file_name, const GURL& url); - void WriteModifiedFile(const std::string& test_case_file_name, - FilePath* test_path); std::string SaveResults(const std::string& expected, const std::string& actual); - FilePath our_original_layout_test_dir_; + FilePath layout_test_dir_; FilePath test_parent_dir_; FilePath test_case_dir_; - FilePath our_layout_test_temp_dir_; FilePath rebase_result_dir_; FilePath rebase_result_chromium_dir_; FilePath rebase_result_win_dir_; - ScopedTempDir scoped_temp_dir_; int port_; // -2 means no port. -1 means random. scoped_ptr<LayoutTestHttpServer> test_http_server_; + scoped_ptr<content::WebKitTestController> test_controller_; + DISALLOW_COPY_AND_ASSIGN(InProcessBrowserLayoutTest); }; |