| 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 "base/memory/scoped_ptr.h" | 5 #include "base/memory/scoped_ptr.h" |
| 6 #include "chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energ
y_api.h" | 6 #include "chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energ
y_api.h" |
| 7 #include "chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energ
y_event_router.h" | 7 #include "chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energ
y_event_router.h" |
| 8 #include "chrome/browser/extensions/extension_apitest.h" | 8 #include "chrome/browser/extensions/extension_apitest.h" |
| 9 #include "chrome/browser/extensions/extension_function_test_utils.h" | 9 #include "chrome/browser/extensions/extension_function_test_utils.h" |
| 10 #include "chrome/browser/extensions/extension_test_message_listener.h" | 10 #include "chrome/browser/extensions/extension_test_message_listener.h" |
| (...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 945 listener.Reply("go"); | 945 listener.Reply("go"); |
| 946 | 946 |
| 947 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); | 947 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); |
| 948 | 948 |
| 949 event_router()->GattDescriptorRemoved(chrc0_.get(), desc0_.get()); | 949 event_router()->GattDescriptorRemoved(chrc0_.get(), desc0_.get()); |
| 950 event_router()->GattCharacteristicRemoved(service0_.get(), chrc0_.get()); | 950 event_router()->GattCharacteristicRemoved(service0_.get(), chrc0_.get()); |
| 951 event_router()->GattServiceRemoved(device_.get(), service0_.get()); | 951 event_router()->GattServiceRemoved(device_.get(), service0_.get()); |
| 952 event_router()->DeviceRemoved(mock_adapter_, device_.get()); | 952 event_router()->DeviceRemoved(mock_adapter_, device_.get()); |
| 953 } | 953 } |
| 954 | 954 |
| 955 IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, PermissionDenied) { |
| 956 ResultCatcher catcher; |
| 957 catcher.RestrictToProfile(browser()->profile()); |
| 958 |
| 959 ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII( |
| 960 "bluetooth_low_energy/permission_denied"))); |
| 961 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); |
| 962 } |
| 963 |
| 955 } // namespace | 964 } // namespace |
| OLD | NEW |