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
Родитель 15e30b89a5
Коммит bc984989e9
9 изменённых файлов: 3 добавлений и 43 удалений

Просмотреть файл

@ -2238,14 +2238,7 @@ pref("devtools.responsive.reloadNotification.enabled", true);
pref("devtools.responsive.touchSimulation.enabled", false); pref("devtools.responsive.touchSimulation.enabled", false);
// Whether or not meta viewport is enabled, if and only if touchSimulation // Whether or not meta viewport is enabled, if and only if touchSimulation
// is also enabled. // is also enabled.
// For now this is only available in nightly, dev-edition and early betas. It is planned pref("devtools.responsive.metaViewport.enabled", true);
// 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
// The user agent of the viewport. // The user agent of the viewport.
pref("devtools.responsive.userAgent", ""); pref("devtools.responsive.userAgent", "");
// Whether or not the RDM UI is embedded in the browser. // Whether or not the RDM UI is embedded in the browser.

Просмотреть файл

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

Просмотреть файл

@ -16,10 +16,6 @@ const TEST_URL =
'<div style="background:blue; width:200px; height:200px"></div>'; '<div style="background:blue; width:200px; height:200px"></div>';
addRDMTask(TEST_URL, async function({ ui, manager }) { 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 // Wait until the viewport has been added and the device list has been loaded
const { store } = ui.toolWindow; const { store } = ui.toolWindow;
await waitUntilState( await waitUntilState(

Просмотреть файл

@ -14,11 +14,6 @@ const TEST_URL =
"</body>"; "</body>";
addRDMTask(TEST_URL, async function({ ui, manager }) { 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; const store = ui.toolWindow.store;
// Wait until the viewport has been added. // Wait until the viewport has been added.

Просмотреть файл

@ -10,11 +10,6 @@ const TEST_URL =
'<head><meta name="viewport" content="width=300"/></head>' + '<head><meta name="viewport" content="width=300"/></head>' +
"<body>meta viewport width 300</body>"; "<body>meta viewport width 300</body>";
addRDMTask(TEST_URL, async function({ ui, manager }) { 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; const store = ui.toolWindow.store;
// Wait until the viewport has been added. // Wait until the viewport has been added.

Просмотреть файл

@ -11,11 +11,6 @@ const TEST_URL =
'initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"></head>' + 'initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"></head>' +
"<body>meta viewport scaled locked at 1.0</body>"; "<body>meta viewport scaled locked at 1.0</body>";
addRDMTask(TEST_URL, async function({ ui, manager }) { 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; const store = ui.toolWindow.store;
// Wait until the viewport has been added. // Wait until the viewport has been added.

Просмотреть файл

@ -12,11 +12,6 @@ const TEST_URL =
'<div style="width:100%;background-color:green">test</div>' + '<div style="width:100%;background-color:green">test</div>' +
"</body>"; "</body>";
addRDMTask(TEST_URL, async function({ ui, manager }) { 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; const store = ui.toolWindow.store;
// Wait until the viewport has been added. // Wait until the viewport has been added.

Просмотреть файл

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

Просмотреть файл

@ -50,11 +50,6 @@ for (const { content, res_target } of TESTS) {
`Using meta viewport content "${content}" with new RDM UI ${usingBrowserUI}.` `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 setViewportSize(ui, manager, WIDTH, HEIGHT);
await setTouchAndMetaViewportSupport(ui, true); await setTouchAndMetaViewportSupport(ui, true);