license.bot | bf09a50 | 2008-08-24 00:55:55 | [diff] [blame] | 1 | // 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.commit | f5b16fe | 2008-07-27 00:20:51 | [diff] [blame] | 4 | |
| 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] | 72cbd32 | 2009-04-07 10:17:12 | [diff] [blame] | 13 | #include <string> |
| 14 | |
| 15 | #include "base/file_path.h" |
initial.commit | f5b16fe | 2008-07-27 00:20:51 | [diff] [blame] | 16 | #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 | |
| 20 | class TestShellTest : public testing::Test { |
| 21 | protected: |
| 22 | // Returns the path "test_case_path/test_case". |
[email protected] | 3d968937 | 2009-09-10 04:29:17 | [diff] [blame] | 23 | GURL GetTestURL(const FilePath& test_case_path, |
| 24 | const std::string& test_case); |
initial.commit | f5b16fe | 2008-07-27 00:20:51 | [diff] [blame] | 25 | |
| 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] | f0a51fb5 | 2009-03-05 12:46:38 | [diff] [blame] | 33 | |
initial.commit | f5b16fe | 2008-07-27 00:20:51 | [diff] [blame] | 34 | protected: |
| 35 | // Location of SOURCE_ROOT/webkit/data/ |
[email protected] | 72cbd32 | 2009-04-07 10:17:12 | [diff] [blame] | 36 | FilePath data_dir_; |
initial.commit | f5b16fe | 2008-07-27 00:20:51 | [diff] [blame] | 37 | |
| 38 | TestShell* test_shell_; |
| 39 | }; |
| 40 | |
| 41 | #endif // WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_TEST_H__ |