Loading buildSrc/src/main/java/Gecko.kt +1 −1 Original line number Diff line number Diff line Loading @@ -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") Loading components/browser/engine-gecko/src/androidTest/java/mozilla/components/browser/engine/gecko/fetch/geckoview/GeckoViewFetchTestCases.kt +8 −0 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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() } Loading @@ -130,4 +132,10 @@ class GeckoViewFetchTestCases : mozilla.components.tooling.fetch.tests.FetchTest override fun getThrowsIOExceptionWhenHostNotReachable() { super.getThrowsIOExceptionWhenHostNotReachable() } @Test @UiThreadTest override fun getDataUri() { super.getDataUri() } } components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngineSession.kt +21 −15 Original line number Diff line number Diff line Loading @@ -145,7 +145,6 @@ class GeckoEngineSession( notifyObservers { onNavigateBack() } } } /** * See [EngineSession.goForward] */ Loading Loading @@ -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 Loading @@ -390,6 +393,9 @@ class GeckoEngineSession( } } } } else { null } return if (response != null) { GeckoResult.fromValue(AllowOrDeny.DENY) Loading components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngineView.kt +4 −2 Original line number Diff line number Diff line Loading @@ -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() } Loading Loading @@ -149,7 +149,9 @@ class GeckoEngineView @JvmOverloads constructor( override fun release() { detachSelectionActionDelegate(currentSession?.geckoSession) currentSession?.apply { unregister(observer) } currentSession?.apply { unregister(observer) } currentSession = null Loading components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoResult.kt +1 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ suspend fun <T> GeckoResult<T>.await() = suspendCoroutine<T?> { continuation -> GeckoResult<Void>() }) } /** * Converts a [GeckoResult] to a [CancellableOperation]. */ Loading Loading
buildSrc/src/main/java/Gecko.kt +1 −1 Original line number Diff line number Diff line Loading @@ -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") Loading
components/browser/engine-gecko/src/androidTest/java/mozilla/components/browser/engine/gecko/fetch/geckoview/GeckoViewFetchTestCases.kt +8 −0 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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() } Loading @@ -130,4 +132,10 @@ class GeckoViewFetchTestCases : mozilla.components.tooling.fetch.tests.FetchTest override fun getThrowsIOExceptionWhenHostNotReachable() { super.getThrowsIOExceptionWhenHostNotReachable() } @Test @UiThreadTest override fun getDataUri() { super.getDataUri() } }
components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngineSession.kt +21 −15 Original line number Diff line number Diff line Loading @@ -145,7 +145,6 @@ class GeckoEngineSession( notifyObservers { onNavigateBack() } } } /** * See [EngineSession.goForward] */ Loading Loading @@ -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 Loading @@ -390,6 +393,9 @@ class GeckoEngineSession( } } } } else { null } return if (response != null) { GeckoResult.fromValue(AllowOrDeny.DENY) Loading
components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngineView.kt +4 −2 Original line number Diff line number Diff line Loading @@ -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() } Loading Loading @@ -149,7 +149,9 @@ class GeckoEngineView @JvmOverloads constructor( override fun release() { detachSelectionActionDelegate(currentSession?.geckoSession) currentSession?.apply { unregister(observer) } currentSession?.apply { unregister(observer) } currentSession = null Loading
components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoResult.kt +1 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ suspend fun <T> GeckoResult<T>.await() = suspendCoroutine<T?> { continuation -> GeckoResult<Void>() }) } /** * Converts a [GeckoResult] to a [CancellableOperation]. */ Loading