diff --git a/scripts/test-integration.bat b/scripts/test-integration.bat index 0ce9c1ba30b..a28bb307fbd 100644 --- a/scripts/test-integration.bat +++ b/scripts/test-integration.bat @@ -46,7 +46,7 @@ if %errorlevel% neq 0 exit /b %errorlevel% :: Tests in the extension host -set ALL_PLATFORMS_API_TESTS_EXTRA_ARGS=--disable-telemetry --crash-reporter-directory=%VSCODECRASHDIR% --no-cached-data --disable-updates --disable-keytar --disable-extensions --user-data-dir=%VSCODEUSERDATADIR% +set ALL_PLATFORMS_API_TESTS_EXTRA_ARGS=--disable-telemetry --crash-reporter-directory=%VSCODECRASHDIR% --no-cached-data --disable-updates --disable-keytar --disable-extensions --disable-workspace-trust --user-data-dir=%VSCODEUSERDATADIR% call "%INTEGRATION_TEST_ELECTRON_PATH%" %~dp0\..\extensions\vscode-api-tests\testWorkspace --enable-proposed-api=vscode.vscode-api-tests --extensionDevelopmentPath=%~dp0\..\extensions\vscode-api-tests --extensionTestsPath=%~dp0\..\extensions\vscode-api-tests\out\singlefolder-tests %ALL_PLATFORMS_API_TESTS_EXTRA_ARGS% if %errorlevel% neq 0 exit /b %errorlevel% diff --git a/scripts/test-integration.sh b/scripts/test-integration.sh index 0b2fe97b17d..e147156da33 100755 --- a/scripts/test-integration.sh +++ b/scripts/test-integration.sh @@ -62,7 +62,7 @@ after_suite # Tests in the extension host -ALL_PLATFORMS_API_TESTS_EXTRA_ARGS="--disable-telemetry --crash-reporter-directory=$VSCODECRASHDIR --no-cached-data --disable-updates --disable-keytar --disable-extensions --user-data-dir=$VSCODEUSERDATADIR" +ALL_PLATFORMS_API_TESTS_EXTRA_ARGS="--disable-telemetry --crash-reporter-directory=$VSCODECRASHDIR --no-cached-data --disable-updates --disable-keytar --disable-extensions --disable-workspace-trust --user-data-dir=$VSCODEUSERDATADIR" "$INTEGRATION_TEST_ELECTRON_PATH" $LINUX_EXTRA_ARGS $ROOT/extensions/vscode-api-tests/testWorkspace --enable-proposed-api=vscode.vscode-api-tests --extensionDevelopmentPath=$ROOT/extensions/vscode-api-tests --extensionTestsPath=$ROOT/extensions/vscode-api-tests/out/singlefolder-tests $ALL_PLATFORMS_API_TESTS_EXTRA_ARGS after_suite diff --git a/src/vs/workbench/services/workspaces/common/workspaceTrust.ts b/src/vs/workbench/services/workspaces/common/workspaceTrust.ts index 7bfb5124c64..c070ebbb7e1 100644 --- a/src/vs/workbench/services/workspaces/common/workspaceTrust.ts +++ b/src/vs/workbench/services/workspaces/common/workspaceTrust.ts @@ -233,10 +233,6 @@ export class WorkspaceTrustManagementService extends Disposable implements IWork return this._remoteAuthority.options.isTrusted; } - if (this.environmentService.extensionTestsLocationURI) { - return true; // trust running tests with vscode-test - } - if (this.workspaceService.getWorkbenchState() === WorkbenchState.EMPTY) { // Use memento if present, otherwise default to restricted mode // Workspace may transition to trusted based on the opened editors diff --git a/test/automation/src/application.ts b/test/automation/src/application.ts index aec773a75b0..d620cb05a45 100644 --- a/test/automation/src/application.ts +++ b/test/automation/src/application.ts @@ -71,7 +71,6 @@ export class Application { async start(expectWalkthroughPart = true): Promise { await this._start(); await this.code.waitForElement('.explorer-folders-view'); - await this.dismissTrustDialog(); // https://github.com/microsoft/vscode/issues/118748 // if (expectWalkthroughPart) { @@ -84,20 +83,6 @@ export class Application { await new Promise(c => setTimeout(c, 1000)); await this._start(options.workspaceOrFolder, options.extraArgs); await this.code.waitForElement('.explorer-folders-view'); - await this.dismissTrustDialog(); - } - - private async dismissTrustDialog(): Promise { - if (this.options.web) { - return; - } - - try { - // Dismiss workspace trust dialog, if found - await this.code.waitAndClick(`.monaco-workbench .dialog-buttons-row a:nth-child(1)`, 10, 10, 50); - } catch { - // there musn't be any trust dialog, maybe workspace is trusted? - } } private async _start(workspaceOrFolder = this.workspacePathOrFolder, extraArgs: string[] = []): Promise { diff --git a/test/automation/src/code.ts b/test/automation/src/code.ts index aab14d1f0d5..8333471680a 100644 --- a/test/automation/src/code.ts +++ b/test/automation/src/code.ts @@ -140,6 +140,7 @@ export async function spawn(options: SpawnOptions): Promise { '--disable-updates', '--disable-keytar', '--disable-crash-reporter', + '--disable-workspace-trust', `--extensions-dir=${options.extensionsPath}`, `--user-data-dir=${options.userDataDir}`, '--driver', handle