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

Side by Side Diff: device/bluetooth/README.md

Issue 2737343003: bluetooth: Add FakeBluetooth interface (Closed)
Patch Set: Address scheib's comments Created 3 years, 8 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
« no previous file with comments | « device/bluetooth/BUILD.gn ('k') | device/bluetooth/public/interfaces/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Bluetooth 1 # Bluetooth
2 2
3 `device/bluetooth` abstracts 3 `device/bluetooth` abstracts
4 [Bluetooth Classic](https://en.wikipedia.org/wiki/Bluetooth) and 4 [Bluetooth Classic](https://en.wikipedia.org/wiki/Bluetooth) and
5 [Low Energy](https://en.wikipedia.org/wiki/Bluetooth_low_energy) features 5 [Low Energy](https://en.wikipedia.org/wiki/Bluetooth_low_energy) features
6 across multiple platforms. 6 across multiple platforms.
7 7
8 Classic and Low Energy based profiles differ substantially. Platform 8 Classic and Low Energy based profiles differ substantially. Platform
9 implementations may support only one or the other, even though several classes 9 implementations may support only one or the other, even though several classes
10 have interfaces for both, e.g. `BluetoothAdapter` & `BluetoothDevice`. 10 have interfaces for both, e.g. `BluetoothAdapter` & `BluetoothDevice`.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 Known future work is tracked in the 43 Known future work is tracked in the
44 [Refactoring meta issue](https://crbug.com/580406). 44 [Refactoring meta issue](https://crbug.com/580406).
45 45
46 46
47 ## Testing 47 ## Testing
48 48
49 Implementation of the Bluetooth component is tested via unittests. Client code 49 Implementation of the Bluetooth component is tested via unittests. Client code
50 uses Mock Bluetooth objects: 50 uses Mock Bluetooth objects:
51 51
52 ### Mojo Testing Interface
53 A Mojo Testing Interface is defined at
54 `src/device/bluetooth/public/interfaces/test/fake_bluetooth.mojom`.
55 Clients can use this interface to control a fake implementation of the non-mojo
56 C++ Bluetooth interface. The implementation of this test interface lives at
57 `src/device/bluetooth/test/`. *This interface will be removed once a Bluetooth
scheib 2017/04/10 21:52:31 'will be removed' is hard to say... ;) 'should' or
ortuno 2017/04/12 05:49:06 Done. I added that we'll remove it if Web Bluetoot
58 Mojo Service is introduced.*
52 59
53 ### Cross Platform Unit Tests 60 ### Cross Platform Unit Tests
54 61
55 New feature development uses cross platform unit tests. This reduces test code 62 New feature development uses cross platform unit tests. This reduces test code
56 redundancy and produces consistency across all implementations. 63 redundancy and produces consistency across all implementations.
57 64
58 Unit tests operate at the public `device/bluetooth` API layer and the 65 Unit tests operate at the public `device/bluetooth` API layer and the
59 `BluetoothTest` fixture controls fake operating system behavior as close to the 66 `BluetoothTest` fixture controls fake operating system behavior as close to the
60 platfom as possible. The resulting test coverage spans the cross platform API, 67 platfom as possible. The resulting test coverage spans the cross platform API,
61 common implementation, and platform specific implementation as close to 68 common implementation, and platform specific implementation as close to
(...skipping 25 matching lines...) Expand all
87 94
88 ### Chrome OS Blueooth Controller Tests 95 ### Chrome OS Blueooth Controller Tests
89 96
90 Bluetooth controller system tests generating radio signals are run and managed 97 Bluetooth controller system tests generating radio signals are run and managed
91 by the Chrome OS team. See: 98 by the Chrome OS team. See:
92 https://chromium.googlesource.com/chromiumos/third_party/autotest/+/master/serve r/site_tests/ 99 https://chromium.googlesource.com/chromiumos/third_party/autotest/+/master/serve r/site_tests/
93 https://chromium.googlesource.com/chromiumos/third_party/autotest/+/master/serve r/cros/bluetooth/ 100 https://chromium.googlesource.com/chromiumos/third_party/autotest/+/master/serve r/cros/bluetooth/
94 https://chromium.googlesource.com/chromiumos/third_party/autotest/+/master/clien t/cros/bluetooth/ 101 https://chromium.googlesource.com/chromiumos/third_party/autotest/+/master/clien t/cros/bluetooth/
95 102
96 103
97 ## Android 104 ## Android
scheib 2017/04/12 18:56:46 I don't think this Android heading should be moved
ortuno 2017/04/13 01:12:47 Done.
98 105
99 The android implementation requires crossing from C++ to Java using 106 The android implementation requires crossing from C++ to Java using
100 [__JNI__](https://www.chromium.org/developers/design-documents/android-jni). 107 [__JNI__](https://www.chromium.org/developers/design-documents/android-jni).
101 108
102 Object ownership is rooted in the C++ classes, starting with the Adapter, which 109 Object ownership is rooted in the C++ classes, starting with the Adapter, which
103 owns Devices, Services, etc. Java counter parts interface with the Android 110 owns Devices, Services, etc. Java counter parts interface with the Android
104 Bluetooth objects. E.g. 111 Bluetooth objects. E.g.
105 112
106 For testing, the Android objects are __wrapped__ in: 113 For testing, the Android objects are __wrapped__ in:
107 `android/java/src/org/chromium/device/bluetooth/Wrappers.java`. <br> 114 `android/java/src/org/chromium/device/bluetooth/Wrappers.java`. <br>
(...skipping 21 matching lines...) Expand all
129 See also: [Class Diagram of Web Bluetooth through Bluetooth Android][Class] 136 See also: [Class Diagram of Web Bluetooth through Bluetooth Android][Class]
130 137
131 [Class]: https://sites.google.com/a/chromium.org/dev/developers/design-documents /bluetooth-design-docs/web-bluetooth-through-bluetooth-android-class-diagram 138 [Class]: https://sites.google.com/a/chromium.org/dev/developers/design-documents /bluetooth-design-docs/web-bluetooth-through-bluetooth-android-class-diagram
132 139
133 140
134 ## Design Documents 141 ## Design Documents
135 142
136 * [Bluetooth Notifications](https://docs.google.com/document/d/1guBtAnQUP8ZoZre4 VQGrjR5uX0ZYxfK-lwKNeqY0-z4/edit?usp=sharing) 2016-08-26 143 * [Bluetooth Notifications](https://docs.google.com/document/d/1guBtAnQUP8ZoZre4 VQGrjR5uX0ZYxfK-lwKNeqY0-z4/edit?usp=sharing) 2016-08-26
137 * Web Bluetooth through Android implementation details, class diagram and 144 * Web Bluetooth through Android implementation details, class diagram and
138 call flow. 145 call flow.
OLDNEW
« no previous file with comments | « device/bluetooth/BUILD.gn ('k') | device/bluetooth/public/interfaces/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698