| 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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 int test_file_size_; | 246 int test_file_size_; |
| 247 | 247 |
| 248 storage::FileSystemURL move_src_; | 248 storage::FileSystemURL move_src_; |
| 249 storage::FileSystemURL move_dest_; | 249 storage::FileSystemURL move_dest_; |
| 250 | 250 |
| 251 scoped_refptr<content::MessageLoopRunner> loop_runner_; | 251 scoped_refptr<content::MessageLoopRunner> loop_runner_; |
| 252 | 252 |
| 253 DISALLOW_COPY_AND_ASSIGN(MediaFileValidatorTest); | 253 DISALLOW_COPY_AND_ASSIGN(MediaFileValidatorTest); |
| 254 }; | 254 }; |
| 255 | 255 |
| 256 IN_PROC_BROWSER_TEST_F(MediaFileValidatorTest, UnsupportedExtension) { | 256 // Flaky on linux_chromium_rel_ng. https://crbug.com/704614. |
| 257 #if defined(OS_LINUX) |
| 258 #define MAYBE_UnsupportedExtension DISABLED_UnsupportedExtension |
| 259 #else |
| 260 #define MAYBE_UnsupportedExtension UnsupportedExtension |
| 261 #endif |
| 262 IN_PROC_BROWSER_TEST_F(MediaFileValidatorTest, MAYBE_UnsupportedExtension) { |
| 257 MoveTest("a.txt", std::string(kValidImage, arraysize(kValidImage)), false); | 263 MoveTest("a.txt", std::string(kValidImage, arraysize(kValidImage)), false); |
| 258 } | 264 } |
| 259 | 265 |
| 260 IN_PROC_BROWSER_TEST_F(MediaFileValidatorTest, ValidImage) { | 266 IN_PROC_BROWSER_TEST_F(MediaFileValidatorTest, ValidImage) { |
| 261 MoveTest("a.webp", std::string(kValidImage, arraysize(kValidImage)), true); | 267 MoveTest("a.webp", std::string(kValidImage, arraysize(kValidImage)), true); |
| 262 } | 268 } |
| 263 | 269 |
| 264 IN_PROC_BROWSER_TEST_F(MediaFileValidatorTest, InvalidImage) { | 270 IN_PROC_BROWSER_TEST_F(MediaFileValidatorTest, InvalidImage) { |
| 265 MoveTest("a.webp", std::string(kInvalidMediaFile, | 271 MoveTest("a.webp", std::string(kInvalidMediaFile, |
| 266 arraysize(kInvalidMediaFile)), false); | 272 arraysize(kInvalidMediaFile)), false); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 284 test_file = test_file.AppendASCII("no_streams.webm"); | 290 test_file = test_file.AppendASCII("no_streams.webm"); |
| 285 MoveTestFromFile("no_streams.webm", test_file, false); | 291 MoveTestFromFile("no_streams.webm", test_file, false); |
| 286 } | 292 } |
| 287 | 293 |
| 288 IN_PROC_BROWSER_TEST_F(MediaFileValidatorTest, ValidVideo) { | 294 IN_PROC_BROWSER_TEST_F(MediaFileValidatorTest, ValidVideo) { |
| 289 base::FilePath test_file = GetMediaTestDir(); | 295 base::FilePath test_file = GetMediaTestDir(); |
| 290 ASSERT_FALSE(test_file.empty()); | 296 ASSERT_FALSE(test_file.empty()); |
| 291 test_file = test_file.AppendASCII("bear-320x240-multitrack.webm"); | 297 test_file = test_file.AppendASCII("bear-320x240-multitrack.webm"); |
| 292 MoveTestFromFile("multitrack.webm", test_file, true); | 298 MoveTestFromFile("multitrack.webm", test_file, true); |
| 293 } | 299 } |
| OLD | NEW |