summaryrefslogtreecommitdiffstats
path: root/webkit/tools/test_shell/test_shell_test.h
blob: 48dc8f93674a1ce038b37d4f1316c4b593553c4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

/**
 * Base test class used by all test shell tests.  Provides boiler plate
 * code to create and destroy a new test shell for each gTest test.
 */

#ifndef WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_TEST_H__
#define WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_TEST_H__

#include <string>

#include "base/file_path.h"
#include "webkit/glue/window_open_disposition.h"
#include "webkit/tools/test_shell/test_shell.h"
#include "testing/gtest/include/gtest/gtest.h"

class TestShellTest : public testing::Test {
 protected:
  // Returns the path "test_case_path/test_case".
  GURL GetTestURL(const FilePath& test_case_path,
                  const std::string& test_case);

  virtual void SetUp();
  virtual void TearDown();

  // Don't refactor away; some unittests override this!
  virtual void CreateEmptyWindow();

  static const char* const kJavascriptDelayExitScript;

 protected:
  // Location of SOURCE_ROOT/webkit/data/
  FilePath data_dir_;

  TestShell* test_shell_;
};

#endif // WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_TEST_H__