Bug 1605342 - Let RDM's metaviewport handling ride the trains r=bradwerth

After the gradual rollout of the feature in 72, we can turn it on for all users

Differential Revision: https://phabricator.services.mozilla.com/D58943

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Patrick Brosset 2020-01-07 22:01:56 +00:00
parent 15e30b89a5
commit bc984989e9
9 changed files with 3 additions and 43 deletions

View File

@ -2238,14 +2238,7 @@ pref("devtools.responsive.reloadNotification.enabled", true);
pref("devtools.responsive.touchSimulation.enabled", false);
// Whether or not meta viewport is enabled, if and only if touchSimulation
// is also enabled.
// For now this is only available in nightly, dev-edition and early betas. It is planned
// to be gradually rolled out with release 72. Starting with 73, this pref needs to be set
// to true on all channels.
#if defined(EARLY_BETA_OR_EARLIER) || defined(MOZ_DEV_EDITION)
pref("devtools.responsive.metaViewport.enabled", true);
#else
pref("devtools.responsive.metaViewport.enabled", false);
#endif
pref("devtools.responsive.metaViewport.enabled", true);
// The user agent of the viewport.
pref("devtools.responsive.userAgent", "");
// Whether or not the RDM UI is embedded in the browser.

View File

@ -10,8 +10,6 @@ const TEST_URL =
addRDMTask(
TEST_URL,
async function({ ui, manager }) {
await pushPref("devtools.responsive.metaViewport.enabled", true);
ok(ui, "An instance of the RDM should be attached to the tab.");
await setViewportSizeAndAwaitReflow(ui, manager, 110, 500);

View File

@ -16,10 +16,6 @@ const TEST_URL =
'<div style="background:blue; width:200px; height:200px"></div>';
addRDMTask(TEST_URL, async function({ ui, manager }) {
await SpecialPowers.pushPrefEnv({
set: [["devtools.responsive.metaViewport.enabled", true]],
});
// Wait until the viewport has been added and the device list has been loaded
const { store } = ui.toolWindow;
await waitUntilState(

View File

@ -14,11 +14,6 @@ const TEST_URL =
"</body>";
addRDMTask(TEST_URL, async function({ ui, manager }) {
// Turn on the pref that allows meta viewport support.
await SpecialPowers.pushPrefEnv({
set: [["devtools.responsive.metaViewport.enabled", true]],
});
const store = ui.toolWindow.store;
// Wait until the viewport has been added.

View File

@ -10,11 +10,6 @@ const TEST_URL =
'<head><meta name="viewport" content="width=300"/></head>' +
"<body>meta viewport width 300</body>";
addRDMTask(TEST_URL, async function({ ui, manager }) {
// Turn on the pref that allows meta viewport support.
await SpecialPowers.pushPrefEnv({
set: [["devtools.responsive.metaViewport.enabled", true]],
});
const store = ui.toolWindow.store;
// Wait until the viewport has been added.

View File

@ -11,11 +11,6 @@ const TEST_URL =
'initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"></head>' +
"<body>meta viewport scaled locked at 1.0</body>";
addRDMTask(TEST_URL, async function({ ui, manager }) {
// Turn on the pref that allows meta viewport support.
await SpecialPowers.pushPrefEnv({
set: [["devtools.responsive.metaViewport.enabled", true]],
});
const store = ui.toolWindow.store;
// Wait until the viewport has been added.

View File

@ -12,11 +12,6 @@ const TEST_URL =
'<div style="width:100%;background-color:green">test</div>' +
"</body>";
addRDMTask(TEST_URL, async function({ ui, manager }) {
// Turn on the pref that allows meta viewport support.
await SpecialPowers.pushPrefEnv({
set: [["devtools.responsive.metaViewport.enabled", true]],
});
const store = ui.toolWindow.store;
// Wait until the viewport has been added.

View File

@ -49,12 +49,10 @@ const TEST_URL =
'<body><div style="background:orange; width:1000px; height:1000px"></div></body>';
addRDMTask(TEST_URL, async function({ ui, manager }) {
// Turn on the prefs that allow meta viewport support, and force overlay
// scrollbars to always be visible, and to allow data URIs to be considered
// as same-origin.
// Turn on the prefs that force overlay scrollbars to always be visible, and to allow
// data URIs to be considered as same-origin.
await SpecialPowers.pushPrefEnv({
set: [
["devtools.responsive.metaViewport.enabled", true],
["layout.testing.overlay-scrollbars.always-visible", true],
["security.data_uri.unique_opaque_origin", false],
],

View File

@ -50,11 +50,6 @@ for (const { content, res_target } of TESTS) {
`Using meta viewport content "${content}" with new RDM UI ${usingBrowserUI}.`
);
// Turn on the pref that allows meta viewport support.
await SpecialPowers.pushPrefEnv({
set: [["devtools.responsive.metaViewport.enabled", true]],
});
await setViewportSize(ui, manager, WIDTH, HEIGHT);
await setTouchAndMetaViewportSupport(ui, true);