Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(936)

Side by Side Diff: chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_apitest.cc

Issue 307453007: device/bluetooth: Implement GATT characteristic properties on Chrome OS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_event_router.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 Return(BluetoothGattCharacteristic::kPropertyWriteWithoutResponse)) 498 Return(BluetoothGattCharacteristic::kPropertyWriteWithoutResponse))
499 .WillOnce(Return(BluetoothGattCharacteristic::kPropertyWrite)) 499 .WillOnce(Return(BluetoothGattCharacteristic::kPropertyWrite))
500 .WillOnce(Return(BluetoothGattCharacteristic::kPropertyNotify)) 500 .WillOnce(Return(BluetoothGattCharacteristic::kPropertyNotify))
501 .WillOnce(Return(BluetoothGattCharacteristic::kPropertyIndicate)) 501 .WillOnce(Return(BluetoothGattCharacteristic::kPropertyIndicate))
502 .WillOnce(Return( 502 .WillOnce(Return(
503 BluetoothGattCharacteristic::kPropertyAuthenticatedSignedWrites)) 503 BluetoothGattCharacteristic::kPropertyAuthenticatedSignedWrites))
504 .WillOnce( 504 .WillOnce(
505 Return(BluetoothGattCharacteristic::kPropertyExtendedProperties)) 505 Return(BluetoothGattCharacteristic::kPropertyExtendedProperties))
506 .WillOnce(Return(BluetoothGattCharacteristic::kPropertyReliableWrite)) 506 .WillOnce(Return(BluetoothGattCharacteristic::kPropertyReliableWrite))
507 .WillOnce( 507 .WillOnce(
508 Return(BluetoothGattCharacteristic::kPropertyWriteableAuxiliaries)) 508 Return(BluetoothGattCharacteristic::kPropertyWritableAuxiliaries))
509 .WillOnce(Return( 509 .WillOnce(Return(
510 BluetoothGattCharacteristic::kPropertyBroadcast | 510 BluetoothGattCharacteristic::kPropertyBroadcast |
511 BluetoothGattCharacteristic::kPropertyRead | 511 BluetoothGattCharacteristic::kPropertyRead |
512 BluetoothGattCharacteristic::kPropertyWriteWithoutResponse | 512 BluetoothGattCharacteristic::kPropertyWriteWithoutResponse |
513 BluetoothGattCharacteristic::kPropertyWrite | 513 BluetoothGattCharacteristic::kPropertyWrite |
514 BluetoothGattCharacteristic::kPropertyNotify | 514 BluetoothGattCharacteristic::kPropertyNotify |
515 BluetoothGattCharacteristic::kPropertyIndicate | 515 BluetoothGattCharacteristic::kPropertyIndicate |
516 BluetoothGattCharacteristic::kPropertyAuthenticatedSignedWrites | 516 BluetoothGattCharacteristic::kPropertyAuthenticatedSignedWrites |
517 BluetoothGattCharacteristic::kPropertyExtendedProperties | 517 BluetoothGattCharacteristic::kPropertyExtendedProperties |
518 BluetoothGattCharacteristic::kPropertyReliableWrite | 518 BluetoothGattCharacteristic::kPropertyReliableWrite |
519 BluetoothGattCharacteristic::kPropertyWriteableAuxiliaries)); 519 BluetoothGattCharacteristic::kPropertyWritableAuxiliaries));
520 520
521 ExtensionTestMessageListener listener("ready", true); 521 ExtensionTestMessageListener listener("ready", true);
522 ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII( 522 ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII(
523 "bluetooth_low_energy/characteristic_properties"))); 523 "bluetooth_low_energy/characteristic_properties")));
524 EXPECT_TRUE(listener.WaitUntilSatisfied()); 524 EXPECT_TRUE(listener.WaitUntilSatisfied());
525 525
526 listener.Reply("go"); 526 listener.Reply("go");
527 527
528 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); 528 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
529 529
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 } // namespace 955 } // namespace
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_event_router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698