| 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 #include "base/stringprintf.h" | 5 #include "base/stringprintf.h" |
| 6 #include "base/utf_string_conversions.h" | 6 #include "base/utf_string_conversions.h" |
| 7 #include "chrome/browser/extensions/api/media_galleries_private/media_galleries_
private_api.h" | 7 #include "chrome/browser/extensions/api/media_galleries_private/media_galleries_
private_api.h" |
| 8 #include "chrome/browser/extensions/extension_apitest.h" | 8 #include "chrome/browser/extensions/extension_apitest.h" |
| 9 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
| 10 #include "chrome/browser/extensions/extension_system.h" | 10 #include "chrome/browser/extensions/extension_system.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 EXPECT_TRUE(listener.WaitUntilSatisfied()); | 80 EXPECT_TRUE(listener.WaitUntilSatisfied()); |
| 81 } | 81 } |
| 82 | 82 |
| 83 void AttachDetach() { | 83 void AttachDetach() { |
| 84 Attach(); | 84 Attach(); |
| 85 Detach(); | 85 Detach(); |
| 86 } | 86 } |
| 87 | 87 |
| 88 void Attach() { | 88 void Attach() { |
| 89 chrome::RemovableStorageNotifications::GetInstance()->ProcessAttach( | 89 chrome::RemovableStorageNotifications::GetInstance()->ProcessAttach( |
| 90 device_id_, ASCIIToUTF16(kDeviceName), kDevicePath); | 90 chrome::RemovableStorageNotifications::StorageInfo( |
| 91 device_id_, ASCIIToUTF16(kDeviceName), kDevicePath)); |
| 91 WaitForDeviceEvents(); | 92 WaitForDeviceEvents(); |
| 92 } | 93 } |
| 93 | 94 |
| 94 void Detach() { | 95 void Detach() { |
| 95 chrome::RemovableStorageNotifications::GetInstance()->ProcessDetach( | 96 chrome::RemovableStorageNotifications::GetInstance()->ProcessDetach( |
| 96 device_id_); | 97 device_id_); |
| 97 WaitForDeviceEvents(); | 98 WaitForDeviceEvents(); |
| 98 } | 99 } |
| 99 | 100 |
| 100 private: | 101 private: |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 Attach(); | 176 Attach(); |
| 176 EXPECT_TRUE(attach_finished_listener.WaitUntilSatisfied()); | 177 EXPECT_TRUE(attach_finished_listener.WaitUntilSatisfied()); |
| 177 Detach(); | 178 Detach(); |
| 178 EXPECT_TRUE(detach_finished_listener.WaitUntilSatisfied()); | 179 EXPECT_TRUE(detach_finished_listener.WaitUntilSatisfied()); |
| 179 | 180 |
| 180 Attach(); | 181 Attach(); |
| 181 EXPECT_TRUE(attach_finished_listener.WaitUntilSatisfied()); | 182 EXPECT_TRUE(attach_finished_listener.WaitUntilSatisfied()); |
| 182 Detach(); | 183 Detach(); |
| 183 EXPECT_TRUE(detach_finished_listener.WaitUntilSatisfied()); | 184 EXPECT_TRUE(detach_finished_listener.WaitUntilSatisfied()); |
| 184 } | 185 } |
| OLD | NEW |