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

Side by Side Diff: sql/mojo/vfs_unittest.cc

Issue 1272373004: Fix Mandoline apptests on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ' Created 5 years, 4 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
« no previous file with comments | « sql/mojo/mojo_vfs.cc ('k') | ui/gl/gl_implementation_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/filesystem/public/interfaces/file_system.mojom.h" 5 #include "components/filesystem/public/interfaces/file_system.mojom.h"
6 #include "mojo/application/public/cpp/application_impl.h" 6 #include "mojo/application/public/cpp/application_impl.h"
7 #include "mojo/application/public/cpp/application_test_base.h" 7 #include "mojo/application/public/cpp/application_test_base.h"
8 #include "mojo/util/capture_util.h" 8 #include "mojo/util/capture_util.h"
9 #include "sql/mojo/mojo_vfs.h" 9 #include "sql/mojo/mojo_vfs.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 private: 76 private:
77 filesystem::FileSystemPtr files_; 77 filesystem::FileSystemPtr files_;
78 scoped_ptr<ScopedMojoFilesystemVFS> vfs_; 78 scoped_ptr<ScopedMojoFilesystemVFS> vfs_;
79 mojo::Binding<filesystem::FileSystemClient> binding_; 79 mojo::Binding<filesystem::FileSystemClient> binding_;
80 80
81 DISALLOW_COPY_AND_ASSIGN(VFSTest); 81 DISALLOW_COPY_AND_ASSIGN(VFSTest);
82 }; 82 };
83 83
84 TEST_F(VFSTest, TestInstalled) { 84 TEST_F(VFSTest, TestInstalled) {
85 EXPECT_EQ("mojo", vfs()->zName); 85 EXPECT_EQ("mojo", std::string(vfs()->zName));
jam 2015/08/05 23:08:44 with vs this was comparing the address of the stri
86 } 86 }
87 87
88 TEST_F(VFSTest, ExclusiveOpen) { 88 TEST_F(VFSTest, ExclusiveOpen) {
89 // Opening a non-existent file exclusively should work. 89 // Opening a non-existent file exclusively should work.
90 scoped_ptr<sqlite3_file> file(MakeFile()); 90 scoped_ptr<sqlite3_file> file(MakeFile());
91 int out_flags; 91 int out_flags;
92 int rc = vfs()->xOpen(vfs(), kFileName, file.get(), 92 int rc = vfs()->xOpen(vfs(), kFileName, file.get(),
93 SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_CREATE, 93 SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_CREATE,
94 &out_flags); 94 &out_flags);
95 EXPECT_EQ(SQLITE_OK, rc); 95 EXPECT_EQ(SQLITE_OK, rc);
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 EXPECT_EQ(SQLITE_OK, rc); 330 EXPECT_EQ(SQLITE_OK, rc);
331 331
332 rc = file->pMethods->xFileSize(file.get(), &size); 332 rc = file->pMethods->xFileSize(file.get(), &size);
333 EXPECT_EQ(SQLITE_OK, rc); 333 EXPECT_EQ(SQLITE_OK, rc);
334 EXPECT_EQ(kCharsToThree, size); 334 EXPECT_EQ(kCharsToThree, size);
335 335
336 file->pMethods->xClose(file.get()); 336 file->pMethods->xClose(file.get());
337 } 337 }
338 338
339 } // namespace sql 339 } // namespace sql
OLDNEW
« no previous file with comments | « sql/mojo/mojo_vfs.cc ('k') | ui/gl/gl_implementation_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698