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