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

Side by Side Diff: third_party/WebKit/LayoutTests/bluetooth/resources/bluetooth-helpers.js

Issue 1403723004: bluetooth: Implement BluetoothCharacteristicProperties (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-query-cache
Patch Set: Address scheib's comments Created 5 years, 2 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
OLDNEW
1 'use strict'; 1 'use strict';
2 2
3 // Sometimes we need to test that using either the name, alias, or UUID 3 // Sometimes we need to test that using either the name, alias, or UUID
4 // produces the same result. The following objects help us do that. 4 // produces the same result. The following objects help us do that.
5 var generic_access = { 5 var generic_access = {
6 alias: 0x1800, 6 alias: 0x1800,
7 name: 'generic_access', 7 name: 'generic_access',
8 uuid: '00001800-0000-1000-8000-00805f9b34fb' 8 uuid: '00001800-0000-1000-8000-00805f9b34fb'
9 }; 9 };
10 var device_name = { 10 var device_name = {
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 }; 177 };
178 object.addEventListener(event_name, event_listener); 178 object.addEventListener(event_name, event_listener);
179 // TODO(ortuno): Remove timeout. 179 // TODO(ortuno): Remove timeout.
180 // http://crbug.com/543884 180 // http://crbug.com/543884
181 setTimeout(() => { 181 setTimeout(() => {
182 object.removeEventListener(event_name, event_listener); 182 object.removeEventListener(event_name, event_listener);
183 resolve(); 183 resolve();
184 }, 100); 184 }, 100);
185 }); 185 });
186 } 186 }
187
188 class TestCharacteristicProperties {
189 constructor(properties) {
190 this.broadcast = properties.broadcast || false;
191 this.read = properties.read || false;
192 this.writeWithoutResponse = properties.writeWithoutResponse || false;
193 this.write = properties.write || false;
194 this.notify = properties.notify || false;
195 this.indicate = properties.indicate || false;
196 this.authenticatedSignedWrites = properties.authenticatedSignedWrites || fal se;
197 this.reliableWrite = properties.reliableWrite || false;
198 this.writableAuxiliaries = properties.writableAuxiliaries || false;
199 }
200 }
201
202 function assert_properties_equal(properties, expected_properties) {
203 for (let key in expected_properties) {
204 assert_equals(properties[key], expected_properties[key]);
205 }
206 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698