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

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

Issue 320983002: [NaCl SDK] nacl_io: Allows subtree of html5fs to be mounted. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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/node.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 209943ceb3e20a95074004e1fbde7d7b3c2c286d..883fdffd12e07905563caf042763c119d5a078c3 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
@@ -149,6 +149,17 @@ TEST_F(Html5FsTest, PassFilesystemResource) {
}
}
+TEST_F(Html5FsTest, MountSubtree) {
+ EXPECT_TRUE(ppapi_html5_.filesystem_template()->AddEmptyFile("/foo/bar",
+ NULL));
+ StringMap_t map;
+ map["SOURCE"] = "/foo";
+ ScopedRef<Html5FsForTesting> fs(new Html5FsForTesting(map, &ppapi_));
+
+ ASSERT_EQ(0, fs->Access(Path("/bar"), R_OK | W_OK | X_OK));
+ ASSERT_EQ(ENOENT, fs->Access(Path("/foo/bar"), F_OK));
+}
+
TEST_F(Html5FsTest, Access) {
EXPECT_TRUE(ppapi_html5_.filesystem_template()->AddEmptyFile("/foo", NULL));
@@ -189,9 +200,7 @@ TEST_F(Html5FsTest, Remove) {
EXPECT_EQ(ENOENT, fs->Access(path, F_OK));
}
-// Unlink + Rmdir forward to Remove unconditionally, which will not fail if the
-// file type is wrong.
-TEST_F(Html5FsTest, DISABLED_Unlink) {
+TEST_F(Html5FsTest, Unlink) {
EXPECT_TRUE(ppapi_html5_.filesystem_template()->AddEmptyFile("/file", NULL));
EXPECT_TRUE(ppapi_html5_.filesystem_template()->AddDirectory("/dir", NULL));
@@ -204,9 +213,7 @@ TEST_F(Html5FsTest, DISABLED_Unlink) {
EXPECT_EQ(0, fs->Access(Path("/dir"), F_OK));
}
-// Unlink + Rmdir forward to Remove unconditionally, which will not fail if the
-// file type is wrong.
-TEST_F(Html5FsTest, DISABLED_Rmdir) {
+TEST_F(Html5FsTest, Rmdir) {
EXPECT_TRUE(ppapi_html5_.filesystem_template()->AddEmptyFile("/file", NULL));
EXPECT_TRUE(ppapi_html5_.filesystem_template()->AddDirectory("/dir", NULL));
« no previous file with comments | « native_client_sdk/src/libraries/nacl_io/node.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698