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

Unified Diff: third_party/leveldatabase/env_chromium_unittest.cc

Issue 140923005: Revert of Created new Windows LevelDB environment. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 11 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 | « third_party/leveldatabase/env_chromium_stdio.cc ('k') | third_party/leveldatabase/env_chromium_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « third_party/leveldatabase/env_chromium_stdio.cc ('k') | third_party/leveldatabase/env_chromium_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698