OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include <string> | 5 #include <string> |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
10 #include "sql/connection.h" | 10 #include "sql/connection.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 std::string sql_text_; | 56 std::string sql_text_; |
57 }; | 57 }; |
58 | 58 |
59 // Do not include fts1 support, it is not useful, and nobody is | 59 // Do not include fts1 support, it is not useful, and nobody is |
60 // looking at it. | 60 // looking at it. |
61 TEST_F(SQLiteFeaturesTest, NoFTS1) { | 61 TEST_F(SQLiteFeaturesTest, NoFTS1) { |
62 ASSERT_EQ(SQLITE_ERROR, db().ExecuteAndReturnErrorCode( | 62 ASSERT_EQ(SQLITE_ERROR, db().ExecuteAndReturnErrorCode( |
63 "CREATE VIRTUAL TABLE foo USING fts1(x)")); | 63 "CREATE VIRTUAL TABLE foo USING fts1(x)")); |
64 } | 64 } |
65 | 65 |
66 #if !defined(OS_IOS) | 66 #if defined(SQLITE_ENABLE_FTS2) |
67 // fts2 is used for older history files, so we're signed on for keeping our | 67 // fts2 is used for older history files, so we're signed on for keeping our |
68 // version up-to-date. iOS does not include fts2, so this test does not run on | 68 // version up-to-date. |
69 // iOS. | |
70 // TODO(shess): Think up a crazy way to get out from having to support | 69 // TODO(shess): Think up a crazy way to get out from having to support |
71 // this forever. | 70 // this forever. |
72 TEST_F(SQLiteFeaturesTest, FTS2) { | 71 TEST_F(SQLiteFeaturesTest, FTS2) { |
73 ASSERT_TRUE(db().Execute("CREATE VIRTUAL TABLE foo USING fts2(x)")); | 72 ASSERT_TRUE(db().Execute("CREATE VIRTUAL TABLE foo USING fts2(x)")); |
74 } | 73 } |
75 #endif | 74 #endif |
76 | 75 |
77 // fts3 is used for current history files, and also for WebDatabase. | 76 // fts3 is used for current history files, and also for WebDatabase. |
78 TEST_F(SQLiteFeaturesTest, FTS3) { | 77 TEST_F(SQLiteFeaturesTest, FTS3) { |
79 ASSERT_TRUE(db().Execute("CREATE VIRTUAL TABLE foo USING fts3(x)")); | 78 ASSERT_TRUE(db().Execute("CREATE VIRTUAL TABLE foo USING fts3(x)")); |
80 } | 79 } |
81 | 80 |
82 } // namespace | 81 } // namespace |
OLD | NEW |