2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-15 18:12:54 +00:00

Bug 1879886 - Convert private variables to functions so they don't get initialized

This commit is contained in:
AndiAJ 2024-02-09 16:15:03 +02:00 committed by mergify[bot]
parent 1be6982290
commit cd55ceee51

View File

@ -114,7 +114,7 @@ class NavigationToolbarRobot {
// New unified search UI selector
fun verifyDefaultSearchEngine(engineName: String) =
assertUIObjectExists(
searchSelectorButton.getChild(UiSelector().description(engineName)),
searchSelectorButton().getChild(UiSelector().description(engineName)),
)
fun verifyTextSelectionOptions(vararg textSelectionOptions: String) {
@ -352,8 +352,8 @@ class NavigationToolbarRobot {
}
fun clickSearchSelectorButton(interact: SearchRobot.() -> Unit): SearchRobot.Transition {
searchSelectorButton.waitForExists(waitingTime)
searchSelectorButton.click()
searchSelectorButton().waitForExists(waitingTime)
searchSelectorButton().click()
SearchRobot().interact()
return SearchRobot.Transition()
@ -413,7 +413,7 @@ private fun assertReaderViewDetected(visible: Boolean) {
)
}
private val searchSelectorButton =
private fun searchSelectorButton() =
mDevice.findObject(UiSelector().resourceId("$packageName:id/search_selector"))
inline fun runWithIdleRes(ir: IdlingResource?, pendingCheck: () -> Unit) {