src/vs/workbench/electron-sandbox/window.ts/NativeWindow/setupDriver
class NativeWindow:	private setupDriver(): void {

		// Modern Driver
		if (this.environmentService.enableSmokeTestDriver) {
			const that = this;
			registerWindowDriver({
				async exitApplication(): Promise<number> {
					that.nativeHostService.quit();

					return that.environmentService.mainPid;
				}
			});
		}

		// Legacy Driver (TODO@bpasero remove me eventually)
		else if (this.environmentService.args.driver) {
			this.instantiationService.invokeFunction(async accessor => this._register(await registerLegacyWindowDriver(accessor, this.nativeHostService.windowId)));
		}
	}