| Index: third_party/leveldatabase/env_chromium_unittest.cc
|
| diff --git a/third_party/leveldatabase/env_chromium_unittest.cc b/third_party/leveldatabase/env_chromium_unittest.cc
|
| index d15a44524aa0de9c42a3530ce1e5d37f1e083d01..05669f1be011906d23017f8fd4f204d91e2fce1b 100644
|
| --- a/third_party/leveldatabase/env_chromium_unittest.cc
|
| +++ b/third_party/leveldatabase/env_chromium_unittest.cc
|
| @@ -7,10 +7,7 @@
|
| #include "base/files/file_path.h"
|
| #include "base/files/scoped_temp_dir.h"
|
| #include "base/test/test_suite.h"
|
| -#include "env_chromium_stdio.h"
|
| -#if defined(OS_WIN)
|
| -#include "env_chromium_win.h"
|
| -#endif
|
| +#include "env_chromium.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| #include "third_party/leveldatabase/env_idb.h"
|
| #include "third_party/leveldatabase/src/include/leveldb/db.h"
|
| @@ -57,21 +54,6 @@
|
| EXPECT_EQ(some_errno, error);
|
| }
|
|
|
| -#if defined(OS_WIN)
|
| -TEST(ErrorEncoding, ErrnoWin32) {
|
| - const MethodID in_method = kWritableFileFlush;
|
| - const DWORD some_errno = ERROR_FILE_NOT_FOUND;
|
| - const Status s =
|
| - MakeIOErrorWin("Somefile.txt", "message", in_method, some_errno);
|
| - MethodID method;
|
| - int error;
|
| - EXPECT_EQ(METHOD_AND_ERRNO,
|
| - ParseMethodAndError(s.ToString().c_str(), &method, &error));
|
| - EXPECT_EQ(in_method, method);
|
| - EXPECT_EQ(some_errno, error);
|
| -}
|
| -#endif
|
| -
|
| TEST(ErrorEncoding, NoEncodedMessage) {
|
| Status s = Status::IOError("Some message", "from leveldb itself");
|
| MethodID method = kRandomAccessFileRead;
|
| @@ -81,8 +63,7 @@
|
| EXPECT_EQ(4, error);
|
| }
|
|
|
| -template <typename T>
|
| -class MyEnv : public T {
|
| +class MyEnv : public ChromiumEnv {
|
| public:
|
| MyEnv() : directory_syncs_(0) {}
|
| int directory_syncs() { return directory_syncs_; }
|
| @@ -97,21 +78,8 @@
|
| int directory_syncs_;
|
| };
|
|
|
| -template <typename T>
|
| -class ChromiumEnvMultiPlatformTests : public ::testing::Test {
|
| - public:
|
| -};
|
| -
|
| -#if defined(OS_WIN)
|
| -typedef ::testing::Types<ChromiumEnvStdio, ChromiumEnvWin> ChromiumEnvMultiPlatformTestsTypes;
|
| -#else
|
| -typedef ::testing::Types<ChromiumEnvStdio> ChromiumEnvMultiPlatformTestsTypes;
|
| -#endif
|
| -TYPED_TEST_CASE(ChromiumEnvMultiPlatformTests, ChromiumEnvMultiPlatformTestsTypes);
|
| -
|
| -TYPED_TEST(ChromiumEnvMultiPlatformTests, DirectorySyncing) {
|
| - MyEnv<TypeParam> env;
|
| -
|
| +TEST(ChromiumEnv, DirectorySyncing) {
|
| + MyEnv env;
|
| base::ScopedTempDir dir;
|
| dir.CreateUniqueTempDir();
|
| base::FilePath dir_path = dir.path();
|
|
|