OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/media_folder_finder.h" | 5 #include "chrome/browser/media_galleries/media_folder_finder.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include <set> | 9 #include <set> |
8 #include <string> | 10 #include <string> |
9 | 11 |
10 #include "base/base_paths.h" | 12 #include "base/base_paths.h" |
11 #include "base/bind.h" | 13 #include "base/bind.h" |
12 #include "base/files/file_util.h" | 14 #include "base/files/file_util.h" |
13 #include "base/files/scoped_temp_dir.h" | 15 #include "base/files/scoped_temp_dir.h" |
| 16 #include "base/macros.h" |
14 #include "base/strings/stringprintf.h" | 17 #include "base/strings/stringprintf.h" |
15 #include "base/test/scoped_path_override.h" | 18 #include "base/test/scoped_path_override.h" |
16 #include "base/threading/sequenced_worker_pool.h" | 19 #include "base/threading/sequenced_worker_pool.h" |
| 20 #include "build/build_config.h" |
17 #include "chrome/browser/media_galleries/media_scan_types.h" | 21 #include "chrome/browser/media_galleries/media_scan_types.h" |
18 #include "chrome/common/chrome_paths.h" | 22 #include "chrome/common/chrome_paths.h" |
19 #include "content/public/browser/browser_thread.h" | 23 #include "content/public/browser/browser_thread.h" |
20 #include "content/public/test/test_browser_thread_bundle.h" | 24 #include "content/public/test/test_browser_thread_bundle.h" |
21 #include "content/public/test/test_utils.h" | 25 #include "content/public/test/test_utils.h" |
22 #include "testing/gtest/include/gtest/gtest.h" | 26 #include "testing/gtest/include/gtest/gtest.h" |
23 | 27 |
24 class MediaFolderFinderTest : public testing::Test { | 28 class MediaFolderFinderTest : public testing::Test { |
25 public: | 29 public: |
26 MediaFolderFinderTest() { | 30 MediaFolderFinderTest() { |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 | 396 |
393 // |fake_home_dir| and its ancestors do not show up in results. | 397 // |fake_home_dir| and its ancestors do not show up in results. |
394 expected_results.erase(fake_dir()); | 398 expected_results.erase(fake_dir()); |
395 expected_results.erase(fake_home_dir); | 399 expected_results.erase(fake_home_dir); |
396 | 400 |
397 CreateMediaFolderFinder(folders, true, expected_results); | 401 CreateMediaFolderFinder(folders, true, expected_results); |
398 StartScan(); | 402 StartScan(); |
399 RunLoopUntilReceivedCallback(); | 403 RunLoopUntilReceivedCallback(); |
400 DeleteMediaFolderFinder(); | 404 DeleteMediaFolderFinder(); |
401 } | 405 } |
OLD | NEW |