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

Side by Side Diff: chrome/browser/chromeos/drive/file_system_util_unittest.cc

Issue 23440033: Move FileAPI test code from webkit to content (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/media_galleries/fileapi/itunes_file_util_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/drive/file_system_util.h" 5 #include "chrome/browser/chromeos/drive/file_system_util.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "base/md5.h" 10 #include "base/md5.h"
11 #include "base/message_loop/message_loop.h" 11 #include "base/message_loop/message_loop.h"
12 #include "base/strings/utf_string_conversions.h" 12 #include "base/strings/utf_string_conversions.h"
13 #include "chrome/browser/google_apis/test_util.h" 13 #include "chrome/browser/google_apis/test_util.h"
14 #include "chrome/test/base/testing_profile.h" 14 #include "chrome/test/base/testing_profile.h"
15 #include "content/public/test/test_file_system_options.h"
15 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
16 #include "webkit/browser/fileapi/external_mount_points.h" 17 #include "webkit/browser/fileapi/external_mount_points.h"
17 #include "webkit/browser/fileapi/file_system_backend.h" 18 #include "webkit/browser/fileapi/file_system_backend.h"
18 #include "webkit/browser/fileapi/file_system_context.h" 19 #include "webkit/browser/fileapi/file_system_context.h"
19 #include "webkit/browser/fileapi/file_system_url.h" 20 #include "webkit/browser/fileapi/file_system_url.h"
20 #include "webkit/browser/fileapi/isolated_context.h" 21 #include "webkit/browser/fileapi/isolated_context.h"
21 #include "webkit/browser/fileapi/mock_file_system_options.h"
22 22
23 namespace drive { 23 namespace drive {
24 namespace util { 24 namespace util {
25 25
26 TEST(FileSystemUtilTest, FilePathToDriveURL) { 26 TEST(FileSystemUtilTest, FilePathToDriveURL) {
27 base::FilePath path; 27 base::FilePath path;
28 28
29 // Path with alphabets and numbers. 29 // Path with alphabets and numbers.
30 path = GetDriveMyDriveRootPath().AppendASCII("foo/bar012.txt"); 30 path = GetDriveMyDriveRootPath().AppendASCII("foo/bar012.txt");
31 EXPECT_EQ(path, DriveURLToFilePath(FilePathToDriveURL(path))); 31 EXPECT_EQ(path, DriveURLToFilePath(FilePathToDriveURL(path)));
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 330
331 base::FilePath path = temp_dir.path().AppendASCII("test.txt"); 331 base::FilePath path = temp_dir.path().AppendASCII("test.txt");
332 const char kTestData[] = "abcdefghijklmnopqrstuvwxyz0123456789"; 332 const char kTestData[] = "abcdefghijklmnopqrstuvwxyz0123456789";
333 ASSERT_TRUE(google_apis::test_util::WriteStringToFile(path, kTestData)); 333 ASSERT_TRUE(google_apis::test_util::WriteStringToFile(path, kTestData));
334 334
335 EXPECT_EQ(base::MD5String(kTestData), GetMd5Digest(path)); 335 EXPECT_EQ(base::MD5String(kTestData), GetMd5Digest(path));
336 } 336 }
337 337
338 } // namespace util 338 } // namespace util
339 } // namespace drive 339 } // namespace drive
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/media_galleries/fileapi/itunes_file_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698