| Index: third_party/WebKit/LayoutTests/usb/resources/usb-helpers.js
|
| diff --git a/third_party/WebKit/LayoutTests/usb/resources/usb-helpers.js b/third_party/WebKit/LayoutTests/usb/resources/usb-helpers.js
|
| index faf30ac5c58e06a93c54dd4cd9acfae75ed57ade..ccceef54b7405e7443c8a3b71d129343991c35f0 100644
|
| --- a/third_party/WebKit/LayoutTests/usb/resources/usb-helpers.js
|
| +++ b/third_party/WebKit/LayoutTests/usb/resources/usb-helpers.js
|
| @@ -1,5 +1,15 @@
|
| 'use strict';
|
|
|
| +function assertRejectsWithError(promise, name, message) {
|
| + return promise.then(() => {
|
| + assert_unreached('expected promise to reject with ' + name);
|
| + }, error => {
|
| + assert_equals(error.name, name);
|
| + if (message !== undefined)
|
| + assert_equals(error.message, message);
|
| + });
|
| +}
|
| +
|
| // TODO(reillyg): Remove when jyasskin upstreams this to testharness.js:
|
| // https://crbug.com/509058.
|
| function callWithKeyDown(functionCalledOnKeyPress) {
|
|
|