summaryrefslogtreecommitdiffstats
path: root/chrome/browser/history/history_unittest_base.h
blob: ce805b87416725ef90c36a4b5f7354b298233313 (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
// Copyright (c) 2011 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.

#ifndef CHROME_BROWSER_HISTORY_HISTORY_UNITTEST_BASE_H_
#define CHROME_BROWSER_HISTORY_HISTORY_UNITTEST_BASE_H_

#include "testing/gtest/include/gtest/gtest.h"

namespace base {
class FilePath;
}

namespace history {
// A base class for a history unit test. It provides the common test methods.
//
class HistoryUnitTestBase : public testing::Test {
 public:
  virtual ~HistoryUnitTestBase();

  // Executes the sql from the file |sql_path| in the database at |db_path|.
  // |sql_path| is the SQL script file name with full path.
  // |db_path| is the db file name with full path.
  static void ExecuteSQLScript(const base::FilePath& sql_path,
                               const base::FilePath& db_path);

 protected:
  HistoryUnitTestBase();

 private:
  DISALLOW_COPY_AND_ASSIGN(HistoryUnitTestBase);
};

}  // namespace history

#endif  // CHROME_BROWSER_HISTORY_HISTORY_UNITTEST_BASE_H_