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" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 loop_runner_ = new content::MessageLoopRunner; | 101 loop_runner_ = new content::MessageLoopRunner; |
102 loop_runner_->Run(); | 102 loop_runner_->Run(); |
103 } | 103 } |
104 | 104 |
105 private: | 105 private: |
106 // Create the test files, filesystem objects, etc. | 106 // Create the test files, filesystem objects, etc. |
107 void SetupOnFileThread(const std::string& filename, | 107 void SetupOnFileThread(const std::string& filename, |
108 const std::string& content, | 108 const std::string& content, |
109 bool expected_result) { | 109 bool expected_result) { |
110 ASSERT_TRUE(base_dir_.CreateUniqueTempDir()); | 110 ASSERT_TRUE(base_dir_.CreateUniqueTempDir()); |
111 base::FilePath base = base_dir_.path(); | 111 base::FilePath base = base_dir_.GetPath(); |
112 base::FilePath src_path = base.AppendASCII("src_fs"); | 112 base::FilePath src_path = base.AppendASCII("src_fs"); |
113 ASSERT_TRUE(base::CreateDirectory(src_path)); | 113 ASSERT_TRUE(base::CreateDirectory(src_path)); |
114 | 114 |
115 ScopedVector<storage::FileSystemBackend> additional_providers; | 115 ScopedVector<storage::FileSystemBackend> additional_providers; |
116 additional_providers.push_back(new content::TestFileSystemBackend( | 116 additional_providers.push_back(new content::TestFileSystemBackend( |
117 base::ThreadTaskRunnerHandle::Get().get(), src_path)); | 117 base::ThreadTaskRunnerHandle::Get().get(), src_path)); |
118 additional_providers.push_back(new MediaFileSystemBackend( | 118 additional_providers.push_back(new MediaFileSystemBackend( |
119 base, base::ThreadTaskRunnerHandle::Get().get())); | 119 base, base::ThreadTaskRunnerHandle::Get().get())); |
120 file_system_context_ = | 120 file_system_context_ = |
121 content::CreateFileSystemContextWithAdditionalProvidersForTesting( | 121 content::CreateFileSystemContextWithAdditionalProvidersForTesting( |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 test_file = test_file.AppendASCII("no_streams.webm"); | 281 test_file = test_file.AppendASCII("no_streams.webm"); |
282 MoveTestFromFile("no_streams.webm", test_file, false); | 282 MoveTestFromFile("no_streams.webm", test_file, false); |
283 } | 283 } |
284 | 284 |
285 IN_PROC_BROWSER_TEST_F(MediaFileValidatorTest, ValidVideo) { | 285 IN_PROC_BROWSER_TEST_F(MediaFileValidatorTest, ValidVideo) { |
286 base::FilePath test_file = GetMediaTestDir(); | 286 base::FilePath test_file = GetMediaTestDir(); |
287 ASSERT_FALSE(test_file.empty()); | 287 ASSERT_FALSE(test_file.empty()); |
288 test_file = test_file.AppendASCII("bear-320x240-multitrack.webm"); | 288 test_file = test_file.AppendASCII("bear-320x240-multitrack.webm"); |
289 MoveTestFromFile("multitrack.webm", test_file, true); | 289 MoveTestFromFile("multitrack.webm", test_file, true); |
290 } | 290 } |
OLD | NEW |