Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(397)

Side by Side Diff: sql/sqlite_features_unittest.cc

Issue 218133002: Add unistd.h include in a file using geteuid(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ipc/ipc_sync_channel_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/file_util.h" 8 #include "base/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 28 matching lines...) Expand all
39 39
40 virtual void TearDown() { 40 virtual void TearDown() {
41 // If any error happened the original sql statement can be found in 41 // If any error happened the original sql statement can be found in
42 // |sql_text_|. 42 // |sql_text_|.
43 EXPECT_EQ(SQLITE_OK, error_); 43 EXPECT_EQ(SQLITE_OK, error_);
44 db_.Close(); 44 db_.Close();
45 } 45 }
46 46
47 sql::Connection& db() { return db_; } 47 sql::Connection& db() { return db_; }
48 48
49 int sqlite_error() const {
50 return error_;
51 }
52
53 private: 49 private:
54 base::ScopedTempDir temp_dir_; 50 base::ScopedTempDir temp_dir_;
55 sql::Connection db_; 51 sql::Connection db_;
56 52
57 // The error code of the most recent error. 53 // The error code of the most recent error.
58 int error_; 54 int error_;
59 // Original statement which has caused the error. 55 // Original statement which has caused the error.
60 std::string sql_text_; 56 std::string sql_text_;
61 }; 57 };
62 58
(...skipping 14 matching lines...) Expand all
77 ASSERT_TRUE(db().Execute("CREATE VIRTUAL TABLE foo USING fts2(x)")); 73 ASSERT_TRUE(db().Execute("CREATE VIRTUAL TABLE foo USING fts2(x)"));
78 } 74 }
79 #endif 75 #endif
80 76
81 // fts3 is used for current history files, and also for WebDatabase. 77 // fts3 is used for current history files, and also for WebDatabase.
82 TEST_F(SQLiteFeaturesTest, FTS3) { 78 TEST_F(SQLiteFeaturesTest, FTS3) {
83 ASSERT_TRUE(db().Execute("CREATE VIRTUAL TABLE foo USING fts3(x)")); 79 ASSERT_TRUE(db().Execute("CREATE VIRTUAL TABLE foo USING fts3(x)"));
84 } 80 }
85 81
86 } // namespace 82 } // namespace
OLDNEW
« no previous file with comments | « ipc/ipc_sync_channel_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698