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 901719b9512e541a58b0d9b5dc518063a9bd301f..b3eff3a324081eed77b6a41ff3075e7a0ea0aa8c 100644 |
--- a/third_party/WebKit/LayoutTests/usb/resources/usb-helpers.js |
+++ b/third_party/WebKit/LayoutTests/usb/resources/usb-helpers.js |
@@ -24,6 +24,14 @@ function callWithKeyDown(functionCalledOnKeyPress) { |
}); |
} |
+function runGarbageCollection() { |
+ // Run gc() as a promise. |
+ return new Promise((resolve, reject) => { |
+ GCController.collect(); |
+ setTimeout(resolve, 0); |
+ }); |
+} |
+ |
function usbMocks(mojo) { |
return define('USB Mocks', [ |
'device/usb/public/interfaces/chooser_service.mojom', |