Backed out changeset 2c1dd534e937 (bug 1603673) for geckoview failures on webAppManifestPref. CLOSED TREE
authorNarcis Beleuzu <nbeleuzu@mozilla.com>
Thu, 27 Feb 2020 08:50:39 +0200
changeset 515840 9e8d5431c4121a4bd70d440c98b50444aee60dd9
parent 515839 2c1dd534e937c92b4c5965892212d52d9b8a58f8
child 515841 cd3fa71346c78a3ffafa0b25f3a6cfcf28914dfc
child 515842 ca95fa846eadccad5dec697aab2140bf2e73ec61
push id37162
push usernbeleuzu@mozilla.com
push dateThu, 27 Feb 2020 09:49:56 +0000
treeherdermozilla-central@9e8d5431c412 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1603673
milestone75.0a1
backs out2c1dd534e937c92b4c5965892212d52d9b8a58f8
first release with
nightly linux32
9e8d5431c412 / 75.0a1 / 20200227094956 / files
nightly linux64
9e8d5431c412 / 75.0a1 / 20200227094956 / files
nightly mac
9e8d5431c412 / 75.0a1 / 20200227094956 / files
nightly win32
9e8d5431c412 / 75.0a1 / 20200227094956 / files
nightly win64
9e8d5431c412 / 75.0a1 / 20200227094956 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 2c1dd534e937 (bug 1603673) for geckoview failures on webAppManifestPref. CLOSED TREE
browser/components/ssb/tests/browser/browser.ini
devtools/client/application/test/browser/head.js
devtools/server/tests/browser/browser_application_manifest.js
dom/manifest/ManifestObtainer.jsm
dom/manifest/test/browser_ManifestIcons_browserFetchIcon.js
dom/manifest/test/browser_ManifestObtainer_credentials.js
dom/manifest/test/browser_ManifestObtainer_obtain.js
dom/security/test/csp/browser_manifest-src-override-default-src.js
dom/security/test/csp/browser_test_web_manifest.js
mobile/android/geckoview/api.txt
mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/ContentDelegateTest.kt
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/doc-files/CHANGELOG.md
--- a/browser/components/ssb/tests/browser/browser.ini
+++ b/browser/components/ssb/tests/browser/browser.ini
@@ -1,15 +1,14 @@
 [DEFAULT]
 support-files =
   head.js
   test_page.html
   empty_page.html
 prefs =
-  dom.manfiest.enabled=true
   browser.ssb.enabled=true
   browser.ssb.osintegration=false
 
 [browser_ssb_direct.js]
 [browser_ssb_lasttab.js]
 [browser_ssb_list_menu.js]
 [browser_ssb_manifest_scope.js]
 support-files =
--- a/devtools/client/application/test/browser/head.js
+++ b/devtools/client/application/test/browser/head.js
@@ -39,19 +39,16 @@ async function enableApplicationPanel() 
   );
   PromiseTestUtils.whitelistRejectionsGlobally(
     /this._frontCreationListeners is null/
   );
 
   // Enable all preferences related to service worker debugging.
   await enableServiceWorkerDebugging();
 
-  // Enable web manifest processing.
-  Services.prefs.setBoolPref("dom.manifest.enabled", true);
-
   // Enable application panel in DevTools.
   await pushPref("devtools.application.enabled", true);
 }
 
 function getWorkerContainers(doc) {
   return doc.querySelectorAll(".js-sw-container");
 }
 
--- a/devtools/server/tests/browser/browser_application_manifest.js
+++ b/devtools/server/tests/browser/browser_application_manifest.js
@@ -1,16 +1,13 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
-// Enable web manifest processing.
-Services.prefs.setBoolPref("dom.manifest.enabled", true);
-
 add_task(async function() {
   info("Testing fetching a valid manifest");
   const response = await fetchManifest("application-manifest-basic.html");
 
   ok(
     response.manifest && response.manifest.name == "FooApp",
     "Returns an object populated with the manifest data"
   );
--- a/dom/manifest/ManifestObtainer.jsm
+++ b/dom/manifest/ManifestObtainer.jsm
@@ -20,18 +20,16 @@
  *   dom/ipc/manifestMessages.js
  *
  * Which is injected into every browser instance via browser.js.
  *
  * exported ManifestObtainer
  */
 "use strict";
 
-const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
-
 const { PromiseMessage } = ChromeUtils.import(
   "resource://gre/modules/PromiseMessage.jsm"
 );
 const { ManifestProcessor } = ChromeUtils.import(
   "resource://gre/modules/ManifestProcessor.jsm"
 );
 
 var ManifestObtainer = {
@@ -69,21 +67,16 @@ var ManifestObtainer = {
    * @param {Boolean} aOptions.checkConformance If spec conformance messages should be collected.
    *                                            Adds proprietary moz_* members to manifest.
    * @return {Promise<Object>} The processed manifest.
    */
   async contentObtainManifest(
     aContent,
     aOptions = { checkConformance: false }
   ) {
-    if (!Services.prefs.getBoolPref("dom.manifest.enabled")) {
-      throw new Error(
-        "Obtaining manifest is disabled by pref: dom.manifest.enabled"
-      );
-    }
     if (!aContent || isXULBrowser(aContent)) {
       const err = new TypeError("Invalid input. Expected a DOM Window.");
       return Promise.reject(err);
     }
     const response = await fetchManifest(aContent);
     const result = await processResponse(response, aContent, aOptions);
     const clone = Cu.cloneInto(result, aContent);
     return clone;
--- a/dom/manifest/test/browser_ManifestIcons_browserFetchIcon.js
+++ b/dom/manifest/test/browser_ManifestIcons_browserFetchIcon.js
@@ -1,14 +1,11 @@
 // Used by JSHint:
 /* global Cu, BrowserTestUtils, ok, add_task, gBrowser */
 "use strict";
-
-Services.prefs.setBoolPref("dom.manifest.enabled", true);
-
 const { ManifestIcons } = ChromeUtils.import(
   "resource://gre/modules/ManifestIcons.jsm"
 );
 const { ManifestObtainer } = ChromeUtils.import(
   "resource://gre/modules/ManifestObtainer.jsm"
 );
 
 const defaultURL = new URL(
--- a/dom/manifest/test/browser_ManifestObtainer_credentials.js
+++ b/dom/manifest/test/browser_ManifestObtainer_credentials.js
@@ -1,14 +1,11 @@
 // Used by JSHint:
 /* global ok, is, Cu, BrowserTestUtils, add_task, gBrowser, makeTestURL, requestLongerTimeout*/
 "use strict";
-
-Services.prefs.setBoolPref("dom.manifest.enabled", true);
-
 const { ManifestObtainer } = ChromeUtils.import(
   "resource://gre/modules/ManifestObtainer.jsm"
 );
 
 // Don't send cookies
 add_task(async function() {
   const testPath = "/browser/dom/manifest/test/cookie_setter.html";
   const tabURL = `http://example.com:80${testPath}`;
--- a/dom/manifest/test/browser_ManifestObtainer_obtain.js
+++ b/dom/manifest/test/browser_ManifestObtainer_obtain.js
@@ -1,14 +1,12 @@
 // Used by JSHint:
 /* global ok, is, Cu, BrowserTestUtils, add_task, gBrowser, requestLongerTimeout*/
 "use strict";
 
-Services.prefs.setBoolPref("dom.manifest.enabled", true);
-
 const { ManifestObtainer } = ChromeUtils.import(
   "resource://gre/modules/ManifestObtainer.jsm"
 );
 const remoteURL =
   "http://mochi.test:8888/browser/dom/manifest/test/resource.sjs";
 const defaultURL = new URL(
   "http://example.org/browser/dom/manifest/test/resource.sjs"
 );
--- a/dom/security/test/csp/browser_manifest-src-override-default-src.js
+++ b/dom/security/test/csp/browser_manifest-src-override-default-src.js
@@ -8,20 +8,16 @@ const { ManifestObtainer } = ChromeUtils
   "resource://gre/modules/ManifestObtainer.jsm"
 );
 const path = "/tests/dom/security/test/csp/";
 const testFile = `${path}file_web_manifest.html`;
 const mixedContentFile = `${path}file_web_manifest_mixed_content.html`;
 const server = `${path}file_testserver.sjs`;
 const defaultURL = new URL(`http://example.org${server}`);
 const mixedURL = new URL(`http://mochi.test:8888${server}`);
-
-// Enable web manifest processing.
-Services.prefs.setBoolPref("dom.manifest.enabled", true);
-
 const tests = [
   // Check interaction with default-src and another origin,
   // CSP allows fetching from example.org, so manifest should load.
   {
     expected: `CSP manifest-src overrides default-src of elsewhere.com`,
     get tabURL() {
       const url = new URL(defaultURL);
       url.searchParams.append("file", testFile);
--- a/dom/security/test/csp/browser_test_web_manifest.js
+++ b/dom/security/test/csp/browser_test_web_manifest.js
@@ -12,20 +12,16 @@ const { ManifestObtainer } = ChromeUtils
 );
 const path = "/tests/dom/security/test/csp/";
 const testFile = `${path}file_web_manifest.html`;
 const remoteFile = `${path}file_web_manifest_remote.html`;
 const httpsManifest = `${path}file_web_manifest_https.html`;
 const server = `${path}file_testserver.sjs`;
 const defaultURL = new URL(`http://example.org${server}`);
 const secureURL = new URL(`https://example.com:443${server}`);
-
-// Enable web manifest processing.
-Services.prefs.setBoolPref("dom.manifest.enabled", true);
-
 const tests = [
   // CSP block everything, so trying to load a manifest
   // will result in a policy violation.
   {
     expected: "default-src 'none' blocks fetching manifest.",
     get tabURL() {
       const url = new URL(defaultURL);
       url.searchParams.append("file", testFile);
--- a/mobile/android/geckoview/api.txt
+++ b/mobile/android/geckoview/api.txt
@@ -516,32 +516,30 @@ package org.mozilla.geckoview {
     method public int getPreferredColorScheme();
     method public boolean getRemoteDebuggingEnabled();
     method @Nullable public GeckoRuntime getRuntime();
     method @Nullable public Rect getScreenSizeOverride();
     method @Nullable public RuntimeTelemetry.Delegate getTelemetryDelegate();
     method public boolean getUseMaxScreenDepth();
     method public boolean getUseMultiprocess();
     method public boolean getWebFontsEnabled();
-    method public boolean getWebManifestEnabled();
     method @NonNull public GeckoRuntimeSettings setAboutConfigEnabled(boolean);
     method @NonNull public GeckoRuntimeSettings setAutomaticFontSizeAdjustment(boolean);
     method @NonNull public GeckoRuntimeSettings setConsoleOutputEnabled(boolean);
     method @NonNull public GeckoRuntimeSettings setDoubleTapZoomingEnabled(boolean);
     method @NonNull public GeckoRuntimeSettings setFontInflationEnabled(boolean);
     method @NonNull public GeckoRuntimeSettings setFontSizeFactor(float);
     method @NonNull public GeckoRuntimeSettings setForceUserScalableEnabled(boolean);
     method @NonNull public GeckoRuntimeSettings setGlMsaaLevel(int);
     method @NonNull public GeckoRuntimeSettings setInputAutoZoomEnabled(boolean);
     method @NonNull public GeckoRuntimeSettings setJavaScriptEnabled(boolean);
     method public void setLocales(@Nullable String[]);
     method @NonNull public GeckoRuntimeSettings setPreferredColorScheme(int);
     method @NonNull public GeckoRuntimeSettings setRemoteDebuggingEnabled(boolean);
     method @NonNull public GeckoRuntimeSettings setWebFontsEnabled(boolean);
-    method @NonNull public GeckoRuntimeSettings setWebManifestEnabled(boolean);
     field public static final int COLOR_SCHEME_DARK = 1;
     field public static final int COLOR_SCHEME_LIGHT = 0;
     field public static final int COLOR_SCHEME_SYSTEM = -1;
     field public static final Parcelable.Creator<GeckoRuntimeSettings> CREATOR;
   }
 
   @AnyThread public static final class GeckoRuntimeSettings.Builder extends RuntimeSettings.Builder {
     ctor public Builder();
@@ -567,17 +565,16 @@ package org.mozilla.geckoview {
     method @NonNull public GeckoRuntimeSettings.Builder pauseForDebugger(boolean);
     method @NonNull public GeckoRuntimeSettings.Builder preferredColorScheme(int);
     method @NonNull public GeckoRuntimeSettings.Builder remoteDebuggingEnabled(boolean);
     method @NonNull public GeckoRuntimeSettings.Builder screenSizeOverride(int, int);
     method @NonNull public GeckoRuntimeSettings.Builder telemetryDelegate(@NonNull RuntimeTelemetry.Delegate);
     method @NonNull public GeckoRuntimeSettings.Builder useMaxScreenDepth(boolean);
     method @NonNull public GeckoRuntimeSettings.Builder useMultiprocess(boolean);
     method @NonNull public GeckoRuntimeSettings.Builder webFontsEnabled(boolean);
-    method @NonNull public GeckoRuntimeSettings.Builder webManifest(boolean);
     method @NonNull protected GeckoRuntimeSettings newSettings(@Nullable GeckoRuntimeSettings);
   }
 
   public class GeckoSession implements Parcelable {
     ctor public GeckoSession();
     ctor public GeckoSession(@Nullable GeckoSessionSettings);
     method @UiThread @NonNull public GeckoDisplay acquireDisplay();
     method @UiThread public void autofill(@NonNull SparseArray<CharSequence>);
--- a/mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/ContentDelegateTest.kt
+++ b/mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/ContentDelegateTest.kt
@@ -291,36 +291,16 @@ class ContentDelegateTest : BaseSessionT
         mainSession.loadTestPath(HELLO_HTML_PATH)
         sessionRule.waitUntilCalled(object : Callbacks.ContentDelegate {
             @AssertCalled(count = 1)
             override fun onFirstContentfulPaint(session: GeckoSession) {
             }
         })
     }
 
-    @Test fun webAppManifestPref() {
-        val initialState = sessionRule.runtime.settings.getWebManifestEnabled()
-        val jsToRun = "document.querySelector('link[rel=manifest]').relList.supports('manifest');"
-
-        // Check pref'ed off
-        sessionRule.runtime.settings.setWebManifestEnabled(false)
-        mainSession.loadTestPath(HELLO_HTML_PATH)
-        var result = equalTo(mainSession.evaluateJS(jsToRun) as Boolean)
-
-        assertThat("Disabling pref makes relList.supports('manifest') return false", false, result)
-
-        // Check pref'ed on
-        sessionRule.runtime.settings.setWebManifestEnabled(true)
-        mainSession.loadTestPath(HELLO_HTML_PATH)
-        result = equalTo(mainSession.evaluateJS(jsToRun) as Boolean)
-        assertThat("Enabling pref makes relList.supports('manifest') return true", true, result)
-
-        sessionRule.runtime.settings.setWebManifestEnabled(initialState)
-    }
-
     @Test fun webAppManifest() {
         mainSession.loadTestPath(HELLO_HTML_PATH)
         mainSession.waitUntilCalled(object : Callbacks.All {
             @AssertCalled(count = 1)
             override fun onPageStop(session: GeckoSession, success: Boolean) {
                 assertThat("Page load should succeed", success, equalTo(true))
             }
 
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java
@@ -152,32 +152,16 @@ public final class GeckoRuntimeSettings 
          * @return This Builder.
          */
         public @NonNull Builder useMaxScreenDepth(final boolean enable) {
             getSettings().mUseMaxScreenDepth = enable;
             return this;
         }
 
         /**
-         * Set whether web manifest support is enabled.
-         *
-         * This controls if Gecko actually downloads, or "obtains", web
-         * manifests and processes them. Without setting this pref, trying
-         * to obtain a manifest throws.
-         *
-         * @param enabled A flag determining whether Web Manifest processing support is
-         *                enabled.
-         * @return The builder instance.
-         */
-        public @NonNull Builder webManifest(final boolean enabled) {
-            getSettings().mWebManifest.set(enabled);
-            return this;
-        }
-
-        /**
          * Set whether or not web console messages should go to logcat.
          *
          * Note: If enabled, Gecko performance may be negatively impacted if
          * content makes heavy use of the console API.
          *
          * @param enabled A flag determining whether or not web console messages should be
          *                printed to logcat.
          * @return The builder instance.
@@ -442,18 +426,16 @@ public final class GeckoRuntimeSettings 
     /* package */ String mConfigFilePath;
 
     /* package */ ContentBlocking.Settings mContentBlocking;
 
     public @NonNull ContentBlocking.Settings getContentBlocking() {
         return mContentBlocking;
     }
 
-    /* package */ final Pref<Boolean> mWebManifest = new Pref<Boolean>(
-        "dom.manifest.enabled", true);
     /* package */ final Pref<Boolean> mJavaScript = new Pref<Boolean>(
         "javascript.enabled", true);
     /* package */ final Pref<Boolean> mRemoteDebugging = new Pref<Boolean>(
         "devtools.debugger.remote-enabled", false);
     /* package */ final Pref<Integer> mWebFonts = new Pref<Integer>(
         "browser.display.use_document_fonts", 1);
     /* package */ final Pref<Boolean> mConsoleOutput = new Pref<Boolean>(
         "geckoview.console.enabled", false);
@@ -786,38 +768,16 @@ public final class GeckoRuntimeSettings 
         if (!TextUtils.isEmpty(variant)) {
             out.append('-').append(variant);
         }
         // e.g. "en", "en-US", or "en-US-POSIX".
         return out.toString();
     }
 
     /**
-     * Sets whether Web Manifest processing support is enabled.
-     *
-     * @param enabled A flag determining whether Web Manifest processing support is
-     *                enabled.
-     *
-     * @return This GeckoRuntimeSettings instance.
-     */
-    public @NonNull GeckoRuntimeSettings setWebManifestEnabled(final boolean enabled) {
-        mWebManifest.commit(enabled);
-        return this;
-    }
-
-    /**
-     * Get whether or not Web Manifest processing support is enabled.
-     *
-     * @return True if web manifest processing support is enabled.
-     */
-    public boolean getWebManifestEnabled() {
-        return mWebManifest.get();
-    }
-
-    /**
      * Set whether or not web console messages should go to logcat.
      *
      * Note: If enabled, Gecko performance may be negatively impacted if
      * content makes heavy use of the console API.
      *
      * @param enabled A flag determining whether or not web console messages should be
      *                printed to logcat.
      * @return This GeckoRuntimeSettings instance.
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/doc-files/CHANGELOG.md
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/doc-files/CHANGELOG.md
@@ -23,27 +23,20 @@ exclude: true
 - Added [`DebuggerDelegate#onExtensionListUpdated`][75.2] to notify that a temporary
   extension has been installed by the debugger.
   ([bug 1614295]({{bugzilla}}1614295))
 - ⚠️ Removed [`GeckoRuntimeSettings.setAutoplayDefault`][75.3], use
   [`GeckoSession.PermissionDelegate#PERMISSION_AUTOPLAY_AUDIBLE`][73.12] and
   [`GeckoSession.PermissionDelegate#PERMISSION_AUTOPLAY_INAUDIBLE`][73.13] to
   control autoplay.
   ([bug 1614894]({{bugzilla}}1614894))
-- Added [`GeckoRuntimeSettings.setWebManifestEnabled`][75.4],
-  [`GeckoRuntimeSettings.webManifest`][75.5], and
-  [`GeckoRuntimeSettings.getWebManifestEnabled`][75.6]
-  ([bug 1614894]({{bugzilla}}1603673)), to enable or check Web Manifest support.
 
 [75.1]: {{javadoc_uri}}/GeckoRuntimeSettings.Builder.html#useMultiprocess-boolean-
 [75.2]: {{javadoc_uri}}/WebExtensionController.DebuggerDelegate.html#onExtensionListUpdated--
 [75.3]: {{javadoc_uri}}/GeckoRuntimeSettings.Builder.html#autoplayDefault-boolean-
-[75.4]: {{javadoc_uri}}/GeckoRuntimeSettings.Builder.html#setWebManifestEnabled-boolean-
-[75.5]: {{javadoc_uri}}/GeckoRuntimeSettings.Builder.html#webManifest-boolean-
-[75.6]: {{javadoc_uri}}/GeckoRuntimeSettings.Builder.html#getWebManifestEnabled--
 
 ## v74
 - Added [`WebExtensionController.enable`][74.1] and [`disable`][74.2] to
   enable and disable extensions.
   ([bug 1599585]({{bugzilla}}1599585))
 - ⚠️ Added ['GeckoSession.ProgressDelegate.SecurityInformation#certificate'][74.3], which is the
   full server certificate in use, if any. The other certificate-related fields were removed.
   ([bug 1508730]({{bugzilla}}1508730))
@@ -597,9 +590,9 @@ exclude: true
 [65.19]: {{javadoc_uri}}/GeckoSession.NavigationDelegate.LoadRequest.html#isRedirect
 [65.20]: {{javadoc_uri}}/GeckoSession.html#LOAD_FLAGS_BYPASS_CLASSIFIER
 [65.21]: {{javadoc_uri}}/GeckoSession.ContentDelegate.ContextElement.html
 [65.22]: {{javadoc_uri}}/GeckoSession.ContentDelegate.html#onContextMenu-org.mozilla.geckoview.GeckoSession-int-int-org.mozilla.geckoview.GeckoSession.ContentDelegate.ContextElement-
 [65.23]: {{javadoc_uri}}/GeckoSession.FinderResult.html
 [65.24]: {{javadoc_uri}}/CrashReporter.html#sendCrashReport-android.content.Context-android.os.Bundle-java.lang.String-
 [65.25]: {{javadoc_uri}}/GeckoResult.html
 
-[api-version]: 82255b8fdbc57e73920690426bdb4dd261cfe4ff
+[api-version]: 898e8783e858824b7af7e4e9763bf5aaa54c0b0c