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

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

Issue 2815743002: Move a couple of blob tests next to the files they cover. (Closed)
Patch Set: Fix gn check, take 2. Created 3 years, 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/media_galleries/fileapi/native_media_file_util.h" 5 #include "chrome/browser/media_galleries/fileapi/native_media_file_util.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
11 11
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/files/file_util.h" 13 #include "base/files/file_util.h"
14 #include "base/files/scoped_temp_dir.h" 14 #include "base/files/scoped_temp_dir.h"
15 #include "base/format_macros.h" 15 #include "base/format_macros.h"
16 #include "base/macros.h" 16 #include "base/macros.h"
17 #include "base/memory/ptr_util.h" 17 #include "base/memory/ptr_util.h"
18 #include "base/message_loop/message_loop.h" 18 #include "base/message_loop/message_loop.h"
19 #include "base/run_loop.h" 19 #include "base/run_loop.h"
20 #include "base/strings/stringprintf.h" 20 #include "base/strings/stringprintf.h"
21 #include "base/threading/thread_task_runner_handle.h" 21 #include "base/threading/thread_task_runner_handle.h"
22 #include "base/time/time.h" 22 #include "base/time/time.h"
23 #include "chrome/browser/media_galleries/fileapi/media_file_system_backend.h" 23 #include "chrome/browser/media_galleries/fileapi/media_file_system_backend.h"
24 #include "content/public/test/mock_special_storage_policy.h"
25 #include "content/public/test/test_browser_thread.h" 24 #include "content/public/test/test_browser_thread.h"
26 #include "content/public/test/test_file_system_options.h"
27 #include "storage/browser/fileapi/external_mount_points.h" 25 #include "storage/browser/fileapi/external_mount_points.h"
28 #include "storage/browser/fileapi/file_system_backend.h" 26 #include "storage/browser/fileapi/file_system_backend.h"
29 #include "storage/browser/fileapi/file_system_context.h" 27 #include "storage/browser/fileapi/file_system_context.h"
30 #include "storage/browser/fileapi/file_system_operation_runner.h" 28 #include "storage/browser/fileapi/file_system_operation_runner.h"
31 #include "storage/browser/fileapi/file_system_url.h" 29 #include "storage/browser/fileapi/file_system_url.h"
32 #include "storage/browser/fileapi/isolated_context.h" 30 #include "storage/browser/fileapi/isolated_context.h"
33 #include "storage/browser/fileapi/native_file_util.h" 31 #include "storage/browser/fileapi/native_file_util.h"
32 #include "storage/browser/test/mock_special_storage_policy.h"
33 #include "storage/browser/test/test_file_system_options.h"
34 #include "testing/gtest/include/gtest/gtest.h" 34 #include "testing/gtest/include/gtest/gtest.h"
35 35
36 #define FPL(x) FILE_PATH_LITERAL(x) 36 #define FPL(x) FILE_PATH_LITERAL(x)
37 37
38 using storage::FileSystemOperation; 38 using storage::FileSystemOperation;
39 using storage::FileSystemURL; 39 using storage::FileSystemURL;
40 40
41 namespace { 41 namespace {
42 42
43 typedef FileSystemOperation::FileEntryList FileEntryList; 43 typedef FileSystemOperation::FileEntryList FileEntryList;
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 expected_error = base::File::FILE_OK; 568 expected_error = base::File::FILE_OK;
569 else 569 else
570 expected_error = base::File::FILE_ERROR_SECURITY; 570 expected_error = base::File::FILE_ERROR_SECURITY;
571 error = base::File::FILE_ERROR_FAILED; 571 error = base::File::FILE_ERROR_FAILED;
572 operation_runner()->CreateSnapshotFile(url, 572 operation_runner()->CreateSnapshotFile(url,
573 base::Bind(CreateSnapshotCallback, &error)); 573 base::Bind(CreateSnapshotCallback, &error));
574 base::RunLoop().RunUntilIdle(); 574 base::RunLoop().RunUntilIdle();
575 ASSERT_EQ(expected_error, error); 575 ASSERT_EQ(expected_error, error);
576 } 576 }
577 } 577 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698