Commit a8df901c authored by Roger Yang's avatar Roger Yang Committed by Pier Angelo Vendrame
Browse files

Bug 1862537 - Do not try to go back when it's a initial load...

Bug 1862537 - Do not try to go back when it's a initial load r=android-reviewers,harrisono, a=pascalc

Differential Revision: https://phabricator.services.mozilla.com/D219782
parent d79dd048
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -1120,12 +1120,15 @@ class GeckoEngineSession(
                return
            }

            // if it is an initial load then we can't go back. We should update the URL.
            if (!initialLoad) {
                appRedirectUrl?.let {
                    if (url == appRedirectUrl) {
                        goBack(false)
                        return
                    }
                }
            }

            currentUrl = url
            initialLoad = false
+1 −0
Original line number Diff line number Diff line
@@ -1049,6 +1049,7 @@ class GeckoEngineSessionTest {
        )
        engineSession.settings.historyTrackingDelegate = historyTrackingDelegate
        engineSession.appRedirectUrl = emptyPageUrl
        engineSession.initialLoad = false

        class MockHistoryList(
            items: List<GeckoSession.HistoryDelegate.HistoryItem>,