#include "base/file_path.h"
#include "base/scoped_temp_dir.h"
#include "content/test/content_browser_test.h"
class GURL;
class LayoutTestHttpServer;
namespace content {
class WebKitTestController;
}
class InProcessBrowserLayoutTest : public content::ContentBrowserTest {
public:
explicit InProcessBrowserLayoutTest(const FilePath& test_parent_dir,
const FilePath& test_case_dir);
InProcessBrowserLayoutTest(const FilePath& test_parent_dir,
const FilePath& test_case_dir,
int port);
virtual ~InProcessBrowserLayoutTest();
virtual void SetUpInProcessBrowserTestFixture() OVERRIDE;
virtual void SetUpOnMainThread() OVERRIDE;
virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE;
void RunLayoutTest(const std::string& test_case_file_name);
void RunHttpLayoutTest(const std::string& test_case_file_name);
private:
void RunLayoutTestInternal(const std::string& test_case_file_name,
const GURL& url);
std::string SaveResults(const std::string& expected,
const std::string& actual);
FilePath layout_test_dir_;
FilePath test_parent_dir_;
FilePath test_case_dir_;
FilePath rebase_result_dir_;
FilePath rebase_result_chromium_dir_;
FilePath rebase_result_win_dir_;
int port_;
scoped_ptr<LayoutTestHttpServer> test_http_server_;
scoped_ptr<content::WebKitTestController> test_controller_;
DISALLOW_COPY_AND_ASSIGN(InProcessBrowserLayoutTest);
};