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

Unified Diff: native_client_sdk/src/tests/nacl_io_test/html5_fs_test.cc

Issue 899003002: Fixing bad error return code in html5fs remove/unlink/rmdir. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | « native_client_sdk/src/libraries/nacl_io/html5fs/html5_fs.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: native_client_sdk/src/tests/nacl_io_test/html5_fs_test.cc
diff --git a/native_client_sdk/src/tests/nacl_io_test/html5_fs_test.cc b/native_client_sdk/src/tests/nacl_io_test/html5_fs_test.cc
index 3cb8d1646da9cabfe925fcf3763922360698e164..abffa13d22d7b2b16143d029d4460f8f3a285096 100644
--- a/native_client_sdk/src/tests/nacl_io_test/html5_fs_test.cc
+++ b/native_client_sdk/src/tests/nacl_io_test/html5_fs_test.cc
@@ -198,6 +198,7 @@ TEST_F(Html5FsTest, Remove) {
ASSERT_TRUE(fs->Exists(kPath));
ASSERT_EQ(0, fs->Remove(path));
EXPECT_FALSE(fs->Exists(kPath));
+ ASSERT_EQ(ENOENT, fs->Remove(path));
}
TEST_F(Html5FsTest, Unlink) {
@@ -213,6 +214,7 @@ TEST_F(Html5FsTest, Unlink) {
ASSERT_EQ(EISDIR, fs->Unlink(Path("/dir")));
EXPECT_FALSE(fs->Exists("/file"));
EXPECT_TRUE(fs->Exists("/dir"));
+ ASSERT_EQ(ENOENT, fs->Unlink(Path("/file")));
}
TEST_F(Html5FsTest, Rmdir) {
@@ -226,6 +228,7 @@ TEST_F(Html5FsTest, Rmdir) {
EXPECT_EQ(0, fs->Rmdir(Path("/dir")));
EXPECT_FALSE(fs->Exists("/dir"));
EXPECT_TRUE(fs->Exists("/file"));
+ EXPECT_EQ(ENOENT, fs->Rmdir(Path("/dir")));
}
TEST_F(Html5FsTest, Rename) {
« no previous file with comments | « native_client_sdk/src/libraries/nacl_io/html5fs/html5_fs.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698