Skip to content

Commit c40c483

Browse files
committed
Remove unused param
1 parent b775266 commit c40c483

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

js-messaging/js-messaging-impl/src/main/java/com/duckduckgo/js/messaging/impl/RealAddDocumentStartScriptDelegate.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,13 @@ import android.annotation.SuppressLint
2020
import android.webkit.WebView
2121
import androidx.webkit.ScriptHandler
2222
import com.duckduckgo.app.browser.api.WebViewCapabilityChecker
23-
import com.duckduckgo.app.di.AppCoroutineScope
2423
import com.duckduckgo.browser.api.webviewcompat.WebViewCompatWrapper
2524
import com.duckduckgo.common.utils.DispatcherProvider
2625
import com.duckduckgo.di.scopes.AppScope
2726
import com.duckduckgo.js.messaging.api.AddDocumentStartJavaScript
2827
import com.duckduckgo.js.messaging.api.AddDocumentStartJavaScriptScriptStrategy
2928
import com.duckduckgo.js.messaging.api.AddDocumentStartScriptDelegate
3029
import com.squareup.anvil.annotations.ContributesBinding
31-
import kotlinx.coroutines.CoroutineScope
3230
import kotlinx.coroutines.withContext
3331
import javax.inject.Inject
3432

@@ -39,7 +37,6 @@ import javax.inject.Inject
3937
@ContributesBinding(AppScope::class)
4038
class RealAddDocumentStartScriptDelegate @Inject constructor(
4139
private val webViewCapabilityChecker: WebViewCapabilityChecker,
42-
@AppCoroutineScope private val coroutineScope: CoroutineScope,
4340
private val dispatcherProvider: DispatcherProvider,
4441
private val webViewCompatWrapper: WebViewCompatWrapper,
4542
) : AddDocumentStartScriptDelegate {

js-messaging/js-messaging-impl/src/test/java/com/duckduckgo/js/messaging/impl/RealAddDocumentStartScriptDelegateTest.kt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import androidx.webkit.ScriptHandler
55
import com.duckduckgo.app.browser.api.WebViewCapabilityChecker
66
import com.duckduckgo.browser.api.webviewcompat.WebViewCompatWrapper
77
import com.duckduckgo.common.test.CoroutineTestRule
8-
import com.duckduckgo.common.utils.DispatcherProvider
98
import com.duckduckgo.js.messaging.api.AddDocumentStartJavaScript
109
import com.duckduckgo.js.messaging.api.AddDocumentStartJavaScriptScriptStrategy
1110
import kotlinx.coroutines.test.runTest
@@ -26,20 +25,16 @@ class RealAddDocumentStartScriptDelegateTest {
2625
private val mockWebViewCompatWrapper: WebViewCompatWrapper = mock()
2726
private val mockWebView: WebView = mock()
2827
private val mockScriptHandler: ScriptHandler = mock()
29-
private val mockDispatcherProvider: DispatcherProvider = mock()
30-
3128
private lateinit var testee: RealAddDocumentStartScriptDelegate
3229
private lateinit var plugin: AddDocumentStartJavaScript
3330

3431
@Before
3532
fun setUp() =
3633
runTest {
37-
whenever(mockDispatcherProvider.main()).thenReturn(coroutineRule.testDispatcher)
3834
testee =
3935
RealAddDocumentStartScriptDelegate(
4036
mockWebViewCapabilityChecker,
41-
coroutineRule.testScope,
42-
mockDispatcherProvider,
37+
coroutineRule.testDispatcherProvider,
4338
mockWebViewCompatWrapper,
4439
)
4540
}

0 commit comments

Comments
 (0)