@@ -7878,76 +7878,6 @@ class BrowserTabViewModelTest {
78787878 override fun getCustomHeaders (url : String ): Map <String , String > = headers
78797879 }
78807880
7881- class FakeAddDocumentStartJavaScriptPlugin (
7882- override val context : String ,
7883- ) : AddDocumentStartJavaScriptPlugin {
7884- var countInitted = 0
7885- private set
7886-
7887- override suspend fun addDocumentStartJavaScript (webView : WebView ) {
7888- countInitted++
7889- }
7890- }
7891-
7892- class FakeAddDocumentStartJavaScriptPluginPoint : PluginPoint <AddDocumentStartJavaScriptPlugin > {
7893- val cssPlugin = FakeAddDocumentStartJavaScriptPlugin (" contentScopeScripts" )
7894- val otherPlugin = FakeAddDocumentStartJavaScriptPlugin (" test" )
7895-
7896- override fun getPlugins () = listOf (cssPlugin, otherPlugin)
7897- }
7898-
7899- class FakeWebMessagingPlugin : WebMessagingPlugin {
7900- var registered = false
7901- private set
7902-
7903- override suspend fun unregister (webView : WebView ) {
7904- registered = false
7905- }
7906-
7907- override suspend fun register (
7908- jsMessageCallback : WebViewCompatMessageCallback ,
7909- webView : WebView ,
7910- ) {
7911- registered = true
7912- }
7913-
7914- override suspend fun postMessage (
7915- webView : WebView ,
7916- subscriptionEventData : SubscriptionEventData ,
7917- ) {
7918- }
7919-
7920- override val context: String
7921- get() = " test"
7922- }
7923-
7924- class FakeWebMessagingPluginPoint : PluginPoint <WebMessagingPlugin > {
7925- val plugin = FakeWebMessagingPlugin ()
7926-
7927- override fun getPlugins (): Collection <WebMessagingPlugin > = listOf (plugin)
7928- }
7929-
7930- class FakePostMessageWrapperPlugin : PostMessageWrapperPlugin {
7931- var postMessageCalled = false
7932- private set
7933-
7934- override suspend fun postMessage (
7935- message : SubscriptionEventData ,
7936- webView : WebView ,
7937- ) {
7938- postMessageCalled = true
7939- }
7940-
7941- override val context: String
7942- get() = " contentScopeScripts"
7943- }
7944-
7945- class FakePostMessageWrapperPluginPoint : PluginPoint <PostMessageWrapperPlugin > {
7946- val plugin = FakePostMessageWrapperPlugin ()
7947-
7948- override fun getPlugins (): Collection <PostMessageWrapperPlugin > = listOf (plugin)
7949- }
7950-
79517881 class FakeContentScopeScriptsSubscriptionEventPlugin (
79527882 private val eventData : SubscriptionEventData ,
79537883 ) : ContentScopeScriptsSubscriptionEventPlugin {
0 commit comments