| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "chrome/browser/extensions/api/system_storage/storage_api_test_util.h" | 9 #include "chrome/browser/extensions/api/system_storage/storage_api_test_util.h" |
| 10 #include "chrome/browser/extensions/api/system_storage/storage_info_provider.h" | |
| 11 #include "chrome/browser/extensions/extension_apitest.h" | 10 #include "chrome/browser/extensions/extension_apitest.h" |
| 12 #include "chrome/browser/extensions/extension_test_message_listener.h" | 11 #include "chrome/browser/extensions/extension_test_message_listener.h" |
| 13 #include "components/storage_monitor/storage_monitor.h" | 12 #include "components/storage_monitor/storage_monitor.h" |
| 14 #include "components/storage_monitor/test_storage_monitor.h" | 13 #include "components/storage_monitor/test_storage_monitor.h" |
| 14 #include "extensions/browser/api/system_storage/storage_info_provider.h" |
| 15 | 15 |
| 16 namespace { | 16 namespace { |
| 17 | 17 |
| 18 using extensions::StorageUnitInfoList; | 18 using extensions::StorageUnitInfoList; |
| 19 using extensions::test::TestStorageUnitInfo; | 19 using extensions::test::TestStorageUnitInfo; |
| 20 using extensions::test::kRemovableStorageData; | 20 using extensions::test::kRemovableStorageData; |
| 21 using storage_monitor::StorageMonitor; | 21 using storage_monitor::StorageMonitor; |
| 22 using storage_monitor::TestStorageMonitor; | 22 using storage_monitor::TestStorageMonitor; |
| 23 | 23 |
| 24 const struct TestStorageUnitInfo kTestingData[] = { | 24 const struct TestStorageUnitInfo kTestingData[] = { |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 removable_storage_transient_id, false); | 139 removable_storage_transient_id, false); |
| 140 | 140 |
| 141 // Simulate triggering onDetached event. | 141 // Simulate triggering onDetached event. |
| 142 ASSERT_TRUE(detach_listener.WaitUntilSatisfied()); | 142 ASSERT_TRUE(detach_listener.WaitUntilSatisfied()); |
| 143 DetachRemovableStorage(kRemovableStorageData.device_id); | 143 DetachRemovableStorage(kRemovableStorageData.device_id); |
| 144 | 144 |
| 145 ASSERT_TRUE(detach_device_id_listener.WaitUntilSatisfied()); | 145 ASSERT_TRUE(detach_device_id_listener.WaitUntilSatisfied()); |
| 146 | 146 |
| 147 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); | 147 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); |
| 148 } | 148 } |
| OLD | NEW |