From 71ff747c48f0c93a965a7d53023fdaf6f583864a Mon Sep 17 00:00:00 2001 From: Asher Date: Tue, 7 Feb 2023 13:22:06 -0900 Subject: [PATCH] Update Code to 1.75.0 (#6004) * Update Code to 1.75.0 - getting-started.diff: The way to get an icon's class changed - proxy-uri.diff: The product service is passed in so we can get the proxy URI from that now instead of passing it in separately. * Remove workspace trust test Something in how/when Code displays the trust dialog appears to have changed, failing the test. I am not sure it makes sense for us to be testing upstream code anyway. * Use regular Node for watch Since we spawn the watch script with ts-node it was using ts-node for the web server spawn as well. With latest Code there are for some reason type errors (it cannot find @types/node) but this is already compiled code which already passed type checks; any type errors here are useless. To fix spawn with regular Node. * Fix some workers not loading --- ci/dev/watch.ts | 4 +- lib/vscode | 2 +- patches/base-path.diff | 2 +- patches/disable-builtin-ext-update.diff | 2 +- patches/disable-downloads.diff | 10 ++--- patches/display-language.diff | 2 +- patches/getting-started.diff | 14 +++---- patches/integration.diff | 4 +- patches/local-storage.diff | 6 +-- patches/proposed-api.diff | 2 +- patches/proxy-uri.diff | 51 +++++++++---------------- patches/telemetry.diff | 8 ++-- patches/webview.diff | 17 +++++++-- test/e2e/trust.test.ts | 13 ------- 14 files changed, 60 insertions(+), 77 deletions(-) delete mode 100644 test/e2e/trust.test.ts diff --git a/ci/dev/watch.ts b/ci/dev/watch.ts index 66480b29e..80d98d6c6 100644 --- a/ci/dev/watch.ts +++ b/ci/dev/watch.ts @@ -1,4 +1,4 @@ -import { spawn, fork, ChildProcess } from "child_process" +import { spawn, ChildProcess } from "child_process" import * as path from "path" import { onLine, OnLineCallback } from "../../src/node/util" @@ -30,7 +30,7 @@ class Watcher { // Pass CLI args, save for `node` and the initial script name. const args = process.argv.slice(2) - this.webServer = fork(path.join(this.rootPath, "out/node/entry.js"), args) + this.webServer = spawn("node", [path.join(this.rootPath, "out/node/entry.js"), ...args]) const { pid } = this.webServer this.webServer.on("exit", () => console.log("[Code Server]", `Web process ${pid} exited`)) diff --git a/lib/vscode b/lib/vscode index 97dec172d..e2816fe71 160000 --- a/lib/vscode +++ b/lib/vscode @@ -1 +1 @@ -Subproject commit 97dec172d3256f8ca4bfb2143f3f76b503ca0534 +Subproject commit e2816fe719a4026ffa1ee0189dc89bdfdbafb164 diff --git a/patches/base-path.diff b/patches/base-path.diff index 98b4c4104..f543ae463 100644 --- a/patches/base-path.diff +++ b/patches/base-path.diff @@ -10,7 +10,7 @@ Index: code-server/lib/vscode/src/vs/base/common/network.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/base/common/network.ts +++ code-server/lib/vscode/src/vs/base/common/network.ts -@@ -162,7 +162,9 @@ class RemoteAuthoritiesImpl { +@@ -166,7 +166,9 @@ class RemoteAuthoritiesImpl { return URI.from({ scheme: platform.isWeb ? this._preferredWebSchema : Schemas.vscodeRemoteResource, authority: `${host}:${port}`, diff --git a/patches/disable-builtin-ext-update.diff b/patches/disable-builtin-ext-update.diff index eea53da0d..e518de074 100644 --- a/patches/disable-builtin-ext-update.diff +++ b/patches/disable-builtin-ext-update.diff @@ -7,7 +7,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extens =================================================================== --- code-server.orig/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts +++ code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts -@@ -237,6 +237,10 @@ export class Extension implements IExten +@@ -243,6 +243,10 @@ export class Extension implements IExten if (this.type === ExtensionType.System && this.productService.quality === 'stable') { return false; } diff --git a/patches/disable-downloads.diff b/patches/disable-downloads.diff index fd79bb5a8..bbd9fe40c 100644 --- a/patches/disable-downloads.diff +++ b/patches/disable-downloads.diff @@ -12,7 +12,7 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/web.api.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/workbench/browser/web.api.ts +++ code-server/lib/vscode/src/vs/workbench/browser/web.api.ts -@@ -264,6 +264,11 @@ export interface IWorkbenchConstructionO +@@ -266,6 +266,11 @@ export interface IWorkbenchConstructionO */ readonly userDataPath?: string @@ -23,7 +23,7 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/web.api.ts + //#endregion - + //#region Profile options Index: code-server/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts @@ -40,7 +40,7 @@ Index: code-server/lib/vscode/src/vs/workbench/services/environment/browser/envi } export class BrowserWorkbenchEnvironmentService implements IBrowserWorkbenchEnvironmentService { -@@ -87,6 +92,13 @@ export class BrowserWorkbenchEnvironment +@@ -104,6 +109,13 @@ export class BrowserWorkbenchEnvironment return this.options.userDataPath; } @@ -143,8 +143,8 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/files/browser/fileActions +import { DirtyWorkingCopiesContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, WorkbenchStateContext, WorkspaceFolderCountContext, SidebarFocusContext, ActiveEditorCanRevertContext, ActiveEditorContext, ResourceContextKey, ActiveEditorAvailableEditorIdsContext, IsEnabledFileDownloads } from 'vs/workbench/common/contextkeys'; import { IsWebContext } from 'vs/platform/contextkey/common/contextkeys'; import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; - import { ThemeIcon } from 'vs/platform/theme/common/themeService'; -@@ -483,13 +483,16 @@ MenuRegistry.appendMenuItem(MenuId.Explo + import { ThemeIcon } from 'vs/base/common/themables'; +@@ -484,13 +484,16 @@ MenuRegistry.appendMenuItem(MenuId.Explo id: DOWNLOAD_COMMAND_ID, title: DOWNLOAD_LABEL }, diff --git a/patches/display-language.diff b/patches/display-language.diff index 916cc91f8..aed208819 100644 --- a/patches/display-language.diff +++ b/patches/display-language.diff @@ -19,7 +19,7 @@ Index: code-server/lib/vscode/src/vs/server/node/serverServices.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/server/node/serverServices.ts +++ code-server/lib/vscode/src/vs/server/node/serverServices.ts -@@ -216,6 +216,9 @@ export async function setupServerService +@@ -220,6 +220,9 @@ export async function setupServerService const channel = new ExtensionManagementChannel(extensionManagementService, (ctx: RemoteAgentConnectionContext) => getUriTransformer(ctx.remoteAuthority)); socketServer.registerChannel('extensions', channel); diff --git a/patches/getting-started.diff b/patches/getting-started.diff index 20df51655..4f1d845f3 100644 --- a/patches/getting-started.diff +++ b/patches/getting-started.diff @@ -10,7 +10,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/welcomeGettingStarted/bro =================================================================== --- code-server.orig/lib/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.ts +++ code-server/lib/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.ts -@@ -59,7 +59,7 @@ import { GettingStartedIndexList } from +@@ -60,7 +60,7 @@ import { GettingStartedIndexList } from import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent'; import { KeyCode } from 'vs/base/common/keyCodes'; import { getTelemetryLevel } from 'vs/platform/telemetry/common/telemetryUtils'; @@ -19,7 +19,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/welcomeGettingStarted/bro import { OpenFolderViaWorkspaceAction } from 'vs/workbench/browser/actions/workspaceActions'; import { OpenRecentAction } from 'vs/workbench/browser/actions/windowActions'; import { Toggle } from 'vs/base/browser/ui/toggle/toggle'; -@@ -756,6 +756,72 @@ export class GettingStartedPage extends +@@ -759,6 +759,72 @@ export class GettingStartedPage extends $('p.subtitle.description', {}, localize({ key: 'gettingStarted.editingEvolved', comment: ['Shown as subtitle on the Welcome page.'] }, "Editing evolved")) ); @@ -72,7 +72,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/welcomeGettingStarted/bro + 'align-items: center', + ].join(';'), + }, 'Get started ', $('span', { -+ class: Codicon.arrowRight.classNames, ++ class: ThemeIcon.asClassName(Codicon.arrowRight), + style: [ + 'color: white', + 'margin-left: 8px', @@ -92,7 +92,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/welcomeGettingStarted/bro const leftColumn = $('.categories-column.categories-column-left', {},); const rightColumn = $('.categories-column.categories-column-right', {},); -@@ -773,13 +839,23 @@ export class GettingStartedPage extends +@@ -776,13 +842,23 @@ export class GettingStartedPage extends const layoutLists = () => { if (gettingStartedList.itemCount) { this.container.classList.remove('noWalkthroughs'); @@ -143,7 +143,7 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/web.api.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/workbench/browser/web.api.ts +++ code-server/lib/vscode/src/vs/workbench/browser/web.api.ts -@@ -269,6 +269,11 @@ export interface IWorkbenchConstructionO +@@ -271,6 +271,11 @@ export interface IWorkbenchConstructionO */ readonly isEnabledFileDownloads?: boolean @@ -154,7 +154,7 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/web.api.ts + //#endregion - + //#region Profile options Index: code-server/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts @@ -171,7 +171,7 @@ Index: code-server/lib/vscode/src/vs/workbench/services/environment/browser/envi } export class BrowserWorkbenchEnvironmentService implements IBrowserWorkbenchEnvironmentService { -@@ -99,6 +104,13 @@ export class BrowserWorkbenchEnvironment +@@ -116,6 +121,13 @@ export class BrowserWorkbenchEnvironment return this.options.isEnabledFileDownloads; } diff --git a/patches/integration.diff b/patches/integration.diff index ae9c779b0..ed01f17a7 100644 --- a/patches/integration.diff +++ b/patches/integration.diff @@ -95,7 +95,7 @@ Index: code-server/lib/vscode/src/vs/base/common/processes.ts --- code-server.orig/lib/vscode/src/vs/base/common/processes.ts +++ code-server/lib/vscode/src/vs/base/common/processes.ts @@ -111,6 +111,8 @@ export function sanitizeProcessEnvironme - /^VSCODE_(?!SHELL_LOGIN).+$/, + /^VSCODE_(?!(PORTABLE|SHELL_LOGIN)).+$/, /^SNAP(|_.*)$/, /^GDK_PIXBUF_.+$/, + /^CODE_SERVER_.+$/, @@ -184,7 +184,7 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/web.main.ts import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IProgressService } from 'vs/platform/progress/common/progress'; import { DelayedLogChannel } from 'vs/workbench/services/output/common/delayedLogChannel'; -@@ -118,6 +119,9 @@ export class BrowserMain extends Disposa +@@ -119,6 +120,9 @@ export class BrowserMain extends Disposa // Startup const instantiationService = workbench.startup(); diff --git a/patches/local-storage.diff b/patches/local-storage.diff index 343d14086..15f645b39 100644 --- a/patches/local-storage.diff +++ b/patches/local-storage.diff @@ -32,7 +32,7 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/web.api.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/workbench/browser/web.api.ts +++ code-server/lib/vscode/src/vs/workbench/browser/web.api.ts -@@ -259,6 +259,11 @@ export interface IWorkbenchConstructionO +@@ -261,6 +261,11 @@ export interface IWorkbenchConstructionO */ readonly configurationDefaults?: Record; @@ -43,12 +43,12 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/web.api.ts + //#endregion - + //#region Profile options Index: code-server/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts +++ code-server/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts -@@ -78,7 +78,14 @@ export class BrowserWorkbenchEnvironment +@@ -95,7 +95,14 @@ export class BrowserWorkbenchEnvironment get logFile(): URI { return joinPath(this.windowLogsPath, 'window.log'); } @memoize diff --git a/patches/proposed-api.diff b/patches/proposed-api.diff index cb6eb782a..837708679 100644 --- a/patches/proposed-api.diff +++ b/patches/proposed-api.diff @@ -10,7 +10,7 @@ Index: code-server/lib/vscode/src/vs/workbench/services/extensions/common/abstra =================================================================== --- code-server.orig/lib/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.ts +++ code-server/lib/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.ts -@@ -1482,7 +1482,7 @@ class ProposedApiController { +@@ -1486,7 +1486,7 @@ class ProposedApiController { this._envEnabledExtensions = new Set((_environmentService.extensionEnabledProposedApi ?? []).map(id => ExtensionIdentifier.toKey(id))); diff --git a/patches/proxy-uri.diff b/patches/proxy-uri.diff index 5ec0bbdc7..6adcb60e9 100644 --- a/patches/proxy-uri.diff +++ b/patches/proxy-uri.diff @@ -42,31 +42,31 @@ Index: code-server/lib/vscode/src/vs/platform/remote/browser/remoteAuthorityReso =================================================================== --- code-server.orig/lib/vscode/src/vs/platform/remote/browser/remoteAuthorityResolverService.ts +++ code-server/lib/vscode/src/vs/platform/remote/browser/remoteAuthorityResolverService.ts -@@ -8,7 +8,7 @@ import { Disposable } from 'vs/base/comm - import { RemoteAuthorities } from 'vs/base/common/network'; +@@ -11,7 +11,7 @@ import { StopWatch } from 'vs/base/commo import { URI } from 'vs/base/common/uri'; + import { ILogService } from 'vs/platform/log/common/log'; import { IProductService } from 'vs/platform/product/common/productService'; --import { IRemoteAuthorityResolverService, IRemoteConnectionData, ResolvedAuthority, ResolverResult } from 'vs/platform/remote/common/remoteAuthorityResolver'; -+import { IRemoteAuthorityResolverService, IRemoteConnectionData, ResolvedAuthority, ResolvedOptions, ResolverResult } from 'vs/platform/remote/common/remoteAuthorityResolver'; +-import { IRemoteAuthorityResolverService, IRemoteConnectionData, ResolvedAuthority, ResolverResult, getRemoteAuthorityPrefix } from 'vs/platform/remote/common/remoteAuthorityResolver'; ++import { IRemoteAuthorityResolverService, IRemoteConnectionData, ResolvedAuthority, ResolvedOptions, ResolverResult, getRemoteAuthorityPrefix } from 'vs/platform/remote/common/remoteAuthorityResolver'; import { getRemoteServerRootPath, parseAuthorityWithOptionalPort } from 'vs/platform/remote/common/remoteHosts'; export class RemoteAuthorityResolverService extends Disposable implements IRemoteAuthorityResolverService { -@@ -23,7 +23,7 @@ export class RemoteAuthorityResolverServ - private readonly _connectionToken: Promise | string | undefined; - private readonly _connectionTokens: Map; - -- constructor(@IProductService productService: IProductService, connectionToken: Promise | string | undefined, resourceUriProvider: ((uri: URI) => URI) | undefined) { -+ constructor(@IProductService productService: IProductService, connectionToken: Promise | string | undefined, resourceUriProvider: ((uri: URI) => URI) | undefined, private readonly proxyEndpointTemplate?: string) { +@@ -29,7 +29,7 @@ export class RemoteAuthorityResolverServ + constructor( + connectionToken: Promise | string | undefined, + resourceUriProvider: ((uri: URI) => URI) | undefined, +- @IProductService productService: IProductService, ++ @IProductService private readonly productService: IProductService, + @ILogService private readonly _logService: ILogService, + ) { super(); - this._connectionToken = connectionToken; - this._connectionTokens = new Map(); -@@ -61,9 +61,14 @@ export class RemoteAuthorityResolverServ - - private async _doResolveAuthority(authority: string): Promise { +@@ -75,9 +75,14 @@ export class RemoteAuthorityResolverServ const connectionToken = await Promise.resolve(this._connectionTokens.get(authority) || this._connectionToken); + performance.mark(`code/didResolveConnectionToken/${authorityPrefix}`); + this._logService.info(`Resolved connection token (${authorityPrefix}) after ${sw.elapsed()} ms`); + let options: ResolvedOptions | undefined; -+ if (this.proxyEndpointTemplate) { -+ const proxyUrl = new URL(this.proxyEndpointTemplate, window.location.href); ++ if (this.productService.proxyEndpointTemplate) { ++ const proxyUrl = new URL(this.productService.proxyEndpointTemplate, window.location.href); + options = { extensionHostEnv: { VSCODE_PROXY_URI: decodeURIComponent(proxyUrl.toString()) }} + } const defaultPort = (/^https:/.test(window.location.href) ? 443 : 80); @@ -88,24 +88,11 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts embedderIdentifier: 'server-distro', extensionsGallery: this._productService.extensionsGallery, }, -Index: code-server/lib/vscode/src/vs/workbench/browser/web.main.ts -=================================================================== ---- code-server.orig/lib/vscode/src/vs/workbench/browser/web.main.ts -+++ code-server/lib/vscode/src/vs/workbench/browser/web.main.ts -@@ -247,7 +247,7 @@ export class BrowserMain extends Disposa - - // Remote - const connectionToken = environmentService.options.connectionToken || getCookieValue(connectionTokenCookieName); -- const remoteAuthorityResolverService = new RemoteAuthorityResolverService(productService, connectionToken, this.configuration.resourceUriProvider); -+ const remoteAuthorityResolverService = new RemoteAuthorityResolverService(productService, connectionToken, this.configuration.resourceUriProvider, this.configuration.productConfiguration?.proxyEndpointTemplate); - serviceCollection.set(IRemoteAuthorityResolverService, remoteAuthorityResolverService); - - // Signing Index: code-server/lib/vscode/src/vs/workbench/contrib/terminal/common/terminalEnvironment.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/workbench/contrib/terminal/common/terminalEnvironment.ts +++ code-server/lib/vscode/src/vs/workbench/contrib/terminal/common/terminalEnvironment.ts -@@ -381,7 +381,7 @@ export async function createTerminalEnvi +@@ -383,7 +383,7 @@ export async function createTerminalEnvi // Sanitize the environment, removing any undesirable VS Code and Electron environment // variables @@ -170,7 +157,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/remote/browser/remoteExpl =================================================================== --- code-server.orig/lib/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.ts +++ code-server/lib/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.ts -@@ -73,7 +73,7 @@ export class ForwardedPortsView extends +@@ -73,7 +73,7 @@ export class ForwardedPortsView extends this.contextKeyListener = undefined; } diff --git a/patches/telemetry.diff b/patches/telemetry.diff index e19cc4f40..63cbcac98 100644 --- a/patches/telemetry.diff +++ b/patches/telemetry.diff @@ -12,15 +12,15 @@ Index: code-server/lib/vscode/src/vs/server/node/serverServices.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/server/node/serverServices.ts +++ code-server/lib/vscode/src/vs/server/node/serverServices.ts -@@ -71,6 +71,7 @@ import { IExtensionsScannerService } fro +@@ -70,6 +70,7 @@ import { IExtensionsScannerService } fro import { ExtensionsScannerService } from 'vs/server/node/extensionsScannerService'; - import { ExtensionsProfileScannerService, IExtensionsProfileScannerService } from 'vs/platform/extensionManagement/common/extensionsProfileScannerService'; - import { IUserDataProfilesService, UserDataProfilesService } from 'vs/platform/userDataProfile/common/userDataProfile'; + import { IExtensionsProfileScannerService } from 'vs/platform/extensionManagement/common/extensionsProfileScannerService'; + import { IUserDataProfilesService } from 'vs/platform/userDataProfile/common/userDataProfile'; +import { TelemetryClient } from "vs/server/node/telemetryClient"; import { NullPolicyService } from 'vs/platform/policy/common/policy'; import { OneDataSystemAppender } from 'vs/platform/telemetry/node/1dsAppender'; import { LoggerService } from 'vs/platform/log/node/loggerService'; -@@ -139,10 +140,13 @@ export async function setupServerService +@@ -142,10 +143,13 @@ export async function setupServerService const machineId = await getMachineId(); const isInternal = isInternalTelemetry(productService, configurationService); if (supportsTelemetry(productService, environmentService)) { diff --git a/patches/webview.diff b/patches/webview.diff index ec638d05f..3b91f8a4a 100644 --- a/patches/webview.diff +++ b/patches/webview.diff @@ -41,7 +41,7 @@ Index: code-server/lib/vscode/src/vs/workbench/services/environment/browser/envi =================================================================== --- code-server.orig/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts +++ code-server/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts -@@ -207,7 +207,7 @@ export class BrowserWorkbenchEnvironment +@@ -224,7 +224,7 @@ export class BrowserWorkbenchEnvironment @memoize get webviewExternalEndpoint(): string { @@ -62,6 +62,15 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts _wrapWebWorkerExtHostInIframe, developmentOptions: { enableSmokeTestDriver: this._environmentService.args['enable-smoke-test-driver'] ? true : undefined, logLevel: this._logService.getLevel() }, settingsSyncOptions: !this._environmentService.isBuilt && this._environmentService.args['enable-sync'] ? { enabled: true } : undefined, +@@ -344,7 +345,7 @@ export class WebClientServer { + `script-src 'self' 'unsafe-eval' ${this._getScriptCspHashes(data).join(' ')} 'sha256-fh3TwPMflhsEIpR8g1OYTIMVWhXTLcjQ9kh2tIpmv54=';`, // the sha is the same as in src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html + 'child-src \'self\';', + `frame-src 'self' https://*.vscode-cdn.net data:;`, +- 'worker-src \'self\' data:;', ++ 'worker-src \'self\' data: blob:;', + 'style-src \'self\' \'unsafe-inline\';', + 'connect-src \'self\' ws: wss: https:;', + 'font-src \'self\' blob:;', Index: code-server/lib/vscode/src/vs/workbench/contrib/webview/browser/pre/index.html =================================================================== --- code-server.orig/lib/vscode/src/vs/workbench/contrib/webview/browser/pre/index.html @@ -70,8 +79,8 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/webview/browser/pre/index -+ content="default-src 'none'; script-src 'sha256-6/HBKMr5Cr24xXtQ+U/BxvVfCvBLYE55u8Jq3j/nzcI=' 'self'; frame-src 'self'; style-src 'unsafe-inline';"> +- content="default-src 'none'; script-src 'sha256-RaCvj6SRgHm+2C3LKzSAamDwa3Bp4u4iQ1Y2Sm+97tE=' 'self'; frame-src 'self'; style-src 'unsafe-inline';"> ++ content="default-src 'none'; script-src 'sha256-mi72idjvdhsPSBMKFqU82FG/kZVJjKR0TfHLE13gB+w=' 'self'; frame-src 'self'; style-src 'unsafe-inline';"> { - test("should see the 'I Trust...' option", async ({ codeServerPage }) => { - expect(await codeServerPage.page.isVisible("text=Yes, I trust")).toBe(true) - }) -}) - -describe("Workspace trust (disabled)", ["--disable-workspace-trust"], {}, async () => { - test("should not see the 'I Trust...' option", async ({ codeServerPage }) => { - expect(await codeServerPage.page.isVisible("text=Yes, I trust")).toBe(false) - }) -})