summaryrefslogtreecommitdiffstats
path: root/webkit/fileapi/file_system_path_manager_unittest.cc
diff options
context:
space:
mode:
authorericu@chromium.org <ericu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-23 22:06:26 +0000
committerericu@chromium.org <ericu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-23 22:06:26 +0000
commitfcc2d5f0e4ff841a6af7cc7f5834985f833cf935 (patch)
tree98495fb543a672112124cb348a93a689dc8aa8f0 /webkit/fileapi/file_system_path_manager_unittest.cc
parente8b02e718bef710ecf69c52e19d4129c7e29d9ef (diff)
downloadchromium_src-fcc2d5f0e4ff841a6af7cc7f5834985f833cf935.zip
chromium_src-fcc2d5f0e4ff841a6af7cc7f5834985f833cf935.tar.gz
chromium_src-fcc2d5f0e4ff841a6af7cc7f5834985f833cf935.tar.bz2
Integrated obfuscation with quota; all unit tests now pass with or without the flag that turns on obfuscation.
BUG=none TEST=unit tests Review URL: http://codereview.chromium.org/7057032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86351 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/fileapi/file_system_path_manager_unittest.cc')
-rw-r--r--webkit/fileapi/file_system_path_manager_unittest.cc19
1 files changed, 15 insertions, 4 deletions
diff --git a/webkit/fileapi/file_system_path_manager_unittest.cc b/webkit/fileapi/file_system_path_manager_unittest.cc
index 977b657..f1f9122 100644
--- a/webkit/fileapi/file_system_path_manager_unittest.cc
+++ b/webkit/fileapi/file_system_path_manager_unittest.cc
@@ -8,6 +8,7 @@
#include <string>
#include "base/basictypes.h"
+#include "base/command_line.h" // TODO(ericu): Remove this.
#include "base/file_util.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_callback_factory.h"
@@ -26,6 +27,9 @@
namespace fileapi {
namespace {
+// TODO(ericu): Remove this.
+static const char kObfuscationFlag[] = "use-obfuscated-file-system";
+
// PS stands for path separator.
#if defined(FILE_PATH_USES_WIN_SEPARATORS)
#define PS "\\"
@@ -292,9 +296,13 @@ TEST_F(FileSystemPathManagerTest, GetRootPathCreateAndExamine) {
true /* create */, &root_path));
if (kRootPathTestCases[i].type != fileapi::kFileSystemTypeExternal) {
- FilePath expected = file_system_path().AppendASCII(
- kRootPathTestCases[i].expected_path);
- EXPECT_EQ(expected.value(), root_path.DirName().value());
+ // TODO(ericu): Put this test back, with new expectations, when we've
+ // switched over to the obfuscated filesystem.
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(kObfuscationFlag)) {
+ FilePath expected = file_system_path().AppendASCII(
+ kRootPathTestCases[i].expected_path);
+ EXPECT_EQ(expected.value(), root_path.DirName().value());
+ }
EXPECT_TRUE(file_util::DirectoryExists(root_path));
} else {
// External file system root path is virtual one and does not match
@@ -395,7 +403,10 @@ TEST_F(FileSystemPathManagerTest, GetRootPathFileURIWithAllowFlag) {
if (kRootPathFileURITestCases[i].type != fileapi::kFileSystemTypeExternal) {
FilePath expected = file_system_path().AppendASCII(
kRootPathFileURITestCases[i].expected_path);
- EXPECT_EQ(expected.value(), root_path.DirName().value());
+ // TODO(ericu): Put this test back, with new expectations, when we've
+ // switched over to the obfuscated filesystem.
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(kObfuscationFlag))
+ EXPECT_EQ(expected.value(), root_path.DirName().value());
EXPECT_TRUE(file_util::DirectoryExists(root_path));
} else {
EXPECT_EQ(external_file_path_root().value(), root_path.value());