Skip to content

Commit

Permalink
Merge branch 'esr68' of github.com:mozilla/gecko-dev into current
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Kontos committed Jun 2, 2020
2 parents f016efa + 861fd56 commit dce288a
Show file tree
Hide file tree
Showing 90 changed files with 5,547 additions and 2,623 deletions.
8 changes: 8 additions & 0 deletions .hgtags
Original file line number Diff line number Diff line change
Expand Up @@ -2022,3 +2022,11 @@ e8be44e815d0ba70ba5b95b2336bac81cc7c383f FENNEC_68_7b1_RELEASE
8cb09c6adfab28858b4e463c36036e7dadd0853c FIREFOX_68_8_0esr_BUILD1
416007f3bb6c5a70edb59449e5c8fa4e25b318a9 FENNEC_68_8_0_BUILD2
416007f3bb6c5a70edb59449e5c8fa4e25b318a9 FIREFOX_68_8_0esr_BUILD2
416007f3bb6c5a70edb59449e5c8fa4e25b318a9 FENNEC_68_8_0_RELEASE
416007f3bb6c5a70edb59449e5c8fa4e25b318a9 FIREFOX_68_8_0esr_RELEASE
fc5a91e400243cc2c2c6a6ecc0d211be26a9662b FENNEC_68_8_1_BUILD1
fc5a91e400243cc2c2c6a6ecc0d211be26a9662b FENNEC_68_8_1_RELEASE
e17129d84f13cc84f3a09d23bcbb005194573e23 FENNEC_68_9_0_BUILD1
e17129d84f13cc84f3a09d23bcbb005194573e23 FIREFOX_68_9_0esr_BUILD1
e17129d84f13cc84f3a09d23bcbb005194573e23 FIREFOX_68_9_0esr_RELEASE
e17129d84f13cc84f3a09d23bcbb005194573e23 FENNEC_68_9_0_RELEASE
114 changes: 81 additions & 33 deletions browser/app/blocklist.xml

Large diffs are not rendered by default.

52 changes: 52 additions & 0 deletions browser/base/content/test/plugins/browser_enable_DRM_prompt.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,55 @@ add_task(async function() {
);
});
});

add_task(async function test_eme_locked() {
await BrowserTestUtils.withNewTab(TEST_URL, async function(browser) {
// Reset prefs manually since we need to unlock them.
let emeWasEnabled = Services.prefs.getBoolPref("media.eme.enabled", false);

// Restore the preferences to their pre-test state on test finish.
registerCleanupFunction(function() {
Services.prefs.setBoolPref("media.eme.enabled", emeWasEnabled);
Services.prefs.unlockPref("media.eme.enabled");
});

// Turn off EME and Widevine CDM.
Services.prefs.setBoolPref("media.eme.enabled", false);
Services.prefs.lockPref("media.eme.enabled");

// Have content request access to Widevine, UI should drop down to
// prompt user to enable DRM.
let result = await ContentTask.spawn(browser, null, async function() {
try {
let config = [
{
initDataTypes: ["webm"],
videoCapabilities: [{ contentType: 'video/webm; codecs="vp9"' }],
},
];
await content.navigator.requestMediaKeySystemAccess(
"com.widevine.alpha",
config
);
} catch (ex) {
return { rejected: true };
}
return { rejected: false };
});
is(
result.rejected,
true,
"EME request should be denied because EME disabled."
);

// Verify the UI prompt did not show.
let box = gBrowser.getNotificationBox(browser);
let notification = box.currentNotification;

is(
notification,
null,
"Notification should not be displayed since pref is locked"
);
});
});
19 changes: 19 additions & 0 deletions browser/components/enterprisepolicies/Policies.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,13 @@ var Policies = {
);
}
}
if ("PrivateBrowsing" in param) {
setDefaultPref(
"network.auth.private-browsing-sso",
param.PrivateBrowsing,
locked
);
}
},
},

Expand Down Expand Up @@ -747,6 +754,18 @@ var Policies = {
},
},

EncryptedMediaExtensions: {
onBeforeAddons(manager, param) {
let locked = false;
if ("Locked" in param) {
locked = param.Locked;
}
if ("Enabled" in param) {
setDefaultPref("media.eme.enabled", param.Enabled, locked);
}
},
},

Extensions: {
onBeforeUIStartup(manager, param) {
let uninstallingPromise = Promise.resolve();
Expand Down
15 changes: 15 additions & 0 deletions browser/components/enterprisepolicies/schemas/policies-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@
},
"Locked": {
"type": "boolean"
},
"PrivateBrowsing": {
"type": "boolean"
}
}
},
Expand Down Expand Up @@ -384,6 +387,18 @@
}
},

"EncryptedMediaExtensions": {
"type": "object",
"properties": {
"Enabled": {
"type": "boolean"
},
"Locked": {
"type": "boolean"
}
}
},

"Extensions": {
"type": "object",
"properties": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ const POLICIES_TESTS = [
SPNEGO: false,
NTLM: false,
},
PrivateBrowsing: true,
},
},
lockedPrefs: {
Expand All @@ -135,6 +136,7 @@ const POLICIES_TESTS = [
"network.negotiate-auth.allow-non-fqdn": true,
"network.automatic-ntlm-auth.allow-proxies": false,
"network.negotiate-auth.allow-proxies": false,
"network.auth.private-browsing-sso": true,
},
},

Expand All @@ -149,6 +151,7 @@ const POLICIES_TESTS = [
SPNEGO: true,
NTLM: true,
},
PrivateBrowsing: true,
Locked: false,
},
},
Expand All @@ -158,6 +161,7 @@ const POLICIES_TESTS = [
"network.automatic-ntlm-auth.trusted-uris": "a.com, b.com",
"network.automatic-ntlm-auth.allow-non-fqdn": true,
"network.negotiate-auth.allow-non-fqdn": true,
"network.auth.private-browsing-sso": true,
},
},

Expand Down Expand Up @@ -623,6 +627,20 @@ const POLICIES_TESTS = [
"media.autoplay.default": 5,
},
},

// POLICY: EncryptedMediaExtensions

{
policies: {
EncryptedMediaExtensions: {
Enabled: false,
Locked: true,
},
},
lockedPrefs: {
"media.eme.enabled": false,
},
},
];

add_task(async function test_policy_simple_prefs() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
"unpack": true
},
{
"version": "SVN 1.9.4, repacked from SlikSvn (https://sliksvn.com/download/)",
"size": 3934520,
"digest": "d3b8f74936857ecbf542e403ed6835938a31d65302985729cbfa7191bf2cf94138565cefcc2f31517098013fbfc51868348863a55b588250902f9dec214dbc42",
"version": "MinGit-2.13.3-64-bit",
"size": 21482885,
"digest": "929bb3c07be8487ee519422a312bdbfeec8f4db4b62c49d02f9aad9fd2a66c0ee5fad63d2b06c8744c336dc9d50446fa4457897333ad17ffd783ecabd1e2ddbb",
"algorithm": "sha512",
"filename": "svn194.zip",
"filename": "git.zip",
"unpack": true
},
{
Expand Down
2 changes: 1 addition & 1 deletion browser/config/version_display.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2020.05
2020.06
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ policy-DownloadDirectory = Set and lock the download directory.
# “lock” means that the user won’t be able to change this setting
policy-EnableTrackingProtection = Enable or disable Content Blocking and optionally lock it.
# “lock” means that the user won’t be able to change this setting
policy-EncryptedMediaExtensions = Enable or disable Encrypted Media Extensions and optionally lock it.
# A “locked” extension can’t be disabled or removed by the user. This policy
# takes 3 keys (“Install”, ”Uninstall”, ”Locked”), you can either keep them in
# English or translate them as verbs.
Expand Down
54 changes: 20 additions & 34 deletions build/build-clang/build-clang.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
import which
from distutils.dir_util import copy_tree

URL_REPO = "https://github.com/llvm/llvm-project"


def symlink(source, link_name):
os_symlink = getattr(os, "symlink", None)
Expand Down Expand Up @@ -75,7 +77,7 @@ def import_clang_tidy(source_dir):
clang_plugin_path = os.path.join(os.path.dirname(sys.argv[0]),
'..', 'clang-plugin')
clang_tidy_path = os.path.join(source_dir,
'tools/clang/tools/extra/clang-tidy')
'clang-tools-extra/clang-tidy')
sys.path.append(clang_plugin_path)
from import_mozilla_checks import do_import
do_import(clang_plugin_path, clang_tidy_path)
Expand Down Expand Up @@ -196,13 +198,14 @@ def install_asan_symbols(build_dir, clang_dir):
shutil.copy2(src_path[0], dst_path[0])


def svn_co(source_dir, url, directory, revision):
run_in(source_dir, ["svn", "co", "-q", "-r", revision, url, directory])
def git_clone(base_dir, url, directory, revision):
run_in(base_dir, ["git", "clone", "-n", url, directory])
run_in(os.path.join(base_dir, directory), ["git", "checkout", revision])


def svn_update(directory, revision):
run_in(directory, ["svn", "revert", "-q", "-R", "."])
run_in(directory, ["svn", "update", "-q", "-r", revision])
def git_update(directory, revision):
run_in(directory, ["git", "remote", "update"])
run_in(directory, ["git", "reset", "--hard", revision])


def is_darwin():
Expand Down Expand Up @@ -580,8 +583,8 @@ def prune_final_dir_for_clang_tidy(final_dir, osx_cross_compile):
os.sys.exit(0)

llvm_source_dir = source_dir + "/llvm"
extra_source_dir = source_dir + "/clang-tools-extra"
clang_source_dir = source_dir + "/clang"
extra_source_dir = source_dir + "/extra"
lld_source_dir = source_dir + "/lld"
compiler_rt_source_dir = source_dir + "/compiler-rt"
libcxx_source_dir = source_dir + "/libcxx"
Expand All @@ -603,14 +606,8 @@ def prune_final_dir_for_clang_tidy(final_dir, osx_cross_compile):
config = json.load(args.config)

llvm_revision = config["llvm_revision"]
llvm_repo = config["llvm_repo"]
clang_repo = config["clang_repo"]
extra_repo = config.get("extra_repo")
lld_repo = config.get("lld_repo")
# On some packages we don't use compiler_repo
compiler_repo = config.get("compiler_repo")
libcxx_repo = config["libcxx_repo"]
libcxxabi_repo = config.get("libcxxabi_repo")
if not re.match(r'^[0-9a-fA-F]{40}$', llvm_revision):
raise ValueError("Incorrect format of the git revision")
stages = 3
if "stages" in config:
stages = int(config["stages"])
Expand Down Expand Up @@ -684,26 +681,15 @@ def prune_final_dir_for_clang_tidy(final_dir, osx_cross_compile):
if not os.path.exists(source_dir):
os.makedirs(source_dir)

def checkout_or_update(repo, checkout_dir):
if os.path.exists(checkout_dir):
svn_update(checkout_dir, llvm_revision)
if not args.skip_checkout:
if os.path.exists(os.path.join(source_dir, '.git')):
git_update(source_dir, llvm_revision)
else:
svn_co(source_dir, repo, checkout_dir, llvm_revision)
delete(source_dir)
git_clone(base_dir, URL_REPO, source_dir, llvm_revision)

if not args.skip_checkout:
checkout_or_update(llvm_repo, llvm_source_dir)
checkout_or_update(clang_repo, clang_source_dir)
if compiler_repo is not None:
checkout_or_update(compiler_repo, compiler_rt_source_dir)
checkout_or_update(libcxx_repo, libcxx_source_dir)
if lld_repo:
checkout_or_update(lld_repo, lld_source_dir)
if libcxxabi_repo:
checkout_or_update(libcxxabi_repo, libcxxabi_source_dir)
if extra_repo:
checkout_or_update(extra_repo, extra_source_dir)
for p in config.get("patches", []):
patch(p, source_dir)
for p in config.get("patches", []):
patch(p, source_dir)

compiler_rt_source_link = llvm_source_dir + "/projects/compiler-rt"

Expand All @@ -729,7 +715,7 @@ def checkout_or_update(repo, checkout_dir):
package_name = "clang"
if build_clang_tidy:
package_name = "clang-tidy"
import_clang_tidy(llvm_source_dir)
import_clang_tidy(source_dir)

if not os.path.exists(build_dir):
os.makedirs(build_dir)
Expand Down
7 changes: 1 addition & 6 deletions build/build-clang/clang-4.0-linux64.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
{
"llvm_revision": "305830",
"llvm_revision": "449c3ef93afc7a668eb35e67a83717453e28b25a",
"stages": "3",
"build_libcxx": true,
"build_type": "Release",
"assertions": false,
"llvm_repo": "https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_401/final",
"clang_repo": "https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_401/final",
"compiler_repo": "https://llvm.org/svn/llvm-project/compiler-rt/tags/RELEASE_401/final",
"libcxx_repo": "https://llvm.org/svn/llvm-project/libcxx/tags/RELEASE_401/final",
"libcxxabi_repo": "https://llvm.org/svn/llvm-project/libcxxabi/tags/RELEASE_401/final",
"python_path": "/usr/bin/python2.7",
"gcc_dir": "/builds/worker/workspace/build/src/gcc",
"cc": "/builds/worker/workspace/build/src/gcc/bin/gcc",
Expand Down
8 changes: 1 addition & 7 deletions build/build-clang/clang-7-linux64.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
{
"llvm_revision": "349247",
"llvm_revision": "d0d8eb2e5415b8be29343e3c17a18e49e67b5551",
"stages": "3",
"build_libcxx": true,
"build_type": "Release",
"assertions": false,
"llvm_repo": "https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_701/final",
"clang_repo": "https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_701/final",
"lld_repo": "https://llvm.org/svn/llvm-project/lld/tags/RELEASE_701/final",
"compiler_repo": "https://llvm.org/svn/llvm-project/compiler-rt/tags/RELEASE_701/final",
"libcxx_repo": "https://llvm.org/svn/llvm-project/libcxx/tags/RELEASE_701/final",
"libcxxabi_repo": "https://llvm.org/svn/llvm-project/libcxxabi/tags/RELEASE_701/final",
"python_path": "/usr/bin/python2.7",
"gcc_dir": "/builds/worker/workspace/build/src/gcc",
"cc": "/builds/worker/workspace/build/src/gcc/bin/gcc",
Expand Down
8 changes: 1 addition & 7 deletions build/build-clang/clang-8-android.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
{
"llvm_revision": "356365",
"llvm_revision": "d2298e74235598f15594fe2c99bbac870a507c59",
"stages": "2",
"build_libcxx": true,
"build_type": "Release",
"assertions": false,
"llvm_repo": "https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_800/final",
"clang_repo": "https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_800/final",
"lld_repo": "https://llvm.org/svn/llvm-project/lld/tags/RELEASE_800/final",
"compiler_repo": "https://llvm.org/svn/llvm-project/compiler-rt/tags/RELEASE_800/final",
"libcxx_repo": "https://llvm.org/svn/llvm-project/libcxx/tags/RELEASE_800/final",
"libcxxabi_repo": "https://llvm.org/svn/llvm-project/libcxxabi/tags/RELEASE_800/final",
"python_path": "/usr/bin/python2.7",
"gcc_dir": "/builds/worker/workspace/build/src/gcc",
"cc": "/builds/worker/workspace/build/src/gcc/bin/gcc",
Expand Down
8 changes: 1 addition & 7 deletions build/build-clang/clang-8-linux64-aarch64-cross.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
{
"llvm_revision": "356365",
"llvm_revision": "d2298e74235598f15594fe2c99bbac870a507c59",
"stages": "3",
"build_libcxx": true,
"build_type": "Release",
"assertions": false,
"llvm_repo": "https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_800/final",
"clang_repo": "https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_800/final",
"lld_repo": "https://llvm.org/svn/llvm-project/lld/tags/RELEASE_800/final",
"compiler_repo": "https://llvm.org/svn/llvm-project/compiler-rt/tags/RELEASE_800/final",
"libcxx_repo": "https://llvm.org/svn/llvm-project/libcxx/tags/RELEASE_800/final",
"libcxxabi_repo": "https://llvm.org/svn/llvm-project/libcxxabi/tags/RELEASE_800/final",
"python_path": "/usr/bin/python2.7",
"gcc_dir": "/builds/worker/workspace/build/src/gcc",
"cc": "/builds/worker/workspace/build/src/gcc/bin/gcc",
Expand Down
Loading

0 comments on commit dce288a

Please sign in to comment.