Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(251)

Side by Side Diff: chrome/browser/media_galleries/fileapi/media_file_validator_browsertest.cc

Issue 23440033: Move FileAPI test code from webkit to content (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/file_util.h" 7 #include "base/file_util.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.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"
17 #include "content/public/test/test_file_system_context.h"
16 #include "content/public/test/test_utils.h" 18 #include "content/public/test/test_utils.h"
17 #include "testing/gtest/include/gtest/gtest.h" 19 #include "testing/gtest/include/gtest/gtest.h"
18 #include "webkit/browser/fileapi/copy_or_move_file_validator.h" 20 #include "webkit/browser/fileapi/copy_or_move_file_validator.h"
19 #include "webkit/browser/fileapi/file_system_backend.h" 21 #include "webkit/browser/fileapi/file_system_backend.h"
20 #include "webkit/browser/fileapi/file_system_context.h" 22 #include "webkit/browser/fileapi/file_system_context.h"
21 #include "webkit/browser/fileapi/file_system_operation_runner.h" 23 #include "webkit/browser/fileapi/file_system_operation_runner.h"
22 #include "webkit/browser/fileapi/file_system_url.h" 24 #include "webkit/browser/fileapi/file_system_url.h"
23 #include "webkit/browser/fileapi/isolated_context.h" 25 #include "webkit/browser/fileapi/isolated_context.h"
24 #include "webkit/browser/fileapi/mock_file_system_context.h"
25 #include "webkit/browser/fileapi/test_file_system_backend.h"
26 #include "webkit/common/fileapi/file_system_types.h" 26 #include "webkit/common/fileapi/file_system_types.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
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 test_file = test_file.AppendASCII("no_streams.webm"); 270 test_file = test_file.AppendASCII("no_streams.webm");
271 MoveTestFromFile("no_streams.webm", test_file, false); 271 MoveTestFromFile("no_streams.webm", test_file, false);
272 } 272 }
273 273
274 IN_PROC_BROWSER_TEST_F(MediaFileValidatorTest, ValidVideo) { 274 IN_PROC_BROWSER_TEST_F(MediaFileValidatorTest, ValidVideo) {
275 base::FilePath test_file = GetMediaTestDir(); 275 base::FilePath test_file = GetMediaTestDir();
276 ASSERT_FALSE(test_file.empty()); 276 ASSERT_FALSE(test_file.empty());
277 test_file = test_file.AppendASCII("bear-320x240-multitrack.webm"); 277 test_file = test_file.AppendASCII("bear-320x240-multitrack.webm");
278 MoveTestFromFile("multitrack.webm", test_file, true); 278 MoveTestFromFile("multitrack.webm", test_file, true);
279 } 279 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698