Commit 8b8b00df authored by Cathy Lu's avatar Cathy Lu Committed by morgan
Browse files

Bug 1914797 - Part 1 + 2 + partial backout (details below)

Bug 1914797 - Part 1 - Revert bug 1868469 r=android-reviewers,jonalmeida, a=dmeehan

Differential Revision: https://phabricator.services.mozilla.com/D226431

Bug 1914797 - Part 2 - Add url change during onPageStart for slow loading sites r=android-reviewers,jonalmeida, a=dmeehan

Differential Revision: https://phabricator.services.mozilla.com/D226432

Backed out 1 changesets (bug 1914797) for causing Bug 1929028

Backed out changeset a79554879d7b (bug 1914797)
parent 6a9be964
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -4,7 +4,6 @@

package mozilla.components.feature.session

import mozilla.components.browser.state.action.ContentAction
import mozilla.components.browser.state.action.CrashAction
import mozilla.components.browser.state.action.EngineAction
import mozilla.components.browser.state.action.LastAccessAction
@@ -94,13 +93,6 @@ class SessionUseCases(
                    flags = flags,
                    additionalHeaders = additionalHeaders,
                )
                // Update the url in content immediately until the engine updates with any new changes to the state.
                store.dispatch(
                    ContentAction.UpdateUrlAction(
                        loadSessionId,
                        url,
                    ),
                )
                store.dispatch(
                    EngineAction.OptimizedLoadUrlTriggeredAction(
                        loadSessionId,
+0 −4
Original line number Diff line number Diff line
@@ -11,7 +11,6 @@ import mozilla.components.browser.state.action.EngineAction
import mozilla.components.browser.state.action.TabListAction
import mozilla.components.browser.state.engine.EngineMiddleware
import mozilla.components.browser.state.selector.findTab
import mozilla.components.browser.state.selector.selectedTab
import mozilla.components.browser.state.state.BrowserState
import mozilla.components.browser.state.state.TabSessionState
import mozilla.components.browser.state.state.createCustomTab
@@ -81,7 +80,6 @@ class SessionUseCasesTest {
            assertEquals("mozilla", action.tabId)
            assertEquals("https://getpocket.com", action.url)
        }
        assertEquals("https://getpocket.com", store.state.selectedTab?.content?.url)

        useCases.loadUrl("https://www.mozilla.org", LoadUrlFlags.select(LoadUrlFlags.EXTERNAL))
        store.waitUntilIdle()
@@ -95,7 +93,6 @@ class SessionUseCasesTest {
            assertEquals("https://www.mozilla.org", action.url)
            assertEquals(LoadUrlFlags.select(LoadUrlFlags.EXTERNAL), action.flags)
        }
        assertEquals("https://www.mozilla.org", store.state.selectedTab?.content?.url)

        useCases.loadUrl("https://firefox.com", store.state.selectedTabId)
        store.waitUntilIdle()
@@ -105,7 +102,6 @@ class SessionUseCasesTest {
            assertEquals("mozilla", action.tabId)
            assertEquals("https://firefox.com", action.url)
        }
        assertEquals("https://firefox.com", store.state.selectedTab?.content?.url)

        useCases.loadUrl.invoke(
            "https://developer.mozilla.org",
+0 −3
Original line number Diff line number Diff line
@@ -109,9 +109,6 @@ permalink: /changelog/
* **feature-customtabs**
  * Fallback behaviour when failing to open a new window in custom tab will now be loading the URL directly in the same custom tab. [Bug 1832357](https://bugzilla.mozilla.org/show_bug.cgi?id=1832357)

* **feature-session**
  * Update URL in the store immediately when using the optimized load URL code path.

* **tooling-lint**
  * Added a lint rule to detect when `Response#close` may not have been called. Note: Currently, this rule only runs on Android Components.

+1 −1
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@ class CrashReportingTest : TestSetup() {
            verifyPageContent(tabCrashMessage)
        }.openTabDrawer(activityTestRule) {
            verifyExistingOpenTabs(firstWebPage.title)
            verifyExistingOpenTabs("about:crashcontent")
            verifyExistingOpenTabs(secondWebPage.title)
        }.closeTabDrawer {
        }.goToHomescreen {
            verifyExistingTopSitesList()