Skip to content

Commit

Permalink
Bug 1914797 - Part 1 + 2 + partial backout (details below)
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
calumozilla authored and morganava committed Nov 25, 2024
1 parent 255f9c5 commit 60b7e8a
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand All @@ -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()
Expand All @@ -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",
Expand Down
3 changes: 0 additions & 3 deletions mobile/android/android-components/docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

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

0 comments on commit 60b7e8a

Please sign in to comment.