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

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

Issue 1334763002: bluetooth: Subscribe to notifications (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-origin
Patch Set: Fix global interface test 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 assert_true(!!match, event + "isn't an add-device event: " + description); 116 assert_true(!!match, event + "isn't an add-device event: " + description);
117 this._idsByName.set(match[1], match[2]); 117 this._idsByName.set(match[1], match[2]);
118 } 118 }
119 has(name) { 119 has(name) {
120 return this._idsByName.has(name); 120 return this._idsByName.has(name);
121 } 121 }
122 get(name) { 122 get(name) {
123 return this._idsByName.get(name); 123 return this._idsByName.get(name);
124 } 124 }
125 } 125 }
126
127 function runGarbageCollection()
128 {
129 // Run gc() as a promise.
130 return new Promise(
131 function(resolve, reject) {
132 GCController.collect();
133 setTimeout(resolve, 0);
134 });
135 return Promise.resolve();
136 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698