Loading mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/DynamicToolbarTest.kt +12 −32 Original line number Diff line number Diff line Loading @@ -585,14 +585,6 @@ class DynamicToolbarTest : BaseSessionTest() { @WithDisplay(height = SCREEN_HEIGHT, width = SCREEN_WIDTH) @Test fun zoomedOverflowHidden() { // Set ui.scrollbarFadeBeginDelay value to 0 to hide the overlayed scrollbars // immediately. sessionRule.setPrefsUntilTestEnd( mapOf( "ui.scrollbarFadeBeginDelay" to 0 ) ) val reference = getComparisonScreenshot(SCREEN_WIDTH, SCREEN_HEIGHT) val dynamicToolbarMaxHeight = SCREEN_HEIGHT / 2 Loading @@ -607,6 +599,9 @@ class DynamicToolbarTest : BaseSessionTest() { // Change the body background color to match the reference image's background color. mainSession.evaluateJS("document.body.style.background = 'rgb(0, 128, 0)'") // Hide the vertical scrollbar. mainSession.evaluateJS("document.documentElement.style.scrollbarWidth = 'none'") // Zoom in the content so that the content's visual viewport can be scrollable. mainSession.setResolutionAndScaleTo(10.0f) Loading @@ -623,14 +618,6 @@ class DynamicToolbarTest : BaseSessionTest() { @WithDisplay(height = SCREEN_HEIGHT, width = SCREEN_WIDTH) @Test fun zoomedPositionFixedRoot() { // Set ui.scrollbarFadeBeginDelay value to 0 to hide the overlayed scrollbars // immediately. sessionRule.setPrefsUntilTestEnd( mapOf( "ui.scrollbarFadeBeginDelay" to 0 ) ) val reference = getComparisonScreenshot(SCREEN_WIDTH, SCREEN_HEIGHT) val dynamicToolbarMaxHeight = SCREEN_HEIGHT / 2 Loading @@ -650,6 +637,9 @@ class DynamicToolbarTest : BaseSessionTest() { mainSession.evaluateJS("document.body.style.overflow = 'scroll'") mainSession.evaluateJS("document.documentElement.style.position = 'fixed'") // Hide the vertical scrollbar. mainSession.evaluateJS("document.documentElement.style.scrollbarWidth = 'none'") // Zoom in the content so that the content's visual viewport can be scrollable. mainSession.setResolutionAndScaleTo(10.0f) Loading @@ -666,14 +656,6 @@ class DynamicToolbarTest : BaseSessionTest() { @WithDisplay(height = SCREEN_HEIGHT, width = SCREEN_WIDTH) @Test fun backgroundImageFixed() { // Set ui.scrollbarFadeBeginDelay value to 0 to hide the overlayed scrollbars // immediately. sessionRule.setPrefsUntilTestEnd( mapOf( "ui.scrollbarFadeBeginDelay" to 0 ) ) val reference = getComparisonScreenshot(SCREEN_WIDTH, SCREEN_HEIGHT) val dynamicToolbarMaxHeight = SCREEN_HEIGHT / 2 Loading @@ -692,6 +674,9 @@ class DynamicToolbarTest : BaseSessionTest() { // Make the root element scrollable. mainSession.evaluateJS("document.documentElement.style.height = '100vh'") // Hide the vertical scrollbar. mainSession.evaluateJS("document.documentElement.style.scrollbarWidth = 'none'") mainSession.flushApzRepaints() // Simulate the dynamic toolbar being hidden by the scroll Loading @@ -707,14 +692,6 @@ class DynamicToolbarTest : BaseSessionTest() { @WithDisplay(height = SCREEN_HEIGHT, width = SCREEN_WIDTH) @Test fun backgroundAttachmentFixed() { // Set ui.scrollbarFadeBeginDelay value to 0 to hide the overlayed scrollbars // immediately. sessionRule.setPrefsUntilTestEnd( mapOf( "ui.scrollbarFadeBeginDelay" to 0 ) ) val reference = getComparisonScreenshot(SCREEN_WIDTH, SCREEN_HEIGHT) val dynamicToolbarMaxHeight = SCREEN_HEIGHT / 2 Loading @@ -733,6 +710,9 @@ class DynamicToolbarTest : BaseSessionTest() { // Make the root element scrollable. mainSession.evaluateJS("document.documentElement.style.height = '100vh'") // Hide the vertical scrollbar. mainSession.evaluateJS("document.documentElement.style.scrollbarWidth = 'none'") mainSession.flushApzRepaints() // Simulate the dynamic toolbar being hidden by the scroll Loading Loading
mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/DynamicToolbarTest.kt +12 −32 Original line number Diff line number Diff line Loading @@ -585,14 +585,6 @@ class DynamicToolbarTest : BaseSessionTest() { @WithDisplay(height = SCREEN_HEIGHT, width = SCREEN_WIDTH) @Test fun zoomedOverflowHidden() { // Set ui.scrollbarFadeBeginDelay value to 0 to hide the overlayed scrollbars // immediately. sessionRule.setPrefsUntilTestEnd( mapOf( "ui.scrollbarFadeBeginDelay" to 0 ) ) val reference = getComparisonScreenshot(SCREEN_WIDTH, SCREEN_HEIGHT) val dynamicToolbarMaxHeight = SCREEN_HEIGHT / 2 Loading @@ -607,6 +599,9 @@ class DynamicToolbarTest : BaseSessionTest() { // Change the body background color to match the reference image's background color. mainSession.evaluateJS("document.body.style.background = 'rgb(0, 128, 0)'") // Hide the vertical scrollbar. mainSession.evaluateJS("document.documentElement.style.scrollbarWidth = 'none'") // Zoom in the content so that the content's visual viewport can be scrollable. mainSession.setResolutionAndScaleTo(10.0f) Loading @@ -623,14 +618,6 @@ class DynamicToolbarTest : BaseSessionTest() { @WithDisplay(height = SCREEN_HEIGHT, width = SCREEN_WIDTH) @Test fun zoomedPositionFixedRoot() { // Set ui.scrollbarFadeBeginDelay value to 0 to hide the overlayed scrollbars // immediately. sessionRule.setPrefsUntilTestEnd( mapOf( "ui.scrollbarFadeBeginDelay" to 0 ) ) val reference = getComparisonScreenshot(SCREEN_WIDTH, SCREEN_HEIGHT) val dynamicToolbarMaxHeight = SCREEN_HEIGHT / 2 Loading @@ -650,6 +637,9 @@ class DynamicToolbarTest : BaseSessionTest() { mainSession.evaluateJS("document.body.style.overflow = 'scroll'") mainSession.evaluateJS("document.documentElement.style.position = 'fixed'") // Hide the vertical scrollbar. mainSession.evaluateJS("document.documentElement.style.scrollbarWidth = 'none'") // Zoom in the content so that the content's visual viewport can be scrollable. mainSession.setResolutionAndScaleTo(10.0f) Loading @@ -666,14 +656,6 @@ class DynamicToolbarTest : BaseSessionTest() { @WithDisplay(height = SCREEN_HEIGHT, width = SCREEN_WIDTH) @Test fun backgroundImageFixed() { // Set ui.scrollbarFadeBeginDelay value to 0 to hide the overlayed scrollbars // immediately. sessionRule.setPrefsUntilTestEnd( mapOf( "ui.scrollbarFadeBeginDelay" to 0 ) ) val reference = getComparisonScreenshot(SCREEN_WIDTH, SCREEN_HEIGHT) val dynamicToolbarMaxHeight = SCREEN_HEIGHT / 2 Loading @@ -692,6 +674,9 @@ class DynamicToolbarTest : BaseSessionTest() { // Make the root element scrollable. mainSession.evaluateJS("document.documentElement.style.height = '100vh'") // Hide the vertical scrollbar. mainSession.evaluateJS("document.documentElement.style.scrollbarWidth = 'none'") mainSession.flushApzRepaints() // Simulate the dynamic toolbar being hidden by the scroll Loading @@ -707,14 +692,6 @@ class DynamicToolbarTest : BaseSessionTest() { @WithDisplay(height = SCREEN_HEIGHT, width = SCREEN_WIDTH) @Test fun backgroundAttachmentFixed() { // Set ui.scrollbarFadeBeginDelay value to 0 to hide the overlayed scrollbars // immediately. sessionRule.setPrefsUntilTestEnd( mapOf( "ui.scrollbarFadeBeginDelay" to 0 ) ) val reference = getComparisonScreenshot(SCREEN_WIDTH, SCREEN_HEIGHT) val dynamicToolbarMaxHeight = SCREEN_HEIGHT / 2 Loading @@ -733,6 +710,9 @@ class DynamicToolbarTest : BaseSessionTest() { // Make the root element scrollable. mainSession.evaluateJS("document.documentElement.style.height = '100vh'") // Hide the vertical scrollbar. mainSession.evaluateJS("document.documentElement.style.scrollbarWidth = 'none'") mainSession.flushApzRepaints() // Simulate the dynamic toolbar being hidden by the scroll Loading