| 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 "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "device/bluetooth/bluetooth_adapter_factory.h" | 10 #include "device/bluetooth/bluetooth_adapter_factory.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 using device::BluetoothAdapterFactory; | 23 using device::BluetoothAdapterFactory; |
| 24 using device::BluetoothDevice; | 24 using device::BluetoothDevice; |
| 25 using device::BluetoothSocket; | 25 using device::BluetoothSocket; |
| 26 using device::BluetoothUUID; | 26 using device::BluetoothUUID; |
| 27 using device::MockBluetoothAdapter; | 27 using device::MockBluetoothAdapter; |
| 28 using device::MockBluetoothDevice; | 28 using device::MockBluetoothDevice; |
| 29 using device::MockBluetoothSocket; | 29 using device::MockBluetoothSocket; |
| 30 using extensions::Extension; | 30 using extensions::Extension; |
| 31 using extensions::ResultCatcher; | 31 using extensions::ResultCatcher; |
| 32 | 32 |
| 33 namespace api = extensions::core_api; | 33 namespace api = extensions::api; |
| 34 | 34 |
| 35 namespace { | 35 namespace { |
| 36 | 36 |
| 37 class BluetoothSocketApiTest : public extensions::ShellApiTest { | 37 class BluetoothSocketApiTest : public extensions::ShellApiTest { |
| 38 public: | 38 public: |
| 39 BluetoothSocketApiTest() {} | 39 BluetoothSocketApiTest() {} |
| 40 | 40 |
| 41 void SetUpOnMainThread() override { | 41 void SetUpOnMainThread() override { |
| 42 ShellApiTest::SetUpOnMainThread(); | 42 ShellApiTest::SetUpOnMainThread(); |
| 43 empty_extension_ = extensions::test_util::CreateEmptyExtension(); | 43 empty_extension_ = extensions::test_util::CreateEmptyExtension(); |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 ResultCatcher catcher; | 208 ResultCatcher catcher; |
| 209 catcher.RestrictToBrowserContext(browser_context()); | 209 catcher.RestrictToBrowserContext(browser_context()); |
| 210 | 210 |
| 211 // Run the test. | 211 // Run the test. |
| 212 scoped_refptr<const Extension> extension( | 212 scoped_refptr<const Extension> extension( |
| 213 LoadApp("api_test/bluetooth_socket/permission_denied")); | 213 LoadApp("api_test/bluetooth_socket/permission_denied")); |
| 214 ASSERT_TRUE(extension.get()); | 214 ASSERT_TRUE(extension.get()); |
| 215 | 215 |
| 216 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); | 216 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); |
| 217 } | 217 } |
| OLD | NEW |