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

Unified Diff: third_party/WebKit/LayoutTests/usb/resources/usb-helpers.js

Issue 1820173002: Close USB device connections when the page is hidden. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased and fixed nit. Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
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) {

Powered by Google App Engine
This is Rietveld 408576698