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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
12 #include "chrome/browser/extensions/test_extension_system.h" | 12 #include "chrome/browser/extensions/test_extension_system.h" |
13 #include "chrome/browser/media_galleries/media_galleries_dialog_controller.h" | 13 #include "chrome/browser/media_galleries/media_galleries_dialog_controller.h" |
14 #include "chrome/browser/media_galleries/media_galleries_preferences.h" | 14 #include "chrome/browser/media_galleries/media_galleries_preferences.h" |
15 #include "chrome/browser/media_galleries/media_galleries_test_util.h" | 15 #include "chrome/browser/media_galleries/media_galleries_test_util.h" |
16 #include "chrome/test/base/testing_profile.h" | 16 #include "chrome/test/base/testing_profile.h" |
17 #include "components/storage_monitor/storage_info.h" | 17 #include "components/storage_monitor/storage_info.h" |
18 #include "components/storage_monitor/test_storage_monitor.h" | 18 #include "components/storage_monitor/test_storage_monitor.h" |
19 #include "content/public/test/test_browser_thread_bundle.h" | 19 #include "content/public/test/test_browser_thread_bundle.h" |
20 #include "extensions/common/permissions/media_galleries_permission.h" | 20 #include "extensions/common/permissions/media_galleries_permission.h" |
21 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
22 | 22 |
23 #if defined(OS_CHROMEOS) | 23 #if defined(OS_CHROMEOS) |
24 #include "chrome/browser/chromeos/login/user_manager.h" | 24 #include "chrome/browser/chromeos/login/users/user_manager.h" |
25 #include "chrome/browser/chromeos/settings/cros_settings.h" | 25 #include "chrome/browser/chromeos/settings/cros_settings.h" |
26 #include "chrome/browser/chromeos/settings/device_settings_service.h" | 26 #include "chrome/browser/chromeos/settings/device_settings_service.h" |
27 #endif | 27 #endif |
28 | 28 |
29 using storage_monitor::StorageInfo; | 29 using storage_monitor::StorageInfo; |
30 using storage_monitor::TestStorageMonitor; | 30 using storage_monitor::TestStorageMonitor; |
31 | 31 |
32 namespace { | 32 namespace { |
33 | 33 |
34 std::string GalleryName(const MediaGalleryPrefInfo& gallery) { | 34 std::string GalleryName(const MediaGalleryPrefInfo& gallery) { |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 | 313 |
314 gallery.volume_label = base::string16(); | 314 gallery.volume_label = base::string16(); |
315 EXPECT_EQ("vendor, model", GalleryName(gallery)); | 315 EXPECT_EQ("vendor, model", GalleryName(gallery)); |
316 | 316 |
317 gallery.total_size_in_bytes = 1000000; | 317 gallery.total_size_in_bytes = 1000000; |
318 EXPECT_EQ("977 KB vendor, model", GalleryName(gallery)); | 318 EXPECT_EQ("977 KB vendor, model", GalleryName(gallery)); |
319 | 319 |
320 gallery.path = base::FilePath(FILE_PATH_LITERAL("sub/path")); | 320 gallery.path = base::FilePath(FILE_PATH_LITERAL("sub/path")); |
321 EXPECT_EQ("path - 977 KB vendor, model", GalleryName(gallery)); | 321 EXPECT_EQ("path - 977 KB vendor, model", GalleryName(gallery)); |
322 } | 322 } |
OLD | NEW |