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 // MediaDeviceNotificationsLinux unit tests. | 5 // MediaDeviceNotificationsLinux unit tests. |
6 | 6 |
7 #include "chrome/browser/media_gallery/media_device_notifications_linux.h" | 7 #include "chrome/browser/media_gallery/media_device_notifications_linux.h" |
8 | 8 |
9 #include <mntent.h> | 9 #include <mntent.h> |
10 #include <stdio.h> | 10 #include <stdio.h> |
11 | 11 |
12 #include <string> | 12 #include <string> |
13 | 13 |
14 #include "base/file_util.h" | 14 #include "base/file_util.h" |
15 #include "base/logging.h" | 15 #include "base/logging.h" |
16 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
17 #include "base/message_loop.h" | 17 #include "base/message_loop.h" |
18 #include "base/scoped_temp_dir.h" | 18 #include "base/scoped_temp_dir.h" |
19 #include "base/system_monitor/system_monitor.h" | 19 #include "base/system_monitor/system_monitor.h" |
20 #include "base/test/mock_devices_changed_observer.h" | 20 #include "base/test/mock_devices_changed_observer.h" |
21 #include "content/test/test_browser_thread.h" | 21 #include "content/public/test/test_browser_thread.h" |
22 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
23 | 23 |
24 namespace chrome { | 24 namespace chrome { |
25 | 25 |
26 namespace { | 26 namespace { |
27 | 27 |
28 using testing::_; | 28 using testing::_; |
29 | 29 |
30 const char kValidFS[] = "vfat"; | 30 const char kValidFS[] = "vfat"; |
31 const char kInvalidFS[] = "invalidfs"; | 31 const char kInvalidFS[] = "invalidfs"; |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 | 379 |
380 // Detach all devices. | 380 // Detach all devices. |
381 EXPECT_CALL(observer(), OnMediaDeviceAttached(_, _, _)).Times(0); | 381 EXPECT_CALL(observer(), OnMediaDeviceAttached(_, _, _)).Times(0); |
382 EXPECT_CALL(observer(), OnMediaDeviceDetached(1)).Times(1); | 382 EXPECT_CALL(observer(), OnMediaDeviceDetached(1)).Times(1); |
383 WriteEmptyMtabAndRunLoop(); | 383 WriteEmptyMtabAndRunLoop(); |
384 } | 384 } |
385 | 385 |
386 } // namespace | 386 } // namespace |
387 | 387 |
388 } // namespace chrome | 388 } // namespace chrome |
OLD | NEW |