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/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/scoped_temp_dir.h" | 8 #include "base/scoped_temp_dir.h" |
9 #include "sql/connection.h" | 9 #include "sql/connection.h" |
10 #include "sql/statement.h" | 10 #include "sql/statement.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 scoped_refptr<StatementErrorHandler> error_handler_; | 76 scoped_refptr<StatementErrorHandler> error_handler_; |
77 }; | 77 }; |
78 | 78 |
79 // Do not include fts1 support, it is not useful, and nobody is | 79 // Do not include fts1 support, it is not useful, and nobody is |
80 // looking at it. | 80 // looking at it. |
81 TEST_F(SQLiteFeaturesTest, NoFTS1) { | 81 TEST_F(SQLiteFeaturesTest, NoFTS1) { |
82 ASSERT_EQ(SQLITE_ERROR, db().ExecuteAndReturnErrorCode( | 82 ASSERT_EQ(SQLITE_ERROR, db().ExecuteAndReturnErrorCode( |
83 "CREATE VIRTUAL TABLE foo USING fts1(x)")); | 83 "CREATE VIRTUAL TABLE foo USING fts1(x)")); |
84 } | 84 } |
85 | 85 |
86 // fts2 is used for older history files, so we're signed on for | 86 #if !defined(OS_IOS) |
87 // keeping our version up-to-date. | 87 // fts2 is used for older history files, so we're signed on for keeping our |
| 88 // version up-to-date. iOS does not include fts2, so this test does not run on |
| 89 // iOS. |
88 // TODO(shess): Think up a crazy way to get out from having to support | 90 // TODO(shess): Think up a crazy way to get out from having to support |
89 // this forever. | 91 // this forever. |
90 TEST_F(SQLiteFeaturesTest, FTS2) { | 92 TEST_F(SQLiteFeaturesTest, FTS2) { |
91 ASSERT_TRUE(db().Execute("CREATE VIRTUAL TABLE foo USING fts2(x)")); | 93 ASSERT_TRUE(db().Execute("CREATE VIRTUAL TABLE foo USING fts2(x)")); |
92 } | 94 } |
| 95 #endif |
93 | 96 |
94 // fts3 is used for current history files, and also for WebDatabase. | 97 // fts3 is used for current history files, and also for WebDatabase. |
95 TEST_F(SQLiteFeaturesTest, FTS3) { | 98 TEST_F(SQLiteFeaturesTest, FTS3) { |
96 ASSERT_TRUE(db().Execute("CREATE VIRTUAL TABLE foo USING fts3(x)")); | 99 ASSERT_TRUE(db().Execute("CREATE VIRTUAL TABLE foo USING fts3(x)")); |
97 } | 100 } |
98 | 101 |
99 } // namespace | 102 } // namespace |
OLD | NEW |