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 <stddef.h> | 5 #include <stddef.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
11 #include "base/files/file_util.h" | 11 #include "base/files/file_util.h" |
12 #include "base/files/scoped_temp_dir.h" | 12 #include "base/files/scoped_temp_dir.h" |
13 #include "base/location.h" | 13 #include "base/location.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "base/memory/ptr_util.h" | 15 #include "base/memory/ptr_util.h" |
16 #include "base/path_service.h" | 16 #include "base/path_service.h" |
17 #include "base/single_thread_task_runner.h" | 17 #include "base/single_thread_task_runner.h" |
18 #include "base/threading/thread_task_runner_handle.h" | 18 #include "base/threading/thread_task_runner_handle.h" |
19 #include "chrome/browser/media_galleries/fileapi/media_file_system_backend.h" | 19 #include "chrome/browser/media_galleries/fileapi/media_file_system_backend.h" |
20 #include "chrome/test/base/in_process_browser_test.h" | 20 #include "chrome/test/base/in_process_browser_test.h" |
21 #include "content/public/test/browser_test.h" | 21 #include "content/public/test/browser_test.h" |
22 #include "content/public/test/test_file_system_backend.h" | |
23 #include "content/public/test/test_file_system_context.h" | |
24 #include "content/public/test/test_utils.h" | 22 #include "content/public/test/test_utils.h" |
25 #include "storage/browser/fileapi/copy_or_move_file_validator.h" | 23 #include "storage/browser/fileapi/copy_or_move_file_validator.h" |
26 #include "storage/browser/fileapi/file_system_backend.h" | 24 #include "storage/browser/fileapi/file_system_backend.h" |
27 #include "storage/browser/fileapi/file_system_context.h" | 25 #include "storage/browser/fileapi/file_system_context.h" |
28 #include "storage/browser/fileapi/file_system_operation_runner.h" | 26 #include "storage/browser/fileapi/file_system_operation_runner.h" |
29 #include "storage/browser/fileapi/file_system_url.h" | 27 #include "storage/browser/fileapi/file_system_url.h" |
30 #include "storage/browser/fileapi/isolated_context.h" | 28 #include "storage/browser/fileapi/isolated_context.h" |
| 29 #include "storage/browser/test/test_file_system_backend.h" |
| 30 #include "storage/browser/test/test_file_system_context.h" |
31 #include "storage/common/fileapi/file_system_types.h" | 31 #include "storage/common/fileapi/file_system_types.h" |
32 #include "testing/gtest/include/gtest/gtest.h" | 32 #include "testing/gtest/include/gtest/gtest.h" |
33 | 33 |
34 namespace { | 34 namespace { |
35 | 35 |
36 const char kOrigin[] = "http://foo"; | 36 const char kOrigin[] = "http://foo"; |
37 | 37 |
38 const char kValidImage[] = "RIFF0\0\0\0WEBPVP8 $\0\0\0\xB2\x02\0\x9D\x01\x2A" | 38 const char kValidImage[] = "RIFF0\0\0\0WEBPVP8 $\0\0\0\xB2\x02\0\x9D\x01\x2A" |
39 "\x01\0\x01\0\x2F\x9D\xCE\xE7s\xA8((((\x01\x9CK(\0" | 39 "\x01\0\x01\0\x2F\x9D\xCE\xE7s\xA8((((\x01\x9CK(\0" |
40 "\x05\xCE\xB3l\0\0\xFE\xD8\x80\0\0"; | 40 "\x05\xCE\xB3l\0\0\xFE\xD8\x80\0\0"; |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 test_file = test_file.AppendASCII("no_streams.webm"); | 301 test_file = test_file.AppendASCII("no_streams.webm"); |
302 MoveTestFromFile("no_streams.webm", test_file, false); | 302 MoveTestFromFile("no_streams.webm", test_file, false); |
303 } | 303 } |
304 | 304 |
305 IN_PROC_BROWSER_TEST_F(MediaFileValidatorTest, ValidVideo) { | 305 IN_PROC_BROWSER_TEST_F(MediaFileValidatorTest, ValidVideo) { |
306 base::FilePath test_file = GetMediaTestDir(); | 306 base::FilePath test_file = GetMediaTestDir(); |
307 ASSERT_FALSE(test_file.empty()); | 307 ASSERT_FALSE(test_file.empty()); |
308 test_file = test_file.AppendASCII("bear-320x240-multitrack.webm"); | 308 test_file = test_file.AppendASCII("bear-320x240-multitrack.webm"); |
309 MoveTestFromFile("multitrack.webm", test_file, true); | 309 MoveTestFromFile("multitrack.webm", test_file, true); |
310 } | 310 } |
OLD | NEW |