• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2011 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.
4 
5 #ifndef CHROME_BROWSER_HISTORY_HISTORY_UNITTEST_BASE_H_
6 #define CHROME_BROWSER_HISTORY_HISTORY_UNITTEST_BASE_H_
7 
8 #include "base/file_util.h"
9 #include "testing/gtest/include/gtest/gtest.h"
10 
11 namespace history {
12 // A base class for a history unit test. It provides the common test methods.
13 //
14 class HistoryUnitTestBase : public testing::Test {
15  public:
16   virtual ~HistoryUnitTestBase();
17 
18   // Executes the sql from the file |sql_path| in the database at |db_path|.
19   // |sql_path| is the SQL script file name with full path.
20   // |db_path| is the db file name with full path.
21   static void ExecuteSQLScript(const FilePath& sql_path,
22                                const FilePath& db_path);
23 
24  protected:
25   HistoryUnitTestBase();
26 
27  private:
28   DISALLOW_COPY_AND_ASSIGN(HistoryUnitTestBase);
29 };
30 
31 } // namespace history
32 
33 #endif  // CHROME_BROWSER_HISTORY_HISTORY_UNITTEST_BASE_H_
34