| OLD | NEW |
| 1 Web Bluetooth API LayoutTests README | 1 Web Bluetooth API LayoutTests README |
| 2 | 2 |
| 3 This directory contains Web Bluetooth API layout tests. | 3 This directory contains Web Bluetooth API layout tests. |
| 4 | 4 |
| 5 # generator.py | 5 # generator.py |
| 6 | 6 |
| 7 The following files are generated by the generator.py script: | 7 For all .js files in script-tests/, generator.py will attempt to build test |
| 8 - /getPrimaryService/gen-* | 8 in bluetooth/. |
| 9 - /getPrimaryServices/gen-* | |
| 10 | 9 |
| 11 TODO(crbug.com/654670): Generate tests for getCharacteristic(s) and | 10 Note that for each subdirectory in script-test there is a matching directory |
| 12 readValue/writeValue/startNotifications. | 11 under bluetooth/. The generator will expand CALL functions into this |
| 12 corresponding directory. |
| 13 |
| 14 Example: |
| 15 |
| 16 bluetooth/script-tests/server/get-same-object.js expanded CALL will generate 3 |
| 17 files: |
| 18 |
| 19 bluetooth/server/getPrimaryService/gen-get-same-object.html |
| 20 bluetooth/server/getPrimaryServices/gen-get-same-object.html |
| 21 bluetooth/server/getPrimaryServices/gen-get-same-object-with-uuid.html |
| 22 |
| 23 This is because of the following lines CALL: |
| 24 |
| 25 gattServer.CALLS([ |
| 26 getPrimaryService('heart_rate')| |
| 27 getPrimaryServices()| |
| 28 getPrimaryServices('heart_rate')[UUID]]), |
| 29 |
| 13 | 30 |
| 14 Run | 31 Run |
| 32 |
| 15 $ python //third_party/WebKit/LayoutTests/bluetooth/generate.py | 33 $ python //third_party/WebKit/LayoutTests/bluetooth/generate.py |
| 16 to generate these files from templates in script-tests/*.js | 34 to generate these files from templates in script-tests/*.js |
| OLD | NEW |