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

Unified Diff: components/drive/file_system_core_util_unittest.cc

Issue 1296483003: Move chrome/browser/chromeos/drive/resource* (+deps) into components/drive. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing... Created 5 years, 4 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 | « components/drive/file_system_core_util.cc ('k') | components/drive/resource_entry_conversion.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/drive/file_system_core_util_unittest.cc
diff --git a/chrome/browser/chromeos/drive/file_system_core_util_unittest.cc b/components/drive/file_system_core_util_unittest.cc
similarity index 61%
rename from chrome/browser/chromeos/drive/file_system_core_util_unittest.cc
rename to components/drive/file_system_core_util_unittest.cc
index 31e30cc3d34ac5e14aee013e6f1dc43d85d02ca3..663da280a84681cba7f6722b393fa6e41644861d 100644
--- a/chrome/browser/chromeos/drive/file_system_core_util_unittest.cc
+++ b/components/drive/file_system_core_util_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/chromeos/drive/file_system_core_util.h"
+#include "components/drive/file_system_core_util.h"
#include <vector>
@@ -12,16 +12,8 @@
#include "base/single_thread_task_runner.h"
#include "base/strings/utf_string_conversions.h"
#include "base/thread_task_runner_handle.h"
-#include "chrome/browser/chromeos/drive/file_system_util.h"
-#include "chrome/test/base/testing_profile.h"
#include "content/public/test/test_browser_thread_bundle.h"
-#include "content/public/test/test_file_system_options.h"
#include "google_apis/drive/test_util.h"
-#include "storage/browser/fileapi/external_mount_points.h"
-#include "storage/browser/fileapi/file_system_backend.h"
-#include "storage/browser/fileapi/file_system_context.h"
-#include "storage/browser/fileapi/file_system_url.h"
-#include "storage/browser/fileapi/isolated_context.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace drive {
@@ -31,45 +23,6 @@ class FileSystemUtilTest : public testing::Test {
content::TestBrowserThreadBundle thread_bundle_;
};
-TEST_F(FileSystemUtilTest, IsUnderDriveMountPoint) {
- EXPECT_FALSE(IsUnderDriveMountPoint(
- base::FilePath::FromUTF8Unsafe("/wherever/foo.txt")));
- EXPECT_FALSE(IsUnderDriveMountPoint(
- base::FilePath::FromUTF8Unsafe("/special/foo.txt")));
- EXPECT_FALSE(IsUnderDriveMountPoint(
- base::FilePath::FromUTF8Unsafe("special/drive/foo.txt")));
-
- EXPECT_TRUE(
- IsUnderDriveMountPoint(base::FilePath::FromUTF8Unsafe("/special/drive")));
- EXPECT_TRUE(IsUnderDriveMountPoint(
- base::FilePath::FromUTF8Unsafe("/special/drive/foo.txt")));
- EXPECT_TRUE(IsUnderDriveMountPoint(
- base::FilePath::FromUTF8Unsafe("/special/drive/subdir/foo.txt")));
- EXPECT_TRUE(IsUnderDriveMountPoint(
- base::FilePath::FromUTF8Unsafe("/special/drive-xxx/foo.txt")));
-}
-
-TEST_F(FileSystemUtilTest, ExtractDrivePath) {
- EXPECT_EQ(
- base::FilePath(),
- ExtractDrivePath(base::FilePath::FromUTF8Unsafe("/wherever/foo.txt")));
- EXPECT_EQ(
- base::FilePath(),
- ExtractDrivePath(base::FilePath::FromUTF8Unsafe("/special/foo.txt")));
-
- EXPECT_EQ(base::FilePath::FromUTF8Unsafe("drive"),
- ExtractDrivePath(base::FilePath::FromUTF8Unsafe("/special/drive")));
- EXPECT_EQ(base::FilePath::FromUTF8Unsafe("drive/foo.txt"),
- ExtractDrivePath(
- base::FilePath::FromUTF8Unsafe("/special/drive/foo.txt")));
- EXPECT_EQ(base::FilePath::FromUTF8Unsafe("drive/subdir/foo.txt"),
- ExtractDrivePath(base::FilePath::FromUTF8Unsafe(
- "/special/drive/subdir/foo.txt")));
- EXPECT_EQ(base::FilePath::FromUTF8Unsafe("drive/foo.txt"),
- ExtractDrivePath(
- base::FilePath::FromUTF8Unsafe("/special/drive-xxx/foo.txt")));
-}
-
TEST_F(FileSystemUtilTest, EscapeUnescapeCacheFileName) {
const std::string kUnescapedFileName(
"tmp:`~!@#$%^&*()-_=+[{|]}\\\\;\',<.>/?");
« no previous file with comments | « components/drive/file_system_core_util.cc ('k') | components/drive/resource_entry_conversion.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698