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

Unified Diff: third_party/leveldatabase/env_chromium_unittest.cc

Issue 805043006: IndexedDB: ParseMethodAndError takes a leveldb::Status instance. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
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 46be76822e50f0a9506eaffe6953799922374293..72a1efb3af355317d3e0709f82ab3878201a3b2b 100644
--- a/third_party/leveldatabase/env_chromium_unittest.cc
+++ b/third_party/leveldatabase/env_chromium_unittest.cc
@@ -32,8 +32,7 @@ TEST(ErrorEncoding, OnlyAMethod) {
const Status s = MakeIOError("Somefile.txt", "message", in_method);
MethodID method;
int error = -75;
- EXPECT_EQ(leveldb_env::METHOD_ONLY,
- ParseMethodAndError(s.ToString().c_str(), &method, &error));
+ EXPECT_EQ(leveldb_env::METHOD_ONLY, ParseMethodAndError(s, &method, &error));
EXPECT_EQ(in_method, method);
EXPECT_EQ(-75, error);
}
@@ -45,7 +44,7 @@ TEST(ErrorEncoding, FileError) {
MethodID method;
int error;
EXPECT_EQ(leveldb_env::METHOD_AND_PFE,
- ParseMethodAndError(s.ToString().c_str(), &method, &error));
+ ParseMethodAndError(s, &method, &error));
EXPECT_EQ(in_method, method);
EXPECT_EQ(fe, error);
}
@@ -54,8 +53,7 @@ TEST(ErrorEncoding, NoEncodedMessage) {
Status s = Status::IOError("Some message", "from leveldb itself");
MethodID method = leveldb_env::kRandomAccessFileRead;
int error = 4;
- EXPECT_EQ(leveldb_env::NONE,
- ParseMethodAndError(s.ToString().c_str(), &method, &error));
+ EXPECT_EQ(leveldb_env::NONE, ParseMethodAndError(s, &method, &error));
EXPECT_EQ(leveldb_env::kRandomAccessFileRead, method);
EXPECT_EQ(4, error);
}
« third_party/leveldatabase/env_chromium.cc ('K') | « third_party/leveldatabase/env_chromium.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698