blob: a5e0705f08d05b81c34713eef0f43913eb2540e6 [file] [log] [blame]
license.botbf09a502008-08-24 00:55:551// Copyright (c) 2006-2008 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.
initial.commitf5b16fe2008-07-27 00:20:514
5/**
6 * Base test class used by all test shell tests. Provides boiler plate
7 * code to create and destroy a new test shell for each gTest test.
8 */
9
10#ifndef WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_TEST_H__
11#define WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_TEST_H__
12
[email protected]72cbd322009-04-07 10:17:1213#include <string>
14
15#include "base/file_path.h"
initial.commitf5b16fe2008-07-27 00:20:5116#include "webkit/glue/window_open_disposition.h"
17#include "webkit/tools/test_shell/test_shell.h"
18#include "testing/gtest/include/gtest/gtest.h"
19
20class TestShellTest : public testing::Test {
21 protected:
22 // Returns the path "test_case_path/test_case".
[email protected]3d9689372009-09-10 04:29:1723 GURL GetTestURL(const FilePath& test_case_path,
24 const std::string& test_case);
initial.commitf5b16fe2008-07-27 00:20:5125
26 virtual void SetUp();
27 virtual void TearDown();
28
29 // Don't refactor away; some unittests override this!
30 virtual void CreateEmptyWindow();
31
32 static const char* kJavascriptDelayExitScript;
[email protected]f0a51fb52009-03-05 12:46:3833
initial.commitf5b16fe2008-07-27 00:20:5134 protected:
35 // Location of SOURCE_ROOT/webkit/data/
[email protected]72cbd322009-04-07 10:17:1236 FilePath data_dir_;
initial.commitf5b16fe2008-07-27 00:20:5137
38 TestShell* test_shell_;
39};
40
41#endif // WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_TEST_H__