| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * Base test class used by all test shell tests. Provides boiler plate | 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. | 7 * code to create and destroy a new test shell for each gTest test. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 #ifndef WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_TEST_H__ | 10 #ifndef WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_TEST_H__ |
| 11 #define WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_TEST_H__ | 11 #define WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_TEST_H__ |
| 12 | 12 |
| 13 #include <string> |
| 14 |
| 15 #include "base/file_path.h" |
| 13 #include "webkit/glue/window_open_disposition.h" | 16 #include "webkit/glue/window_open_disposition.h" |
| 14 #include "webkit/tools/test_shell/test_shell.h" | 17 #include "webkit/tools/test_shell/test_shell.h" |
| 15 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
| 16 | 19 |
| 17 class TestShellTest : public testing::Test { | 20 class TestShellTest : public testing::Test { |
| 18 protected: | 21 protected: |
| 19 // Returns the path "test_case_path/test_case". | 22 // Returns the path "test_case_path/test_case". |
| 20 std::wstring GetTestURL(std::wstring test_case_path, | 23 std::wstring GetTestURL(const FilePath& test_case_path, |
| 21 const std::wstring& test_case); | 24 const std::string& test_case); |
| 22 | 25 |
| 23 virtual void SetUp(); | 26 virtual void SetUp(); |
| 24 virtual void TearDown(); | 27 virtual void TearDown(); |
| 25 | 28 |
| 26 // Don't refactor away; some unittests override this! | 29 // Don't refactor away; some unittests override this! |
| 27 virtual void CreateEmptyWindow(); | 30 virtual void CreateEmptyWindow(); |
| 28 | 31 |
| 29 static const char* kJavascriptDelayExitScript; | 32 static const char* kJavascriptDelayExitScript; |
| 30 | 33 |
| 31 protected: | 34 protected: |
| 32 // Location of SOURCE_ROOT/webkit/data/ | 35 // Location of SOURCE_ROOT/webkit/data/ |
| 33 std::wstring data_dir_; | 36 FilePath data_dir_; |
| 34 | 37 |
| 35 TestShell* test_shell_; | 38 TestShell* test_shell_; |
| 36 }; | 39 }; |
| 37 | 40 |
| 38 #endif // WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_TEST_H__ | 41 #endif // WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_TEST_H__ |
| OLD | NEW |