| OLD | NEW |
| 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 // MediaGalleriesPreferences unit tests. | 5 // MediaGalleriesPreferences unit tests. |
| 6 | 6 |
| 7 #include "chrome/browser/media_galleries/media_galleries_preferences.h" | 7 #include "chrome/browser/media_galleries/media_galleries_preferences.h" |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 #include "extensions/browser/extension_system.h" | 23 #include "extensions/browser/extension_system.h" |
| 24 #include "extensions/common/extension.h" | 24 #include "extensions/common/extension.h" |
| 25 #include "extensions/common/manifest_handlers/background_info.h" | 25 #include "extensions/common/manifest_handlers/background_info.h" |
| 26 #include "extensions/common/permissions/media_galleries_permission.h" | 26 #include "extensions/common/permissions/media_galleries_permission.h" |
| 27 #include "grit/generated_resources.h" | 27 #include "grit/generated_resources.h" |
| 28 #include "sync/api/string_ordinal.h" | 28 #include "sync/api/string_ordinal.h" |
| 29 #include "testing/gtest/include/gtest/gtest.h" | 29 #include "testing/gtest/include/gtest/gtest.h" |
| 30 #include "ui/base/l10n/l10n_util.h" | 30 #include "ui/base/l10n/l10n_util.h" |
| 31 | 31 |
| 32 #if defined(OS_CHROMEOS) | 32 #if defined(OS_CHROMEOS) |
| 33 #include "chrome/browser/chromeos/login/user_manager.h" | 33 #include "chrome/browser/chromeos/login/users/user_manager.h" |
| 34 #include "chrome/browser/chromeos/settings/cros_settings.h" | 34 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 35 #include "chrome/browser/chromeos/settings/device_settings_service.h" | 35 #include "chrome/browser/chromeos/settings/device_settings_service.h" |
| 36 #endif | 36 #endif |
| 37 | 37 |
| 38 using base::ASCIIToUTF16; | 38 using base::ASCIIToUTF16; |
| 39 using storage_monitor::MediaStorageUtil; | 39 using storage_monitor::MediaStorageUtil; |
| 40 using storage_monitor::StorageInfo; | 40 using storage_monitor::StorageInfo; |
| 41 using storage_monitor::TestStorageMonitor; | 41 using storage_monitor::TestStorageMonitor; |
| 42 | 42 |
| 43 namespace { | 43 namespace { |
| (...skipping 1177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1221 info.volume_label = base::string16(); | 1221 info.volume_label = base::string16(); |
| 1222 EXPECT_EQ(ASCIIToUTF16("vendor, model"), info.GetGalleryDisplayName()); | 1222 EXPECT_EQ(ASCIIToUTF16("vendor, model"), info.GetGalleryDisplayName()); |
| 1223 | 1223 |
| 1224 info.device_id = StorageInfo::MakeDeviceId( | 1224 info.device_id = StorageInfo::MakeDeviceId( |
| 1225 StorageInfo::FIXED_MASS_STORAGE, "unique"); | 1225 StorageInfo::FIXED_MASS_STORAGE, "unique"); |
| 1226 EXPECT_EQ(base::FilePath(FILE_PATH_LITERAL("unique")).AsUTF8Unsafe(), | 1226 EXPECT_EQ(base::FilePath(FILE_PATH_LITERAL("unique")).AsUTF8Unsafe(), |
| 1227 base::UTF16ToUTF8(info.GetGalleryTooltip())); | 1227 base::UTF16ToUTF8(info.GetGalleryTooltip())); |
| 1228 | 1228 |
| 1229 TestStorageMonitor::Destroy(); | 1229 TestStorageMonitor::Destroy(); |
| 1230 } | 1230 } |
| OLD | NEW |