Merge inbound to mozilla-central. a=merge
authorCsoregi Natalia <ncsoregi@mozilla.com>
Sat, 27 Oct 2018 12:48:40 +0300
changeset 499682 7007206a3cd4
parent 499674 49d47a692ca4 (current diff)
parent 499681 ab03a5f49397 (diff)
child 499683 6771e96bb376
child 499687 76a1b8d35914
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone65.0a1
first release with
nightly linux32
7007206a3cd4 / 65.0a1 / 20181027100344 / files
nightly linux64
7007206a3cd4 / 65.0a1 / 20181027100344 / files
nightly mac
7007206a3cd4 / 65.0a1 / 20181027100344 / files
nightly win32
7007206a3cd4 / 65.0a1 / 20181027100344 / files
nightly win64
7007206a3cd4 / 65.0a1 / 20181027100344 / 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
Merge inbound to mozilla-central. a=merge
--- a/dom/base/AutocompleteFieldList.h
+++ b/dom/base/AutocompleteFieldList.h
@@ -55,17 +55,16 @@
 AUTOCOMPLETE_UNSUPPORTED_FIELD_NAME(HONORIFIX_PREFIX, "honorifix-prefix")
 AUTOCOMPLETE_UNSUPPORTED_FIELD_NAME(HONORIFIX_SUFFIX, "honorifix-suffix")
 AUTOCOMPLETE_UNSUPPORTED_FIELD_NAME(NICKNAME, "nickname")
 AUTOCOMPLETE_UNSUPPORTED_FIELD_NAME(ORGANIZATION_TITLE, "organization-title")
 AUTOCOMPLETE_UNSUPPORTED_FIELD_NAME(USERNAME, "username")
 AUTOCOMPLETE_UNSUPPORTED_FIELD_NAME(NEW_PASSWORD, "new-password")
 AUTOCOMPLETE_UNSUPPORTED_FIELD_NAME(CURRENT_PASSWORD, "current-password")
 AUTOCOMPLETE_UNSUPPORTED_FIELD_NAME(ADDRESS_LEVEL4, "address-level4")
-AUTOCOMPLETE_UNSUPPORTED_FIELD_NAME(ADDRESS_LEVEL3, "address-level3")
 AUTOCOMPLETE_UNSUPPORTED_FIELD_NAME(CC_GIVEN_NAME, "cc-given-name")
 AUTOCOMPLETE_UNSUPPORTED_FIELD_NAME(CC_ADDITIONAL_NAME, "cc-additional-name")
 AUTOCOMPLETE_UNSUPPORTED_FIELD_NAME(CC_FAMILY_NAME, "cc-family-name")
 AUTOCOMPLETE_UNSUPPORTED_FIELD_NAME(CC_CSC, "cc-csc")
 AUTOCOMPLETE_UNSUPPORTED_FIELD_NAME(CC_TYPE, "cc-type")
 AUTOCOMPLETE_UNSUPPORTED_FIELD_NAME(TRANSACTION_CURRENCY, "transaction-currency")
 AUTOCOMPLETE_UNSUPPORTED_FIELD_NAME(TRANSACTION_AMOUNT, "transaction-amount")
 AUTOCOMPLETE_UNSUPPORTED_FIELD_NAME(LANGUAGE, "language")
--- a/dom/fetch/FetchDriver.cpp
+++ b/dom/fetch/FetchDriver.cpp
@@ -534,17 +534,17 @@ FetchDriver::HttpFetch(const nsACString&
     return NS_ERROR_UNEXPECTED;
   }
 
   // From here on we create a channel and set its properties with the
   // information from the InternalRequest. This is an implementation detail.
   MOZ_ASSERT(mLoadGroup);
   nsCOMPtr<nsIChannel> chan;
 
-  nsLoadFlags loadFlags = nsIRequest::LOAD_NORMAL |
+  nsLoadFlags loadFlags = nsIRequest::LOAD_BACKGROUND |
     bypassFlag | nsIChannel::LOAD_CLASSIFY_URI;
   if (mDocument) {
     MOZ_ASSERT(mDocument->NodePrincipal() == mPrincipal);
     rv = NS_NewChannel(getter_AddRefs(chan),
                        uri,
                        mDocument,
                        secFlags,
                        mRequest->ContentPolicyType(),
--- a/netwerk/base/nsIPermissionManager.idl
+++ b/netwerk/base/nsIPermissionManager.idl
@@ -127,17 +127,17 @@ interface nsIPermissionManager : nsISupp
 
   /**
    * Add permission information for a given principal.
    * It is internally calling the other add() method using the nsIURI from the
    * principal.
    * Passing a system principal will be a no-op because they will always be
    * granted permissions.
    */
-  void addFromPrincipal(in nsIPrincipal principal, in string typed,
+  void addFromPrincipal(in nsIPrincipal principal, in string type,
                         in uint32_t permission,
                         [optional] in uint32_t expireType,
                         [optional] in int64_t expireTime);
 
   /**
    * Remove permission information for a given URI and permission type. This will
    * remove the permission for the entire host described by the uri, acting as the
    * opposite operation to the add() method.
--- a/taskcluster/ci/test/compiled.yml
+++ b/taskcluster/ci/test/compiled.yml
@@ -54,17 +54,20 @@ gtest:
 jittest:
     description: "JIT Test run"
     suite: jittest/jittest-chunked
     treeherder-symbol: Jit
     instance-size:
         by-test-platform:
             android-em.*: xlarge
             default: default
-    run-on-projects: built-projects
+    run-on-projects:
+        by-test-platform:
+            android-hw.*: ['try']
+            default: built-projects
     chunks:
         by-test-platform:
             windows.*: 1
             windows10-64-ccov/debug: 6
             macosx.*: 1
             macosx64-ccov/debug: 4
             android-em-4.3-arm7-api-15/debug: 20
             android.*: 10
--- a/taskcluster/ci/test/mochitest.yml
+++ b/taskcluster/ci/test/mochitest.yml
@@ -272,17 +272,20 @@ mochitest-media:
     description: "Mochitest media run"
     suite: mochitest/mochitest-media
     treeherder-symbol: M(mda)
     max-run-time:
         by-test-platform:
             windows10-64-ccov/debug: 7200
             macosx64-ccov/debug: 7200
             default: 5400
-    run-on-projects: built-projects
+    run-on-projects:
+        by-test-platform:
+            android-hw.*: ['try']
+            default: built-projects
     loopback-video: true
     virtualization:
         by-test-platform:
             windows10-64-qr/.*: virtual-with-gpu
             default: virtual
     instance-size:
         by-test-platform:
             android-em.*: xlarge
--- a/taskcluster/ci/test/raptor.yml
+++ b/taskcluster/ci/test/raptor.yml
@@ -69,17 +69,18 @@ raptor-speedometer-firefox:
 
 raptor-speedometer-geckoview:
     description: "Raptor Speedometer on Geckoview"
     try-name: raptor-speedometer-geckoview
     treeherder-symbol: Rap(sp)
     target: geckoview_example.apk
     run-on-projects:
         by-test-platform:
-            android-hw.*: ['try', 'mozilla-central']
+            android-hw-g5.*: ['try']
+            android-hw-p2.*: ['try', 'mozilla-central']
     max-run-time: 900
     mozharness:
         extra-options:
             - --test=raptor-speedometer
             - --app=geckoview
             - --binary=org.mozilla.geckoview_example
 
 raptor-speedometer-chrome:
@@ -234,17 +235,18 @@ raptor-unity-webgl-firefox:
 
 raptor-unity-webgl-geckoview:
     description: "Raptor Unity WebGL on Geckoview"
     try-name: raptor-unity-webgl-geckoview
     treeherder-symbol: Rap(ugl)
     target: geckoview_example.apk
     run-on-projects:
         by-test-platform:
-            android-hw-.*arm7.*: ['try', 'mozilla-central']
+            android-hw-g5.*: ['try']
+            android-hw-p2.*: ['try', 'mozilla-central']
     max-run-time: 900
     mozharness:
         extra-options:
             - --test=raptor-unity-webgl
             - --app=geckoview
             - --binary=org.mozilla.geckoview_example
     fetches:
         fetch:
--- a/taskcluster/ci/test/test-platforms.yml
+++ b/taskcluster/ci/test/test-platforms.yml
@@ -304,39 +304,37 @@ android-em-4.2-x86/opt:
     test-sets:
         - android-x86-tests
 
 android-em-7.0-x86/opt:
     build-platform: android-x86/opt
     test-sets:
         - android-x86-kvm-tests
 
-# Bug 1501364 - Temporarily disable Bitbar android hardware tests
-
 # android-hw test platforms execute on real devices attached to Autophone hosts.
 
 # android-hw-g5-7-0 Motorola Moto G5 Android 7.0
 
-# android-hw-g5-7-0-arm7-api-16/opt:
-#     build-platform: android-api-16/opt
-#     test-sets:
-#         - android-hw-arm7-raptor
-#         - raptor-fetch-geckoview
+android-hw-g5-7-0-arm7-api-16/opt:
+    build-platform: android-api-16/opt
+    test-sets:
+        - android-hw-arm7-raptor
+        - raptor-fetch-geckoview
 
 # android-hw-p2-8-0 Google Pixel 2 Android 8.0
 
-# android-hw-p2-8-0-arm7-api-16/opt:
-#     build-platform: android-api-16/opt
-#     test-sets:
-#         - android-hw-arm7-opt-unittests
-#         - android-hw-arm7-raptor
-#         - raptor-fetch-geckoview
+android-hw-p2-8-0-arm7-api-16/opt:
+    build-platform: android-api-16/opt
+    test-sets:
+        - android-hw-arm7-opt-unittests
+        - android-hw-arm7-raptor
+        - raptor-fetch-geckoview
 
-# android-hw-p2-8-0-arm7-api-16/debug:
-#     build-platform: android-api-16/debug
-#     test-sets:
-#         - android-hw-arm7-debug-unittests
+android-hw-p2-8-0-arm7-api-16/debug:
+    build-platform: android-api-16/debug
+    test-sets:
+        - android-hw-arm7-debug-unittests
 
-# android-hw-p2-8-0-android-aarch64/opt:
-#     build-platform: android-aarch64/opt
-#     test-sets:
-#         - android-hw-aarch64-opt-unittests
-#         - android-hw-aarch64-raptor
+android-hw-p2-8-0-android-aarch64/opt:
+    build-platform: android-aarch64/opt
+    test-sets:
+        - android-hw-aarch64-opt-unittests
+        - android-hw-aarch64-raptor
--- a/testing/awsy/awsy/awsy_test_case.py
+++ b/testing/awsy/awsy/awsy_test_case.py
@@ -250,17 +250,17 @@ class AwsyTestCase(MarionetteTestCase):
             """ % ident
 
         try:
             # This is async and there's no callback so we use the existence
             # of an incomplete memory report to check if it hasn't finished yet.
             self.marionette.execute_script(dmd_script, script_timeout=60000)
             tmpdir = tempfile.gettempdir()
             prefix = "incomplete-unified-memory-report-%s-%d-*" % (checkpointName, iteration)
-            max_wait = 60
+            max_wait = 240
             elapsed = 0
             while fnmatch.filter(os.listdir(tmpdir), prefix) and elapsed < max_wait:
                 self.logger.info("Waiting for memory report to finish")
                 time.sleep(1)
                 elapsed += 1
 
             incomplete = fnmatch.filter(os.listdir(tmpdir), prefix)
             if incomplete:
--- a/testing/mozbase/mozsystemmonitor/setup.py
+++ b/testing/mozbase/mozsystemmonitor/setup.py
@@ -3,17 +3,17 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 from __future__ import absolute_import
 
 import os
 
 from setuptools import setup
 
-PACKAGE_VERSION = '0.3'
+PACKAGE_VERSION = '0.4'
 
 try:
     pwd = os.path.dirname(os.path.abspath(__file__))
     description = open(os.path.join(pwd, 'README.rst')).read()
 except Exception:
     description = ''
 
 setup(
--- a/testing/web-platform/meta/html/semantics/forms/the-form-element/form-autocomplete.html.ini
+++ b/testing/web-platform/meta/html/semantics/forms/the-form-element/form-autocomplete.html.ini
@@ -65,19 +65,16 @@
     expected: FAIL
 
   [current-password is an allowed autocomplete field name]
     expected: FAIL
 
   [address-level4 is an allowed autocomplete field name]
     expected: FAIL
 
-  [address-level3 is an allowed autocomplete field name]
-    expected: FAIL
-
   [transaction-currency is an allowed autocomplete field name]
     expected: FAIL
 
   [transaction-amount is an allowed autocomplete field name]
     expected: FAIL
 
   [Serialize combinations of section, mode, contact, and field]
     expected: FAIL
--- a/toolkit/components/cleardata/ClearDataService.js
+++ b/toolkit/components/cleardata/ClearDataService.js
@@ -509,20 +509,47 @@ const AuthCacheCleaner = {
     });
   },
 };
 
 const PermissionsCleaner = {
   deleteByHost(aHost, aOriginAttributes) {
     return new Promise(aResolve => {
       for (let perm of Services.perms.enumerator) {
+        let toBeRemoved;
         try {
-          if (eTLDService.hasRootDomain(perm.principal.URI.host, aHost)) {
-            Services.perms.removePermission(perm);
+          toBeRemoved = eTLDService.hasRootDomain(perm.principal.URI.host,
+                                                  aHost);
+        } catch (ex) {
+          continue;
+        }
+
+        if (!toBeRemoved && perm.type.startsWith("3rdPartyStorage^")) {
+          let parts = perm.type.split("^");
+          for (let i = 1; i < parts.length; ++i) {
+            let uri;
+            try {
+              uri = Services.io.newURI(parts[i]);
+            } catch (ex) {
+              continue;
+            }
+
+            toBeRemoved = eTLDService.hasRootDomain(uri.host, aHost);
+            if (toBeRemoved) {
+              break;
+            }
           }
+        }
+
+        if (!toBeRemoved) {
+          continue;
+        }
+
+        try {
+          Services.perms.removePermission(perm);
         } catch (ex) {
           // Ignore entry
         }
       }
 
       aResolve();
     });
   },
new file mode 100644
--- /dev/null
+++ b/toolkit/components/cleardata/tests/unit/test_permissions.js
@@ -0,0 +1,98 @@
+/* Any copyright is dedicated to the Public Domain.
+   http://creativecommons.org/publicdomain/zero/1.0/ */
+
+/**
+ * Tests for permissions
+ */
+
+"use strict";
+
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+
+add_task(async function test_all_permissions() {
+  const uri = Services.io.newURI("https://example.net");
+  const principal = Services.scriptSecurityManager.createCodebasePrincipal(uri, {});
+
+  Services.perms.addFromPrincipal(principal, "cookie", Services.perms.ALLOW_ACTION);
+  Assert.ok(Services.perms.getPermissionObject(principal, "cookie", true) != null);
+
+  await new Promise(aResolve => {
+    Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_PERMISSIONS, value => {
+      Assert.equal(value, 0);
+      aResolve();
+    });
+  });
+
+  Assert.ok(Services.perms.getPermissionObject(principal, "cookie", true) == null);
+});
+
+add_task(async function test_principal_permissions() {
+  const uri = Services.io.newURI("https://example.net");
+  const principal = Services.scriptSecurityManager.createCodebasePrincipal(uri, {});
+
+  const anotherUri = Services.io.newURI("https://example.com");
+  const anotherPrincipal = Services.scriptSecurityManager.createCodebasePrincipal(anotherUri, {});
+
+  Services.perms.addFromPrincipal(principal, "cookie", Services.perms.ALLOW_ACTION);
+  Services.perms.addFromPrincipal(anotherPrincipal, "cookie", Services.perms.ALLOW_ACTION);
+  Assert.ok(Services.perms.getPermissionObject(principal, "cookie", true) != null);
+  Assert.ok(Services.perms.getPermissionObject(anotherPrincipal, "cookie", true) != null);
+
+  await new Promise(aResolve => {
+    Services.clearData.deleteDataFromPrincipal(principal, true /* user request */,
+                                               Ci.nsIClearDataService.CLEAR_PERMISSIONS, value => {
+      Assert.equal(value, 0);
+      aResolve();
+    });
+  });
+
+  Assert.ok(Services.perms.getPermissionObject(principal, "cookie", true) == null);
+  Assert.ok(Services.perms.getPermissionObject(anotherPrincipal, "cookie", true) != null);
+
+  await new Promise(aResolve => {
+    Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_PERMISSIONS, value => aResolve());
+  });
+});
+
+add_task(async function test_3rdpartystorage_permissions() {
+  const uri = Services.io.newURI("https://example.net");
+  const principal = Services.scriptSecurityManager.createCodebasePrincipal(uri, {});
+  Services.perms.addFromPrincipal(principal, "cookie", Services.perms.ALLOW_ACTION);
+
+  const anotherUri = Services.io.newURI("https://example.com");
+  const anotherPrincipal = Services.scriptSecurityManager.createCodebasePrincipal(anotherUri, {});
+  Services.perms.addFromPrincipal(anotherPrincipal, "cookie", Services.perms.ALLOW_ACTION);
+  Services.perms.addFromPrincipal(anotherPrincipal, "3rdPartyStorage^https://example.net", Services.perms.ALLOW_ACTION);
+
+  const oneMoreUri = Services.io.newURI("https://example.org");
+  const oneMorePrincipal = Services.scriptSecurityManager.createCodebasePrincipal(oneMoreUri, {});
+  Services.perms.addFromPrincipal(oneMorePrincipal, "cookie", Services.perms.ALLOW_ACTION);
+  Services.perms.addFromPrincipal(oneMorePrincipal, "3rdPartyStorage^https://example.net^https://example.org", Services.perms.ALLOW_ACTION);
+  Services.perms.addFromPrincipal(oneMorePrincipal, "3rdPartyStorage^https://example.org^https://example.net", Services.perms.ALLOW_ACTION);
+
+  Assert.ok(Services.perms.getPermissionObject(principal, "cookie", true) != null);
+  Assert.ok(Services.perms.getPermissionObject(anotherPrincipal, "cookie", true) != null);
+  Assert.ok(Services.perms.getPermissionObject(anotherPrincipal, "3rdPartyStorage^https://example.net", true) != null);
+  Assert.ok(Services.perms.getPermissionObject(oneMorePrincipal, "cookie", true) != null);
+  Assert.ok(Services.perms.getPermissionObject(oneMorePrincipal, "3rdPartyStorage^https://example.net^https://example.org", true) != null);
+  Assert.ok(Services.perms.getPermissionObject(oneMorePrincipal, "3rdPartyStorage^https://example.org^https://example.net", true) != null);
+
+  await new Promise(aResolve => {
+    Services.clearData.deleteDataFromPrincipal(principal, true /* user request */,
+                                               Ci.nsIClearDataService.CLEAR_PERMISSIONS, value => {
+      Assert.equal(value, 0);
+      aResolve();
+    });
+  });
+
+  Assert.ok(Services.perms.getPermissionObject(principal, "cookie", true) == null);
+  Assert.ok(Services.perms.getPermissionObject(anotherPrincipal, "cookie", true) != null);
+  Assert.ok(Services.perms.getPermissionObject(anotherPrincipal, "3rdPartyStorage^https://example.net", true) == null);
+  Assert.ok(Services.perms.getPermissionObject(oneMorePrincipal, "cookie", true) != null);
+  Assert.ok(Services.perms.getPermissionObject(oneMorePrincipal, "3rdPartyStorage^https://example.net^https://example.org", true) == null);
+  Assert.ok(Services.perms.getPermissionObject(oneMorePrincipal, "3rdPartyStorage^https://example.org^https://example.net", true) == null);
+
+  await new Promise(aResolve => {
+    Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_PERMISSIONS, value => aResolve());
+  });
+});
--- a/toolkit/components/cleardata/tests/unit/xpcshell.ini
+++ b/toolkit/components/cleardata/tests/unit/xpcshell.ini
@@ -2,8 +2,9 @@
 head = head.js
 skip-if = toolkit == 'android'
 support-files =
 
 [test_basic.js]
 [test_cookies.js]
 [test_downloads.js]
 [test_passwords.js]
+[test_permissions.js]
--- a/xpcom/base/nsMemoryReporterManager.h
+++ b/xpcom/base/nsMemoryReporterManager.h
@@ -201,17 +201,17 @@ private:
   void DispatchReporter(nsIMemoryReporter* aReporter, bool aIsAsync,
                         nsIHandleReportCallback* aHandleReport,
                         nsISupports* aHandleReportData,
                         bool aAnonymize);
 
   static void TimeoutCallback(nsITimer* aTimer, void* aData);
   // Note: this timeout needs to be long enough to allow for the
   // possibility of DMD reports and/or running on a low-end phone.
-  static const uint32_t kTimeoutLengthMS = 50000;
+  static const uint32_t kTimeoutLengthMS = 180000;
 
   mozilla::Mutex mMutex;
   bool mIsRegistrationBlocked;
 
   StrongReportersTable* mStrongReporters;
   WeakReportersTable* mWeakReporters;
 
   // These two are only used for testing purposes.