| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "storage/browser/fileapi/file_system_context.h" | 5 #include "storage/browser/fileapi/file_system_context.h" |
| 6 | 6 |
| 7 #include "base/files/scoped_temp_dir.h" | 7 #include "base/files/scoped_temp_dir.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "content/browser/quota/mock_quota_manager.h" | 10 #include "content/browser/quota/mock_quota_manager.h" |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 // The rest of values will be ignored. | 283 // The rest of values will be ignored. |
| 284 storage::kFileSystemTypeUnknown, storage::kFileSystemTypeUnknown, | 284 storage::kFileSystemTypeUnknown, storage::kFileSystemTypeUnknown, |
| 285 FPL(""), std::string()}, | 285 FPL(""), std::string()}, |
| 286 // Test for URL with non-existing filesystem id. | 286 // Test for URL with non-existing filesystem id. |
| 287 {"invalid", "external", false /* is_valid */, | 287 {"invalid", "external", false /* is_valid */, |
| 288 // The rest of values will be ignored. | 288 // The rest of values will be ignored. |
| 289 storage::kFileSystemTypeUnknown, storage::kFileSystemTypeUnknown, | 289 storage::kFileSystemTypeUnknown, storage::kFileSystemTypeUnknown, |
| 290 FPL(""), std::string()}, | 290 FPL(""), std::string()}, |
| 291 }; | 291 }; |
| 292 | 292 |
| 293 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kTestCases); ++i) { | 293 for (size_t i = 0; i < arraysize(kTestCases); ++i) { |
| 294 const base::FilePath virtual_path = | 294 const base::FilePath virtual_path = |
| 295 base::FilePath::FromUTF8Unsafe( | 295 base::FilePath::FromUTF8Unsafe( |
| 296 kTestCases[i].root).Append(kVirtualPathNoRoot); | 296 kTestCases[i].root).Append(kVirtualPathNoRoot); |
| 297 | 297 |
| 298 GURL raw_url = | 298 GURL raw_url = |
| 299 CreateRawFileSystemURL(kTestCases[i].type_str, kTestCases[i].root); | 299 CreateRawFileSystemURL(kTestCases[i].type_str, kTestCases[i].root); |
| 300 FileSystemURL cracked_url = file_system_context->CrackURL(raw_url); | 300 FileSystemURL cracked_url = file_system_context->CrackURL(raw_url); |
| 301 | 301 |
| 302 SCOPED_TRACE(testing::Message() << "Test case " << i << ": " | 302 SCOPED_TRACE(testing::Message() << "Test case " << i << ": " |
| 303 << "Cracking URL: " << raw_url); | 303 << "Cracking URL: " << raw_url); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 EXPECT_TRUE(context->CanServeURLRequest(cracked_url)); | 362 EXPECT_TRUE(context->CanServeURLRequest(cracked_url)); |
| 363 | 363 |
| 364 ExternalMountPoints::GetSystemInstance()->RevokeFileSystem( | 364 ExternalMountPoints::GetSystemInstance()->RevokeFileSystem( |
| 365 kExternalMountName); | 365 kExternalMountName); |
| 366 IsolatedContext::GetInstance()->RevokeFileSystem(isolated_fs_id); | 366 IsolatedContext::GetInstance()->RevokeFileSystem(isolated_fs_id); |
| 367 } | 367 } |
| 368 | 368 |
| 369 } // namespace | 369 } // namespace |
| 370 | 370 |
| 371 } // namespace content | 371 } // namespace content |
| OLD | NEW |