For #26844: Rename CFRPopupFullscreenLayout class to conform to filename rule.

This commit is contained in:
mcarare 2022-09-07 12:29:30 +03:00 committed by mergify[bot]
parent 0f908db985
commit 9490fdff71
3 changed files with 8 additions and 8 deletions

View File

@ -63,7 +63,7 @@ class CFRPopup(
// This is just a facade for the CFRPopupFullScreenLayout composable offering a cleaner API.
@VisibleForTesting
internal var popup: WeakReference<CFRPopupFullScreenLayout>? = null
internal var popup: WeakReference<CFRPopupFullscreenLayout>? = null
/**
* Construct and display a styled CFR popup shown at the coordinates of [anchor].
@ -72,7 +72,7 @@ class CFRPopup(
*/
fun show() {
anchor.post {
CFRPopupFullScreenLayout(text, anchor, properties, onDismiss, action).apply {
CFRPopupFullscreenLayout(text, anchor, properties, onDismiss, action).apply {
this.show()
popup = WeakReference(this)
}

View File

@ -70,7 +70,7 @@ private data class PopupHorizontalBounds(
* @param action Optional other composable to show just below the popup text.
*/
@SuppressLint("ViewConstructor") // Intended to be used only in code, don't need a View constructor
internal class CFRPopupFullScreenLayout(
internal class CFRPopupFullscreenLayout(
private val text: String,
private val anchor: View,
private val properties: CFRPopupProperties,

View File

@ -28,7 +28,7 @@ import org.junit.runner.RunWith
import org.mozilla.fenix.helpers.FenixRobolectricTestRunner
@RunWith(FenixRobolectricTestRunner::class)
class CFRPopupFullScreenLayoutTest {
class CFRPopupFullscreenLayoutTest {
@Test
fun `WHEN the popup is constructed THEN setup lifecycle owners`() {
val anchor = View(testContext).apply {
@ -36,7 +36,7 @@ class CFRPopupFullScreenLayoutTest {
this.setViewTreeSavedStateRegistryOwner(mockk())
}
val popupView = spyk(CFRPopupFullScreenLayout("", anchor, mockk(), mockk()) {})
val popupView = spyk(CFRPopupFullscreenLayout("", anchor, mockk(), mockk()) {})
assertNotNull(popupView.findViewTreeLifecycleOwner())
assertEquals(
@ -59,7 +59,7 @@ class CFRPopupFullScreenLayoutTest {
}
val windowManager = spyk(context.getSystemService(Context.WINDOW_SERVICE) as WindowManager)
every { context.getSystemService(Context.WINDOW_SERVICE) } returns windowManager
val popupView = CFRPopupFullScreenLayout("", anchor, mockk(), mockk()) {}
val popupView = CFRPopupFullscreenLayout("", anchor, mockk(), mockk()) {}
popupView.show()
assertNotNull(popupView.findViewTreeLifecycleOwner())
assertNotNull(popupView.findViewTreeSavedStateRegistryOwner())
@ -77,7 +77,7 @@ class CFRPopupFullScreenLayoutTest {
val anchor = View(context)
val windowManager = spyk(context.getSystemService(Context.WINDOW_SERVICE))
every { context.getSystemService(Context.WINDOW_SERVICE) } returns windowManager
val popupView = CFRPopupFullScreenLayout("", anchor, mockk(), mockk()) {}
val popupView = CFRPopupFullscreenLayout("", anchor, mockk(), mockk()) {}
val layoutParamsCaptor = slot<LayoutParams>()
popupView.show()
@ -97,7 +97,7 @@ class CFRPopupFullScreenLayoutTest {
@Test
fun `WHEN creating layout params THEN get fullscreen translucent layout params`() {
val anchor = View(testContext)
val popupView = CFRPopupFullScreenLayout("", anchor, mockk(), mockk()) {}
val popupView = CFRPopupFullscreenLayout("", anchor, mockk(), mockk()) {}
val result = popupView.createLayoutParams()