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

Side by Side Diff: content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.h

Issue 2443063002: bluetooth: Require frame to be connected for stopNotifications to succeed. (Closed)
Patch Set: Fix test expectations Created 4 years, 1 month 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 | « no previous file | content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVIDER _H_ 5 #ifndef CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVIDER _H_
6 #define CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVIDER _H_ 6 #define CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVIDER _H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 // - StartNotifySession: If |succeeds| is true, saves a 369 // - StartNotifySession: If |succeeds| is true, saves a
370 // succeeding callback, otherwise it saves a failing callback. 370 // succeeding callback, otherwise it saves a failing callback.
371 // This calback is run during CreateGattConnection. If 371 // This calback is run during CreateGattConnection. If
372 // |disconnect| is true disconnects the device. 372 // |disconnect| is true disconnects the device.
373 // - CreateGattConnection: Runs success callback with a new GATT 373 // - CreateGattConnection: Runs success callback with a new GATT
374 // connection and runs any pending GATT operation callbacks. 374 // connection and runs any pending GATT operation callbacks.
375 static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>> 375 static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>>
376 GetGATTOperationFinishesAfterReconnectionAdapter(bool disconnect, 376 GetGATTOperationFinishesAfterReconnectionAdapter(bool disconnect,
377 bool succeeds); 377 bool succeeds);
378 378
379 // |StopNotifySessionFinishesAfterReconnection|(disconnect)
380 // Inherits from |EmptyAdapter|
381 // Internal Structure:
382 // - Health Thermometer Device
383 // - UUIDs:
384 // - Generic Access UUID (0x1800)
385 // - Health Thermometer UUID (0x1809)
386 // - Services:
387 // - Generic Access Service - Characteristics as described in
388 // GetGenericAccessService.
389 // - Health Thermometer
390 // - Measurement Interval:
391 // - StartNotifySession: Calls the success callback with a
392 // NotifySession whose Stop function: saves a callback and
393 // if |disconnect| is true disconnects the device.
394 // - CreateGattConnection: Runs success callback with a new GATT
395 // connection and runs any pending GATT operation callbacks.
396 static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>>
397 GetStopNotifySessionFinishesAfterReconnectionAdapter(bool disconnect);
398
379 // |BlacklistTestAdapter| 399 // |BlacklistTestAdapter|
380 // Inherits from |EmptyAdapter| 400 // Inherits from |EmptyAdapter|
381 // Internal Structure: 401 // Internal Structure:
382 // - |ConnectableDevice|(adapter, "Blacklist Test Device", uuids) 402 // - |ConnectableDevice|(adapter, "Blacklist Test Device", uuids)
383 // - UUIDs: 403 // - UUIDs:
384 // - Blacklist Test Service UUID 404 // - Blacklist Test Service UUID
385 // (611c954a-263b-4f4a-aab6-01ddb953f985) 405 // (611c954a-263b-4f4a-aab6-01ddb953f985)
386 // - Device Information UUID (0x180a) 406 // - Device Information UUID (0x180a)
387 // - Generic Access UUID (0x1800) 407 // - Generic Access UUID (0x1800)
388 // - Heart Rate UUID (0x180d) 408 // - Heart Rate UUID (0x180d)
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
805 825
806 // Function to turn an integer into an MAC address of the form 826 // Function to turn an integer into an MAC address of the form
807 // XX:XX:XX:XX:XX:XX. For example makeMACAddress(0xdeadbeef) 827 // XX:XX:XX:XX:XX:XX. For example makeMACAddress(0xdeadbeef)
808 // returns "00:00:DE:AD:BE:EF". 828 // returns "00:00:DE:AD:BE:EF".
809 static std::string makeMACAddress(uint64_t addr); 829 static std::string makeMACAddress(uint64_t addr);
810 }; 830 };
811 831
812 } // namespace content 832 } // namespace content
813 833
814 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVI DER_H_ 834 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVI DER_H_
OLDNEW
« no previous file with comments | « no previous file | content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698