summaryrefslogtreecommitdiffstats
path: root/chrome/browser/history/history_unittest_base.h
blob: 1d9512d617230eedad312f935b16d866e1a91470 (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
// 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 "base/file_util.h"
#include "testing/gtest/include/gtest/gtest.h"

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 FilePath& sql_path,
                               const FilePath& db_path);

 protected:
  HistoryUnitTestBase();

 private:
  DISALLOW_COPY_AND_ASSIGN(HistoryUnitTestBase);
};

} // namespace history

#endif  // CHROME_BROWSER_HISTORY_HISTORY_UNITTEST_BASE_H_