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

Unified Diff: webkit/fileapi/file_system_path_manager_unittest.cc

Issue 7057032: Integrated obfuscation with quota; all unit tests now pass (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Eliminated a vector copy Created 9 years, 7 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
Index: webkit/fileapi/file_system_path_manager_unittest.cc
diff --git a/webkit/fileapi/file_system_path_manager_unittest.cc b/webkit/fileapi/file_system_path_manager_unittest.cc
index 977b65770b3af7013dcdc444f7693213504959b9..f1f9122e60561fc56987b9f78c1eec376fd95783 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());
« no previous file with comments | « webkit/fileapi/file_system_origin_database_unittest.cc ('k') | webkit/fileapi/file_system_quota_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698