From fea611dcacd399cbad7317a5884e0997f3d31c44 Mon Sep 17 00:00:00 2001 From: Botond Ballo Date: Tue, 12 Jul 2022 06:49:11 +0000 Subject: [PATCH] Bug 1771822 - Do not explicitly set apz.allow_zooming in mochitests. r=tnikkel We can't do likewise for reftests and web platform tests because those test suites disable apz.allow_zooming by default on android. Differential Revision: https://phabricator.services.mozilla.com/D151576 --- dom/base/test/meta_viewport/viewport_helpers.js | 1 - ...t_viewport_metrics_on_landscape_content.html | 1 - gfx/layers/apz/test/mochitest/browser.ini | 2 -- .../mochitest/test_group_checkerboarding.html | 1 - .../test_group_minimum_scale_size.html | 3 --- .../mochitest/test_group_touchevents-4.html | 17 +++++------------ .../apz/test/mochitest/test_group_zoom-2.html | 3 --- .../apz/test/mochitest/test_group_zoom.html | 3 --- .../tests/browser_visual_viewport_iframe.js | 5 +---- .../tests/test_dynamic_toolbar_max_height.html | 1 - 10 files changed, 6 insertions(+), 31 deletions(-) diff --git a/dom/base/test/meta_viewport/viewport_helpers.js b/dom/base/test/meta_viewport/viewport_helpers.js index a89b4f16dca9..d4d346b5d0a6 100644 --- a/dom/base/test/meta_viewport/viewport_helpers.js +++ b/dom/base/test/meta_viewport/viewport_helpers.js @@ -2,7 +2,6 @@ function scaleRatio(scale) { return { set: [ ["layout.css.devPixelsPerPx", "" + scale], - ["apz.allow_zooming", true], ["dom.meta-viewport.enabled", true], ], }; diff --git a/dom/base/test/test_viewport_metrics_on_landscape_content.html b/dom/base/test/test_viewport_metrics_on_landscape_content.html index f3f5d928175f..ec3cfec4738c 100644 --- a/dom/base/test/test_viewport_metrics_on_landscape_content.html +++ b/dom/base/test/test_viewport_metrics_on_landscape_content.html @@ -10,7 +10,6 @@ SimpleTest.waitForExplicitFinish(); SpecialPowers.pushPrefEnv({ "set": [ - ["apz.allow_zooming", true], ["dom.meta-viewport.enabled", true], ] }, () => { diff --git a/gfx/layers/apz/test/mochitest/browser.ini b/gfx/layers/apz/test/mochitest/browser.ini index 50f440ca1eee..2d830e49f40a 100644 --- a/gfx/layers/apz/test/mochitest/browser.ini +++ b/gfx/layers/apz/test/mochitest/browser.ini @@ -1,6 +1,4 @@ [DEFAULT] -prefs = - apz.allow_zooming=true support-files = apz_test_native_event_utils.js apz_test_utils.js diff --git a/gfx/layers/apz/test/mochitest/test_group_checkerboarding.html b/gfx/layers/apz/test/mochitest/test_group_checkerboarding.html index da859aeaf629..edbf7f6469ea 100644 --- a/gfx/layers/apz/test/mochitest/test_group_checkerboarding.html +++ b/gfx/layers/apz/test/mochitest/test_group_checkerboarding.html @@ -27,7 +27,6 @@ var zoom_and_pan_prefs = [ ...prefs, ...getPrefs("TOUCH_EVENTS:PAN"), - ["apz.allow_zooming", true], ]; var no_multiplier_prefs = [ diff --git a/gfx/layers/apz/test/mochitest/test_group_minimum_scale_size.html b/gfx/layers/apz/test/mochitest/test_group_minimum_scale_size.html index 577d273f378c..2de924d6bd67 100644 --- a/gfx/layers/apz/test/mochitest/test_group_minimum_scale_size.html +++ b/gfx/layers/apz/test/mochitest/test_group_minimum_scale_size.html @@ -21,9 +21,6 @@ const prefs = [ // test takes too long the displayport can expire before we read the value // out of the test. So we disable displayport expiry for these tests. ["apz.displayport_expiry_ms", 0], - // Explicitly enable pinch-zooming, so this test can run on desktop - // even though zooming isn't enabled by default on desktop yet. - ["apz.allow_zooming", true], // Similarly, explicitly enable support for meta viewport tags (which the // test cases use) so they're processed even on desktop. ["dom.meta-viewport.enabled", true], diff --git a/gfx/layers/apz/test/mochitest/test_group_touchevents-4.html b/gfx/layers/apz/test/mochitest/test_group_touchevents-4.html index 0050afe1a87e..266fc72ee8b1 100644 --- a/gfx/layers/apz/test/mochitest/test_group_touchevents-4.html +++ b/gfx/layers/apz/test/mochitest/test_group_touchevents-4.html @@ -15,20 +15,13 @@ var subtests = [ // clicking on element with :active::after CSS property {"file": "helper_bug1473108.html"}, // Resetting isFirstPaint shouldn't clobber the visual viewport - {"file": "helper_bug1509575.html", "prefs": [ - ["apz.allow_zooming", true], - ...getPrefs("TOUCH_EVENTS:PAN") - ]}, + {"file": "helper_bug1509575.html", "prefs": getPrefs("TOUCH_EVENTS:PAN")}, // Exercise one of the main-thread touch-action determination codepaths. {"file": "helper_bug1506497_touch_action_fixed_on_fixed.html", "prefs": touch_action_prefs}, - {"file": "helper_bug1637113_main_thread_hit_test.html", - "prefs": [["apz.allow_zooming", true]]}, - {"file": "helper_bug1638458_contextmenu.html", - "prefs": [["apz.allow_zooming", true]]}, - {"file": "helper_bug1638441_fixed_pos_hit_test.html", - "prefs": [["apz.allow_zooming", true]]}, - {"file": "helper_bug1637135_narrow_viewport.html", "prefs": [["apz.allow_zooming", true], - ["dom.meta-viewport.enabled", true]]}, + {"file": "helper_bug1637113_main_thread_hit_test.html"}, + {"file": "helper_bug1638458_contextmenu.html"}, + {"file": "helper_bug1638441_fixed_pos_hit_test.html"}, + {"file": "helper_bug1637135_narrow_viewport.html", "prefs": [["dom.meta-viewport.enabled", true]]}, {"file": "helper_bug1714934_mouseevent_buttons.html"}, // Add new subtests here. If this starts timing out because it's taking too diff --git a/gfx/layers/apz/test/mochitest/test_group_zoom-2.html b/gfx/layers/apz/test/mochitest/test_group_zoom-2.html index 0c10dde2bf22..f9342f5983e7 100644 --- a/gfx/layers/apz/test/mochitest/test_group_zoom-2.html +++ b/gfx/layers/apz/test/mochitest/test_group_zoom-2.html @@ -24,9 +24,6 @@ var prefs = [ // test takes too long the displayport can expire before we read the value // out of the test. So we disable displayport expiry for these tests. ["apz.displayport_expiry_ms", 0], - // Explicitly enable pinch-zooming, so this test can run on desktop - // even though zooming isn't enabled by default on desktop yet. - ["apz.allow_zooming", true], // Increase the content response timeout because some tests do preventDefault // and we want to make sure APZ actually waits for them. ["apz.content_response_timeout", 60000], diff --git a/gfx/layers/apz/test/mochitest/test_group_zoom.html b/gfx/layers/apz/test/mochitest/test_group_zoom.html index bd93619f91d9..03f9bbebf80b 100644 --- a/gfx/layers/apz/test/mochitest/test_group_zoom.html +++ b/gfx/layers/apz/test/mochitest/test_group_zoom.html @@ -23,9 +23,6 @@ var prefs = [ // test takes too long the displayport can expire before we read the value // out of the test. So we disable displayport expiry for these tests. ["apz.displayport_expiry_ms", 0], - // Explicitly enable pinch-zooming, so this test can run on desktop - // even though zooming isn't enabled by default on desktop yet. - ["apz.allow_zooming", true], // Increase the content response timeout because some tests do preventDefault // and we want to make sure APZ actually waits for them. ["apz.content_response_timeout", 60000], diff --git a/layout/base/tests/browser_visual_viewport_iframe.js b/layout/base/tests/browser_visual_viewport_iframe.js index 007141f220c2..849ab53caaaf 100644 --- a/layout/base/tests/browser_visual_viewport_iframe.js +++ b/layout/base/tests/browser_visual_viewport_iframe.js @@ -10,10 +10,7 @@ add_task(async () => { } await SpecialPowers.pushPrefEnv({ - set: [ - ["apz.allow_zooming", true], - ["dom.meta-viewport.enabled", true], - ], + set: [["dom.meta-viewport.enabled", true]], }); const fissionWindow = await BrowserTestUtils.openNewBrowserWindow({ diff --git a/layout/base/tests/test_dynamic_toolbar_max_height.html b/layout/base/tests/test_dynamic_toolbar_max_height.html index 7ee0f5163c3a..abf0c34e8ea8 100644 --- a/layout/base/tests/test_dynamic_toolbar_max_height.html +++ b/layout/base/tests/test_dynamic_toolbar_max_height.html @@ -10,7 +10,6 @@ SpecialPowers.pushPrefEnv( { set: [ ["dom.meta-viewport.enabled", true], - ["apz.allow_zooming", true], ], }, function() {