Commit b3fa7b2d authored by Sebastian Kaspari's avatar Sebastian Kaspari
Browse files

Issue #6872: (Merge day) browser-engine-gecko-beta (76) -> browser-engine-gecko (76)

parent fdc18371
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@ internal object GeckoVersions {
    /**
     * GeckoView Release Version.
     */
    const val release_version = "75.0.20200403170909"
    const val release_version = "76.0.20200429185419"
}

@Suppress("MaxLineLength")
+8 −0
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@ import androidx.test.filters.MediumTest
import mozilla.components.browser.engine.gecko.fetch.GeckoViewFetchClient
import mozilla.components.concept.fetch.Client
import org.junit.Assert.assertTrue
import org.junit.Ignore
import org.junit.Test

@MediumTest
@@ -109,6 +110,7 @@ class GeckoViewFetchTestCases : mozilla.components.tooling.fetch.tests.FetchTest

    @Test
    @UiThreadTest
    @Ignore("https://bugzilla.mozilla.org/show_bug.cgi?id=1626335")
    override fun get200WithCookiePolicy() {
        super.get200WithCookiePolicy()
    }
@@ -130,4 +132,10 @@ class GeckoViewFetchTestCases : mozilla.components.tooling.fetch.tests.FetchTest
    override fun getThrowsIOExceptionWhenHostNotReachable() {
        super.getThrowsIOExceptionWhenHostNotReachable()
    }

    @Test
    @UiThreadTest
    override fun getDataUri() {
        super.getDataUri()
    }
}
+21 −15
Original line number Diff line number Diff line
@@ -145,7 +145,6 @@ class GeckoEngineSession(
            notifyObservers { onNavigateBack() }
        }
    }

    /**
     * See [EngineSession.goForward]
     */
@@ -372,10 +371,14 @@ class GeckoEngineSession(
                return GeckoResult.fromValue(AllowOrDeny.ALLOW)
            }

            val isSameDomain = this@GeckoEngineSession.currentUrl?.tryGetHostFromUrl() ==
                request.uri.tryGetHostFromUrl()
            val response = settings.requestInterceptor?.onLoadRequest(
                this@GeckoEngineSession,
            val interceptor = settings.requestInterceptor
            val response = if (
                interceptor != null && (!request.isDirectNavigation || interceptor.interceptsAppInitiatedRequests())
            ) {
                val engineSession = this@GeckoEngineSession
                val isSameDomain = engineSession.currentUrl?.tryGetHostFromUrl() == request.uri.tryGetHostFromUrl()
                interceptor.onLoadRequest(
                    engineSession,
                    request.uri,
                    request.hasUserGesture,
                    isSameDomain
@@ -390,6 +393,9 @@ class GeckoEngineSession(
                        }
                    }
                }
            } else {
                null
            }

            return if (response != null) {
                GeckoResult.fromValue(AllowOrDeny.DENY)
+4 −2
Original line number Diff line number Diff line
@@ -102,7 +102,7 @@ class GeckoEngineView @JvmOverloads constructor(
            currentGeckoView.session?.let {
                // Release a previously assigned session. Otherwise GeckoView will close it
                // automatically.
                detachSelectionActionDelegate(currentGeckoView.session)
                detachSelectionActionDelegate(it)
                currentGeckoView.releaseSession()
            }

@@ -149,7 +149,9 @@ class GeckoEngineView @JvmOverloads constructor(
    override fun release() {
        detachSelectionActionDelegate(currentSession?.geckoSession)

        currentSession?.apply { unregister(observer) }
        currentSession?.apply {
            unregister(observer)
        }

        currentSession = null

+1 −0
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ suspend fun <T> GeckoResult<T>.await() = suspendCoroutine<T?> { continuation ->
        GeckoResult<Void>()
    })
}

/**
 * Converts a [GeckoResult] to a [CancellableOperation].
 */
Loading