diff --git a/CHANGELOG.md b/CHANGELOG.md index dfe362c3..58bbe141 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,9 @@ Dropping a requirement of a major version of a dependency is a new contract. ### Fixed - Use non-deprecated Kotlin stdlib. Fix [JPERF-466]. +### Added +- Added parametrized `CustomChromium`. + [JPERF-466]: https://ecosystem.atlassian.net/browse/JPERF-466 ## [4.14.4] - 2019-12-09 diff --git a/src/main/kotlin/com/atlassian/performance/tools/infrastructure/api/browser/chromium/CustomChromium.kt b/src/main/kotlin/com/atlassian/performance/tools/infrastructure/api/browser/chromium/CustomChromium.kt new file mode 100644 index 00000000..6e5dc91e --- /dev/null +++ b/src/main/kotlin/com/atlassian/performance/tools/infrastructure/api/browser/chromium/CustomChromium.kt @@ -0,0 +1,24 @@ +package com.atlassian.performance.tools.infrastructure.api.browser.chromium + +import com.atlassian.performance.tools.infrastructure.ChromedriverInstaller +import com.atlassian.performance.tools.infrastructure.ChromiumInstaller +import com.atlassian.performance.tools.infrastructure.api.browser.Browser +import com.atlassian.performance.tools.infrastructure.ParallelExecutor +import com.atlassian.performance.tools.ssh.api.SshConnection +import java.net.URI + +class CustomChromium( + private val chromiumUri: URI, + private val chromedriverUri: URI +) : Browser { + + /** + * Installs chromium with specified URI + */ + override fun install(ssh: SshConnection) { + ParallelExecutor().execute( + { ChromiumInstaller(chromiumUri).install(ssh) }, + { ChromedriverInstaller(chromedriverUri).install(ssh) } + ) + } +} \ No newline at end of file