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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/memory/ref_counted.h" | 7 #include "base/memory/ref_counted.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "chrome/browser/extensions/extension_apitest.h" | 9 #include "chrome/browser/extensions/extension_apitest.h" |
10 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
11 #include "chrome/browser/extensions/extension_test_message_listener.h" | |
12 #include "chrome/browser/ui/browser.h" | 11 #include "chrome/browser/ui/browser.h" |
13 #include "chrome/test/base/ui_test_utils.h" | 12 #include "chrome/test/base/ui_test_utils.h" |
14 #include "device/bluetooth/bluetooth_adapter_factory.h" | 13 #include "device/bluetooth/bluetooth_adapter_factory.h" |
15 #include "device/bluetooth/bluetooth_uuid.h" | 14 #include "device/bluetooth/bluetooth_uuid.h" |
16 #include "device/bluetooth/test/mock_bluetooth_adapter.h" | 15 #include "device/bluetooth/test/mock_bluetooth_adapter.h" |
17 #include "device/bluetooth/test/mock_bluetooth_device.h" | 16 #include "device/bluetooth/test/mock_bluetooth_device.h" |
18 #include "device/bluetooth/test/mock_bluetooth_socket.h" | 17 #include "device/bluetooth/test/mock_bluetooth_socket.h" |
19 #include "extensions/browser/api/bluetooth_socket/bluetooth_socket_api.h" | 18 #include "extensions/browser/api/bluetooth_socket/bluetooth_socket_api.h" |
20 #include "extensions/common/test_util.h" | 19 #include "extensions/common/test_util.h" |
| 20 #include "extensions/test/extension_test_message_listener.h" |
21 #include "extensions/test/result_catcher.h" | 21 #include "extensions/test/result_catcher.h" |
22 #include "testing/gmock/include/gmock/gmock.h" | 22 #include "testing/gmock/include/gmock/gmock.h" |
23 | 23 |
24 using device::BluetoothAdapter; | 24 using device::BluetoothAdapter; |
25 using device::BluetoothAdapterFactory; | 25 using device::BluetoothAdapterFactory; |
26 using device::BluetoothDevice; | 26 using device::BluetoothDevice; |
27 using device::BluetoothSocket; | 27 using device::BluetoothSocket; |
28 using device::BluetoothUUID; | 28 using device::BluetoothUUID; |
29 using device::MockBluetoothAdapter; | 29 using device::MockBluetoothAdapter; |
30 using device::MockBluetoothDevice; | 30 using device::MockBluetoothDevice; |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 catcher.RestrictToBrowserContext(browser()->profile()); | 211 catcher.RestrictToBrowserContext(browser()->profile()); |
212 | 212 |
213 // Run the test. | 213 // Run the test. |
214 scoped_refptr<const Extension> extension( | 214 scoped_refptr<const Extension> extension( |
215 LoadExtension(test_data_dir_.AppendASCII( | 215 LoadExtension(test_data_dir_.AppendASCII( |
216 "bluetooth_socket/permission_denied"))); | 216 "bluetooth_socket/permission_denied"))); |
217 ASSERT_TRUE(extension.get()); | 217 ASSERT_TRUE(extension.get()); |
218 | 218 |
219 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); | 219 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); |
220 } | 220 } |
OLD | NEW |