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

Unified Diff: sql/mojo/vfs_unittest.cc

Issue 1179413010: mandoline filesystem: Save cookie data to the mojo:filesystem. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sqlite-fs
Patch Set: Add CHECK. Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sql/mojo/mojo_vfs.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sql/mojo/vfs_unittest.cc
diff --git a/sql/mojo/vfs_unittest.cc b/sql/mojo/vfs_unittest.cc
index 8ca7c5c21a7dad7c794e5f6a9c5e16ca9623828d..db16638c320dcdf0176c7f2d35bbe093eaf2b7ce 100644
--- a/sql/mojo/vfs_unittest.cc
+++ b/sql/mojo/vfs_unittest.cc
@@ -115,6 +115,19 @@ TEST_F(VFSTest, NonexclusiveOpen) {
file->pMethods->xClose(file2.get());
}
+TEST_F(VFSTest, NullFilenameOpen) {
+ // Opening a file with a null filename should return a valid file object.
+ scoped_ptr<sqlite3_file> file(MakeFile());
+ int out_flags;
+ int rc = vfs()->xOpen(
+ vfs(), nullptr, file.get(),
+ SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_CREATE | SQLITE_OPEN_READWRITE,
+ &out_flags);
+ EXPECT_EQ(SQLITE_OK, rc);
+
+ file->pMethods->xClose(file.get());
+}
+
TEST_F(VFSTest, DeleteOnClose) {
{
scoped_ptr<sqlite3_file> file(MakeFile());
« no previous file with comments | « sql/mojo/mojo_vfs.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698