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

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

Issue 1293593003: Add errors for various chooser failure modes, and remove assertions that are about to change. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@pinned
Patch Set: Sync Created 5 years, 4 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 | « LayoutTests/bluetooth/requestDevice.html ('k') | Source/modules/bluetooth/BluetoothError.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 return strAlias + '-97e5-4cd7-b9f1-f5a427670c59'; 73 return strAlias + '-97e5-4cd7-b9f1-f5a427670c59';
74 } 74 }
75 75
76 // Function to test that a promise rejects with the expected error type and 76 // Function to test that a promise rejects with the expected error type and
77 // message. 77 // message.
78 function assert_promise_rejects_with_message(promise, expected, description) { 78 function assert_promise_rejects_with_message(promise, expected, description) {
79 return promise.then(() => { 79 return promise.then(() => {
80 assert_unreached('Promise should have rejected: ' + description); 80 assert_unreached('Promise should have rejected: ' + description);
81 }, error => { 81 }, error => {
82 assert_equals(error.name, expected.name, 'Unexpected Error Name:'); 82 assert_equals(error.name, expected.name, 'Unexpected Error Name:');
83 assert_equals(error.message, expected.message, 'Unexpected Error Message:'); 83 if (expected.message) {
84 assert_equals(error.message, expected.message, 'Unexpected Error Message:' );
85 }
84 }); 86 });
85 } 87 }
OLDNEW
« no previous file with comments | « LayoutTests/bluetooth/requestDevice.html ('k') | Source/modules/bluetooth/BluetoothError.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698