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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
11 #include "base/message_loop/message_loop_proxy.h" | 11 #include "base/message_loop/message_loop_proxy.h" |
12 #include "base/path_service.h" | 12 #include "base/path_service.h" |
13 #include "chrome/browser/media_galleries/fileapi/media_file_system_backend.h" | 13 #include "chrome/browser/media_galleries/fileapi/media_file_system_backend.h" |
14 #include "chrome/test/base/in_process_browser_test.h" | 14 #include "chrome/test/base/in_process_browser_test.h" |
15 #include "content/public/test/browser_test.h" | 15 #include "content/public/test/browser_test.h" |
16 #include "content/public/test/test_file_system_backend.h" | 16 #include "content/public/test/test_file_system_backend.h" |
17 #include "content/public/test/test_file_system_context.h" | 17 #include "content/public/test/test_file_system_context.h" |
18 #include "content/public/test/test_utils.h" | 18 #include "content/public/test/test_utils.h" |
| 19 #include "storage/browser/fileapi/copy_or_move_file_validator.h" |
| 20 #include "storage/browser/fileapi/file_system_backend.h" |
| 21 #include "storage/browser/fileapi/file_system_context.h" |
| 22 #include "storage/browser/fileapi/file_system_operation_runner.h" |
| 23 #include "storage/browser/fileapi/file_system_url.h" |
| 24 #include "storage/browser/fileapi/isolated_context.h" |
19 #include "storage/common/fileapi/file_system_types.h" | 25 #include "storage/common/fileapi/file_system_types.h" |
20 #include "testing/gtest/include/gtest/gtest.h" | 26 #include "testing/gtest/include/gtest/gtest.h" |
21 #include "webkit/browser/fileapi/copy_or_move_file_validator.h" | |
22 #include "webkit/browser/fileapi/file_system_backend.h" | |
23 #include "webkit/browser/fileapi/file_system_context.h" | |
24 #include "webkit/browser/fileapi/file_system_operation_runner.h" | |
25 #include "webkit/browser/fileapi/file_system_url.h" | |
26 #include "webkit/browser/fileapi/isolated_context.h" | |
27 | 27 |
28 namespace { | 28 namespace { |
29 | 29 |
30 const char kOrigin[] = "http://foo"; | 30 const char kOrigin[] = "http://foo"; |
31 | 31 |
32 const char kValidImage[] = "RIFF0\0\0\0WEBPVP8 $\0\0\0\xB2\x02\0\x9D\x01\x2A" | 32 const char kValidImage[] = "RIFF0\0\0\0WEBPVP8 $\0\0\0\xB2\x02\0\x9D\x01\x2A" |
33 "\x01\0\x01\0\x2F\x9D\xCE\xE7s\xA8((((\x01\x9CK(\0" | 33 "\x01\0\x01\0\x2F\x9D\xCE\xE7s\xA8((((\x01\x9CK(\0" |
34 "\x05\xCE\xB3l\0\0\xFE\xD8\x80\0\0"; | 34 "\x05\xCE\xB3l\0\0\xFE\xD8\x80\0\0"; |
35 | 35 |
36 const char kInvalidMediaFile[] = "Not a media file"; | 36 const char kInvalidMediaFile[] = "Not a media file"; |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 test_file = test_file.AppendASCII("no_streams.webm"); | 276 test_file = test_file.AppendASCII("no_streams.webm"); |
277 MoveTestFromFile("no_streams.webm", test_file, false); | 277 MoveTestFromFile("no_streams.webm", test_file, false); |
278 } | 278 } |
279 | 279 |
280 IN_PROC_BROWSER_TEST_F(MediaFileValidatorTest, ValidVideo) { | 280 IN_PROC_BROWSER_TEST_F(MediaFileValidatorTest, ValidVideo) { |
281 base::FilePath test_file = GetMediaTestDir(); | 281 base::FilePath test_file = GetMediaTestDir(); |
282 ASSERT_FALSE(test_file.empty()); | 282 ASSERT_FALSE(test_file.empty()); |
283 test_file = test_file.AppendASCII("bear-320x240-multitrack.webm"); | 283 test_file = test_file.AppendASCII("bear-320x240-multitrack.webm"); |
284 MoveTestFromFile("multitrack.webm", test_file, true); | 284 MoveTestFromFile("multitrack.webm", test_file, true); |
285 } | 285 } |
OLD | NEW |