| 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 #include "chrome/browser/chromeos/extensions/file_manager/device_event_router.h" | 5 #include "chrome/browser/chromeos/extensions/file_manager/device_event_router.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 protected: | 64 protected: |
| 65 void SetUp() override { | 65 void SetUp() override { |
| 66 device_event_router.reset(new DeviceEventRouterImpl()); | 66 device_event_router.reset(new DeviceEventRouterImpl()); |
| 67 } | 67 } |
| 68 | 68 |
| 69 // Creates a disk instance with |device_path| and |mount_path| for testing. | 69 // Creates a disk instance with |device_path| and |mount_path| for testing. |
| 70 Disk CreateTestDisk(const std::string& device_path, | 70 Disk CreateTestDisk(const std::string& device_path, |
| 71 const std::string& mount_path) { | 71 const std::string& mount_path) { |
| 72 return Disk(device_path, | 72 return Disk(device_path, |
| 73 mount_path, | 73 mount_path, |
| 74 false, |
| 74 "", | 75 "", |
| 75 "", | 76 "", |
| 76 "", | 77 "", |
| 77 "", | 78 "", |
| 78 "", | 79 "", |
| 79 "", | 80 "", |
| 80 "", | 81 "", |
| 81 "", | 82 "", |
| 82 "", | 83 "", |
| 83 device_path, | 84 device_path, |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 ASSERT_EQ(2u, device_event_router->events.size()); | 131 ASSERT_EQ(2u, device_event_router->events.size()); |
| 131 EXPECT_EQ(file_manager_private::DEVICE_EVENT_TYPE_HARD_UNPLUGGED, | 132 EXPECT_EQ(file_manager_private::DEVICE_EVENT_TYPE_HARD_UNPLUGGED, |
| 132 device_event_router->events[0].type); | 133 device_event_router->events[0].type); |
| 133 EXPECT_EQ("/device/test", device_event_router->events[0].device_path); | 134 EXPECT_EQ("/device/test", device_event_router->events[0].device_path); |
| 134 EXPECT_EQ(file_manager_private::DEVICE_EVENT_TYPE_REMOVED, | 135 EXPECT_EQ(file_manager_private::DEVICE_EVENT_TYPE_REMOVED, |
| 135 device_event_router->events[1].type); | 136 device_event_router->events[1].type); |
| 136 EXPECT_EQ("/device/test", device_event_router->events[1].device_path); | 137 EXPECT_EQ("/device/test", device_event_router->events[1].device_path); |
| 137 } | 138 } |
| 138 | 139 |
| 139 } // namespace file_manager | 140 } // namespace file_manager |
| OLD | NEW |