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 // MediaTransferProtocolDeviceObserverLinux unit tests. | 5 // MediaTransferProtocolDeviceObserverLinux unit tests. |
6 | 6 |
7 #include "components/storage_monitor/media_transfer_protocol_device_observer_lin
ux.h" | 7 #include "components/storage_monitor/media_transfer_protocol_device_observer_lin
ux.h" |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
| 11 #include "base/macros.h" |
11 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
12 #include "base/run_loop.h" | 13 #include "base/run_loop.h" |
13 #include "base/strings/utf_string_conversions.h" | 14 #include "base/strings/utf_string_conversions.h" |
14 #include "components/storage_monitor/mock_removable_storage_observer.h" | 15 #include "components/storage_monitor/mock_removable_storage_observer.h" |
15 #include "components/storage_monitor/storage_info.h" | 16 #include "components/storage_monitor/storage_info.h" |
16 #include "components/storage_monitor/storage_monitor.h" | 17 #include "components/storage_monitor/storage_monitor.h" |
17 #include "components/storage_monitor/test_storage_monitor.h" | 18 #include "components/storage_monitor/test_storage_monitor.h" |
18 #include "content/public/test/test_browser_thread_bundle.h" | 19 #include "content/public/test/test_browser_thread_bundle.h" |
19 #include "device/media_transfer_protocol/media_transfer_protocol_manager.h" | 20 #include "device/media_transfer_protocol/media_transfer_protocol_manager.h" |
20 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 mtp_device_observer()->MtpStorageAttached(kStorageWithInvalidInfo); | 166 mtp_device_observer()->MtpStorageAttached(kStorageWithInvalidInfo); |
166 | 167 |
167 // Detach the attached storage. | 168 // Detach the attached storage. |
168 mtp_device_observer()->MtpStorageDetached(kStorageWithInvalidInfo); | 169 mtp_device_observer()->MtpStorageDetached(kStorageWithInvalidInfo); |
169 | 170 |
170 EXPECT_EQ(0, observer().attach_calls()); | 171 EXPECT_EQ(0, observer().attach_calls()); |
171 EXPECT_EQ(0, observer().detach_calls()); | 172 EXPECT_EQ(0, observer().detach_calls()); |
172 } | 173 } |
173 | 174 |
174 } // namespace storage_monitor | 175 } // namespace storage_monitor |
OLD | NEW |