mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
chore: bump chromium to 139.0.7219.0 (main) (#47348)
* chore: bump chromium in DEPS to 139.0.7205.0 * 6543986: Mac: decouple deserializing and applying sandbox policy Refs https://chromium-review.googlesource.com/c/chromium/src/+/6543986 * 6580079: Reland 'Remove the third-party blocking feature' Refs https://chromium-review.googlesource.com/c/chromium/src/+/6580079 * 6505716: guest-contents: Add components/guest_contents Refs https://chromium-review.googlesource.com/c/chromium/src/+/6505716 * 6572556: Move LogMessageManager out of gpu_service_impl.cc. Refs https://chromium-review.googlesource.com/c/chromium/src/+/6572556 * 6566111: Change UtilityProcessHost to manage its instance internally Refs https://chromium-review.googlesource.com/c/chromium/src/+/6566111 * 6550237: Rename ReconnectEventObserver to ConnectionChangeObserverClient Refs https://chromium-review.googlesource.com/c/chromium/src/+/6550237 * 6565918: Validate path is valid UTF8 in SelectFileDialogLinuxPortal Refs https://chromium-review.googlesource.com/c/chromium/src/+/6565918 * 6579713: Remove base::NotFatalUntil::M130 usage 6566111: Change UtilityProcessHost to manage its instance internally Refs https://chromium-review.googlesource.com/c/chromium/src/+/6579713 https://chromium-review.googlesource.com/c/chromium/src/+/6566111 * chore: update chromium patches * chore: update remaining patches * fixup! 6566111: Change UtilityProcessHost to manage its instance internally Refs https://chromium-review.googlesource.com/c/chromium/src/+/6566111 * 6577970: Remove superfluous includes for base/strings/stringprintf.h in headers Refs https://chromium-review.googlesource.com/c/chromium/src/+/6577970 * 6568811: Add FunctionCall structured metrics event for DevTools Refs https://chromium-review.googlesource.com/c/chromium/src/+/6568811 * [PDF Ink Signatures] Support PdfAnnotationsEnabled policy https://chromium-review.googlesource.com/c/chromium/src/+/6558970 * build: disable libcxx modules for rbe * chore: bump chromium in DEPS to 139.0.7217.0 * chore: bump chromium in DEPS to 139.0.7218.0 * chore: update patches fix_use_delegated_generic_capturer_when_available.patch was updated to handle a small change: 6582142: Use content::Create*Capturer in DesktopCaptureDevice. | https://chromium-review.googlesource.com/c/chromium/src/+/6582142 * chore: bump chromium in DEPS to 139.0.7219.0 * chore: update patches * 6594615: Change Chromium's deployment target to macOS 12 https://chromium-review.googlesource.com/c/chromium/src/+/6594615 Updated the assertion message to match the docs structure now too. I removed the callout to the supported versions doc because it has moved and doesn't contain minimum platform version information. * 6606232: [views] Remove DesktopWindowTreeHostWin::window_enlargement_ https://chromium-review.googlesource.com/c/chromium/src/+/6606232 |NativeWindow::GetContentMinimumSize| and |NativeWindow::GetContentMaximumSize| may be good opportunities for a refactor now. * add squirrel.mac patch for removed function This was triggered by the macOS 12.0 deployment upgrade change. See: https://developer.apple.com/documentation/coreservices/1444079-uttypeconformsto?language=objc * 6582142: Use content::Create*Capturer in DesktopCaptureDevice. https://chromium-review.googlesource.com/c/chromium/src/+/6582142 * 6579732: Two minor API "quality of life" cleanups in OSCrypt Async https://chromium-review.googlesource.com/c/chromium/src/+/6579732 * chore: add include for base::SingleThreadTaskRunner Not sure what change caused this, I expect it would be a removed include somewhere else, but it's likely not important to track down. * chore: update libcxx filenames * chore: update CI build-tools commit target for macOS SDK 15.4 The following change uses an API that was added in the macOS 15.4 SDK. Support for that SDK version was added later than the current build-tools commit target. 6575804: Use a quick-and-dirty solution to avoid glitching with paste-and-go | https://chromium-review.googlesource.com/c/chromium/src/+/6575804 See: https://developer.apple.com/documentation/appkit/nspasteboard/accessbehavior-swift.enum?language=objc * fixup! 6606232: [views] Remove DesktopWindowTreeHostWin::window_enlargement_ https://chromium-review.googlesource.com/c/chromium/src/+/6606232 * chore: bump chromium in DEPS to 139.0.7220.0 * chore: update patches Minor changes due to: 6613978: pwa: let events fall through in the transparent area of TopContainerView | https://chromium-review.googlesource.com/c/chromium/src/+/6613978 6614778: Refactor auto pip tab observer for Android support | https://chromium-review.googlesource.com/c/chromium/src/+/6614778 * 6543986: Mac: decouple deserializing and applying sandbox policy https://chromium-review.googlesource.com/c/chromium/src/+/6543986 The DecodeVarInt and DecodeString functions look benign from a MAS perspective. I suspect they were patched out to avoid "unused function" errors. Their complements for encoding are unpatched, supporting this idea. The code that uses these functions was refactored out of the section that we patch out. Instead of patching out that new function, I decided to treat it the same as the serialization function that is unpatched. * chore: bump chromium in DEPS to 139.0.7222.0 * chore: bump chromium in DEPS to 139.0.7224.0 * chore: bump chromium in DEPS to 139.0.7226.0 * chore: bump chromium in DEPS to 139.0.7228.0 * chore: update patches * Don't use static variable for UseExternalPopupMenus https://chromium-review.googlesource.com/c/chromium/src/+/6534657 * Reland "Roll libc++ from a01c02c9d4ac to a9cc573e7c59 https://chromium-review.googlesource.com/c/chromium/src/+/6607589 * chore: bump chromium in DEPS to 139.0.7219.0 * chore: update patches * revert Don't use static variable for UseExternalPopupMenus * tls: remove deprecated tls.createSecurePair and SecurePair https://github.com/nodejs/node/pull/57361 * Revert "Reland "Roll libc++ from a01c02c9d4ac to a9cc573e7c59" This reverts commit33e1436a0c. * test: cleanup api-desktop-capturer-spec.ts * test: more cleanup of api-desktop-capturer-spec.ts * chore: debug dcheck error in webrtc on linux * fixup patch * add debugging to desktop capturer spec * test: fixup api-desktop-capturer-spec.ts for linux * chore: remove debugging patch * Revert "fixup! 6606232: [views] Remove DesktopWindowTreeHostWin::window_enlargement_ https://chromium-review.googlesource.com/c/chromium/src/+/6606232" This reverts commit32e75651c1. * Revert "6606232: [views] Remove DesktopWindowTreeHostWin::window_enlargement_" This reverts commit89c51aa1c7. * [views] Remove DesktopWindowTreeHostWin::window_enlargement_ https://chromium-review.googlesource.com/c/chromium/src/+/6606232 Reverting as we need this functionality for now. * fixup: remove patch that was accidentally added back --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Samuel Maddock <smaddock@slack-corp.com> Co-authored-by: deepak1556 <hop2deep@gmail.com> Co-authored-by: clavin <clavin@electronjs.org> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
This commit is contained in:
committed by
GitHub
parent
96fcc2f8c8
commit
6779769d22
@@ -8,18 +8,16 @@ import { setTimeout } from 'node:timers/promises';
|
||||
import { ifdescribe, ifit } from './lib/spec-helpers';
|
||||
import { closeAllWindows } from './lib/window-helpers';
|
||||
|
||||
function getSourceTypes (): ('window' | 'screen')[] {
|
||||
if (process.platform === 'linux') {
|
||||
return ['screen'];
|
||||
}
|
||||
return ['window', 'screen'];
|
||||
}
|
||||
|
||||
ifdescribe(!process.arch.includes('arm') && process.platform !== 'win32')('desktopCapturer', () => {
|
||||
let w: BrowserWindow;
|
||||
|
||||
before(async () => {
|
||||
w = new BrowserWindow({ show: false, webPreferences: { nodeIntegration: true, contextIsolation: false } });
|
||||
await w.loadURL('about:blank');
|
||||
});
|
||||
|
||||
after(closeAllWindows);
|
||||
|
||||
it('should return a non-empty array of sources', async () => {
|
||||
const sources = await desktopCapturer.getSources({ types: ['window', 'screen'] });
|
||||
const sources = await desktopCapturer.getSources({ types: getSourceTypes() });
|
||||
expect(sources).to.be.an('array').that.is.not.empty();
|
||||
});
|
||||
|
||||
@@ -29,14 +27,15 @@ ifdescribe(!process.arch.includes('arm') && process.platform !== 'win32')('deskt
|
||||
});
|
||||
|
||||
it('does not throw an error when called more than once (regression)', async () => {
|
||||
const sources1 = await desktopCapturer.getSources({ types: ['window', 'screen'] });
|
||||
const sources1 = await desktopCapturer.getSources({ types: getSourceTypes() });
|
||||
expect(sources1).to.be.an('array').that.is.not.empty();
|
||||
|
||||
const sources2 = await desktopCapturer.getSources({ types: ['window', 'screen'] });
|
||||
const sources2 = await desktopCapturer.getSources({ types: getSourceTypes() });
|
||||
expect(sources2).to.be.an('array').that.is.not.empty();
|
||||
});
|
||||
|
||||
it('responds to subsequent calls of different options', async () => {
|
||||
// Linux doesn't return any window sources.
|
||||
ifit(process.platform !== 'linux')('responds to subsequent calls of different options', async () => {
|
||||
const promise1 = desktopCapturer.getSources({ types: ['window'] });
|
||||
await expect(promise1).to.eventually.be.fulfilled();
|
||||
|
||||
@@ -46,11 +45,11 @@ ifdescribe(!process.arch.includes('arm') && process.platform !== 'win32')('deskt
|
||||
|
||||
// Linux doesn't return any window sources.
|
||||
ifit(process.platform !== 'linux')('returns an empty display_id for window sources', async () => {
|
||||
const w = new BrowserWindow({ width: 200, height: 200 });
|
||||
await w.loadURL('about:blank');
|
||||
const w2 = new BrowserWindow({ width: 200, height: 200 });
|
||||
await w2.loadURL('about:blank');
|
||||
|
||||
const sources = await desktopCapturer.getSources({ types: ['window'] });
|
||||
w.destroy();
|
||||
w2.destroy();
|
||||
expect(sources).to.be.an('array').that.is.not.empty();
|
||||
for (const { display_id: displayId } of sources) {
|
||||
expect(displayId).to.be.a('string').and.be.empty();
|
||||
@@ -74,7 +73,7 @@ ifdescribe(!process.arch.includes('arm') && process.platform !== 'win32')('deskt
|
||||
await wShown;
|
||||
|
||||
const isNonEmpties: boolean[] = (await desktopCapturer.getSources({
|
||||
types: ['window', 'screen'],
|
||||
types: getSourceTypes(),
|
||||
thumbnailSize: { width: 100, height: 100 }
|
||||
})).map(s => s.thumbnail.constructor.name === 'NativeImage' && !s.thumbnail.isEmpty());
|
||||
|
||||
@@ -90,7 +89,7 @@ ifdescribe(!process.arch.includes('arm') && process.platform !== 'win32')('deskt
|
||||
await wShown;
|
||||
|
||||
const isEmpties: boolean[] = (await desktopCapturer.getSources({
|
||||
types: ['window', 'screen'],
|
||||
types: getSourceTypes(),
|
||||
thumbnailSize: { width: 0, height: 0 }
|
||||
})).map(s => s.thumbnail.constructor.name === 'NativeImage' && s.thumbnail.isEmpty());
|
||||
|
||||
@@ -99,29 +98,22 @@ ifdescribe(!process.arch.includes('arm') && process.platform !== 'win32')('deskt
|
||||
expect(isEmpties.every(e => e === true)).to.be.true();
|
||||
});
|
||||
|
||||
it('getMediaSourceId should match DesktopCapturerSource.id', async function () {
|
||||
const w = new BrowserWindow({ show: false, width: 100, height: 100, webPreferences: { contextIsolation: false } });
|
||||
const wShown = once(w, 'show');
|
||||
const wFocused = once(w, 'focus');
|
||||
w.show();
|
||||
w.focus();
|
||||
// Linux doesn't return any window sources.
|
||||
ifit(process.platform !== 'linux')('getMediaSourceId should match DesktopCapturerSource.id', async function () {
|
||||
const w2 = new BrowserWindow({ show: false, width: 100, height: 100, webPreferences: { contextIsolation: false } });
|
||||
const wShown = once(w2, 'show');
|
||||
const wFocused = once(w2, 'focus');
|
||||
w2.show();
|
||||
w2.focus();
|
||||
await wShown;
|
||||
await wFocused;
|
||||
|
||||
const mediaSourceId = w.getMediaSourceId();
|
||||
const mediaSourceId = w2.getMediaSourceId();
|
||||
const sources = await desktopCapturer.getSources({
|
||||
types: ['window'],
|
||||
thumbnailSize: { width: 0, height: 0 }
|
||||
});
|
||||
w.destroy();
|
||||
|
||||
// TODO(julien.isorce): investigate why |sources| is empty on the linux
|
||||
// bots while it is not on my workstation, as expected, with and without
|
||||
// the --ci parameter.
|
||||
if (process.platform === 'linux' && sources.length === 0) {
|
||||
this.skip();
|
||||
return;
|
||||
}
|
||||
w2.destroy();
|
||||
|
||||
expect(sources).to.be.an('array').that.is.not.empty();
|
||||
const foundSource = sources.find((source) => {
|
||||
@@ -130,18 +122,19 @@ ifdescribe(!process.arch.includes('arm') && process.platform !== 'win32')('deskt
|
||||
expect(mediaSourceId).to.equal(foundSource!.id);
|
||||
});
|
||||
|
||||
it('getSources should not incorrectly duplicate window_id', async function () {
|
||||
const w = new BrowserWindow({ show: false, width: 100, height: 100, webPreferences: { contextIsolation: false } });
|
||||
const wShown = once(w, 'show');
|
||||
const wFocused = once(w, 'focus');
|
||||
w.show();
|
||||
w.focus();
|
||||
// Linux doesn't return any window sources.
|
||||
ifit(process.platform !== 'linux')('getSources should not incorrectly duplicate window_id', async function () {
|
||||
const w2 = new BrowserWindow({ show: false, width: 100, height: 100, webPreferences: { contextIsolation: false } });
|
||||
const wShown = once(w2, 'show');
|
||||
const wFocused = once(w2, 'focus');
|
||||
w2.show();
|
||||
w2.focus();
|
||||
await wShown;
|
||||
await wFocused;
|
||||
|
||||
// ensure window_id isn't duplicated in getMediaSourceId,
|
||||
// which uses a different method than getSources
|
||||
const mediaSourceId = w.getMediaSourceId();
|
||||
const mediaSourceId = w2.getMediaSourceId();
|
||||
const ids = mediaSourceId.split(':');
|
||||
expect(ids[1]).to.not.equal(ids[2]);
|
||||
|
||||
@@ -149,15 +142,7 @@ ifdescribe(!process.arch.includes('arm') && process.platform !== 'win32')('deskt
|
||||
types: ['window'],
|
||||
thumbnailSize: { width: 0, height: 0 }
|
||||
});
|
||||
w.destroy();
|
||||
|
||||
// TODO(julien.isorce): investigate why |sources| is empty on the linux
|
||||
// bots while it is not on my workstation, as expected, with and without
|
||||
// the --ci parameter.
|
||||
if (process.platform === 'linux' && sources.length === 0) {
|
||||
this.skip();
|
||||
return;
|
||||
}
|
||||
w2.destroy();
|
||||
|
||||
expect(sources).to.be.an('array').that.is.not.empty();
|
||||
for (const source of sources) {
|
||||
@@ -168,19 +153,23 @@ ifdescribe(!process.arch.includes('arm') && process.platform !== 'win32')('deskt
|
||||
|
||||
// Regression test - see https://github.com/electron/electron/issues/43002
|
||||
it('does not affect window resizable state', async () => {
|
||||
const w = new BrowserWindow({ show: false, webPreferences: { nodeIntegration: true, contextIsolation: false } });
|
||||
await w.loadURL('about:blank');
|
||||
w.resizable = false;
|
||||
|
||||
const wShown = once(w, 'show');
|
||||
w.show();
|
||||
await wShown;
|
||||
|
||||
const sources = await desktopCapturer.getSources({ types: ['window', 'screen'] });
|
||||
const sources = await desktopCapturer.getSources({ types: getSourceTypes() });
|
||||
expect(sources).to.be.an('array').that.is.not.empty();
|
||||
|
||||
expect(w.resizable).to.be.false();
|
||||
await closeAllWindows();
|
||||
});
|
||||
|
||||
it('moveAbove should move the window at the requested place', async function () {
|
||||
// Linux doesn't return any window sources.
|
||||
ifit(process.platform !== 'linux')('moveAbove should move the window at the requested place', async function () {
|
||||
// DesktopCapturer.getSources() is guaranteed to return in the correct
|
||||
// z-order from foreground to background.
|
||||
const MAX_WIN = 4;
|
||||
@@ -220,15 +209,6 @@ ifdescribe(!process.arch.includes('arm') && process.platform !== 'win32')('deskt
|
||||
thumbnailSize: { width: 0, height: 0 }
|
||||
});
|
||||
|
||||
// TODO(julien.isorce): investigate why |sources| is empty on the linux
|
||||
// bots while it is not on my workstation, as expected, with and without
|
||||
// the --ci parameter.
|
||||
if (process.platform === 'linux' && sources.length === 0) {
|
||||
destroyWindows();
|
||||
this.skip();
|
||||
return;
|
||||
}
|
||||
|
||||
expect(sources).to.be.an('array').that.is.not.empty();
|
||||
expect(sources.length).to.gte(MAX_WIN);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user