Juan Garza Sanchez | 642a5380 | 2023-06-29 23:10:38 | [diff] [blame] | 1 | // Copyright 2023 The Chromium Authors |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef CHROME_BROWSER_DEVICE_NOTIFICATIONS_DEVICE_TEST_UTILS_H_ |
| 6 | #define CHROME_BROWSER_DEVICE_NOTIFICATIONS_DEVICE_TEST_UTILS_H_ |
| 7 | |
| 8 | #include "chrome/browser/device_notifications/device_connection_tracker.h" |
| 9 | #include "chrome/browser/device_notifications/device_system_tray_icon.h" |
| 10 | #include "testing/gmock/include/gmock/gmock.h" |
| 11 | |
| 12 | class MockDeviceSystemTrayIcon : public DeviceSystemTrayIcon { |
| 13 | public: |
| 14 | MockDeviceSystemTrayIcon(); |
| 15 | ~MockDeviceSystemTrayIcon() override; |
| 16 | |
| 17 | MOCK_METHOD(void, StageProfile, (Profile*), (override)); |
| 18 | MOCK_METHOD(void, UnstageProfile, (Profile*, bool), (override)); |
| 19 | MOCK_METHOD(void, ProfileAdded, (Profile*), (override)); |
| 20 | MOCK_METHOD(void, ProfileRemoved, (Profile*), (override)); |
| 21 | MOCK_METHOD(void, NotifyConnectionCountUpdated, (Profile*), (override)); |
Jack Hsieh | 13a0a3d8 | 2024-06-04 22:09:22 | [diff] [blame^] | 22 | MOCK_METHOD(const gfx::VectorIcon&, GetIcon, (), (override)); |
Juan Garza Sanchez | 642a5380 | 2023-06-29 23:10:38 | [diff] [blame] | 23 | MOCK_METHOD(std::u16string, GetTitleLabel, (size_t, size_t), (override)); |
| 24 | MOCK_METHOD(std::u16string, GetContentSettingsLabel, (), (override)); |
| 25 | MOCK_METHOD(DeviceConnectionTracker*, |
| 26 | GetConnectionTracker, |
| 27 | (base::WeakPtr<Profile>), |
| 28 | (override)); |
| 29 | }; |
| 30 | |
| 31 | class MockDeviceConnectionTracker : public DeviceConnectionTracker { |
| 32 | public: |
| 33 | explicit MockDeviceConnectionTracker(Profile* profile); |
| 34 | ~MockDeviceConnectionTracker() override; |
| 35 | MOCK_METHOD(void, ShowContentSettingsExceptions, (), (override)); |
| 36 | MOCK_METHOD(void, ShowSiteSettings, (const url::Origin&), (override)); |
| 37 | MOCK_METHOD(DeviceSystemTrayIcon*, GetSystemTrayIcon, (), (override)); |
| 38 | }; |
| 39 | |
| 40 | #endif // CHROME_BROWSER_DEVICE_NOTIFICATIONS_DEVICE_TEST_UTILS_H_ |