Skip to content

Commit

Permalink
Adds a startup and custom flow regression
Browse files Browse the repository at this point in the history
  • Loading branch information
amanjeetsingh150 authored and dmitry-zaitsev committed Sep 1, 2022
1 parent 5735455 commit d573125
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
11 changes: 11 additions & 0 deletions app/src/main/java/org/mozilla/fenix/HomeActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
binding = ActivityHomeBinding.inflate(layoutInflater)
setContentView(binding.root)
ProfilerMarkers.addListenerForOnGlobalLayout(components.core.engine, this, binding.root)
methodForStartupRegression()

// Must be after we set the content view
if (isVisuallyComplete) {
Expand Down Expand Up @@ -302,6 +303,16 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
}
}

private fun methodForStartupRegression() {
repeat(3) {
doSomethingSlow()
}
}

private fun doSomethingSlow() {
Thread.sleep(100)
}

private fun startupTelemetryOnCreateCalled(safeIntent: SafeIntent) {
// We intentionally only record this in HomeActivity and not ExternalBrowserActivity (e.g.
// PWAs) so we don't include more unpredictable code paths in the results.
Expand Down
4 changes: 4 additions & 0 deletions app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,10 @@ class HomeFragment : Fragment() {
)

val blocklistHandler = BlocklistHandler(components.settings)
// Regression in custom flow
repeat(2) {
Thread.sleep(2000)
}
homeFragmentStore = StoreProvider.get(this) {
HomeFragmentStore(
initialState = HomeFragmentState(
Expand Down

0 comments on commit d573125

Please sign in to comment.