fune/mobile/android/android-components/components/support/test-fakes
Grigory Kruglov 03794ddc5b [components] Avoid eagerly rehydrating EngineSessionState for recently closed tabs
This change splits out tab-specific data from RecoverableTab data class
into a separate TabState (so, it doesn't have the EngineSessionState).

Then, once we have the simplified TabState, everything that touches RecentlyClosedTabs
is converted to use that instead of its more expensive sibling.

This way we avoid having to eagerly process EngineSessionState simply to populate BrowserState.closedTabs.
This saves us from having to hit disk (where the EngineSessionState is persisted) on initializing BrowserState (so, startup in most cases).
It also saves us from having to parse/rehydrate that persisted state.

At the point we actually need the EngineSessionState for a tab we'd like to restore, we can read/process it.
2022-02-14 14:54:00 -08:00
..
src/main [components] Avoid eagerly rehydrating EngineSessionState for recently closed tabs 2022-02-14 14:54:00 -08:00
build.gradle [components] Create support-test-fakes component and move FakeEngine implementation to it 2021-12-06 15:19:50 +00:00
README.md [components] Create support-test-fakes component and move FakeEngine implementation to it 2021-12-06 15:19:50 +00:00

Android Components > Support > Test Fakes

A collection of fake implementations for testing purposes.

Usage

Setting up the dependency

Use Gradle to download the library from maven.mozilla.org (Setup repository):

implementation "org.mozilla.components:support-test-fakes:{latest-version}"

License

This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/