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 5d86799f5bcbea9d94fb8fed35df03154e15560f..932f3f6c477b9ddd436ceaef02ebf5ef75e05dd0 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', |