Skip to content

Add --hidden-window to run extension tests without showing a window - #344174

Merged
Dmitriy Vasyura (dmitrivMS) merged 14 commits into
microsoft:mainfrom
trivikr:test-extension-without-window-macos
Nov 12, 2026
Merged

Dmitriy Vasyura (dmitrivMS) merged 14 commits into
microsoft:mainfrom
trivikr:test-extension-without-window-macos

Conversation

@trivikr

@trivikr Trivikram Kamat (trivikr) commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Fixes: #341594

Adds --hidden-window. It only takes effect together with --extensionTestsPath, so extension tests can run on macOS without showing a window or stealing focus.

When it's set:

  • Workbench and auxiliary windows are created with show: false and background throttling disabled, including when it's changed at runtime. Pages still report visible, and timers and requestAnimationFrame keep running.
  • Maximized and fullscreen windows are sized to the display's work area or full bounds instead of calling maximize() or setFullScreen(), which would show them.
  • Calls that would show or activate a window do nothing: focus, move to top, maximize, toggle fullscreen, DevTools (including --open-devtools), and the GPU info and content tracing windows. On macOS, the app isn't activated on a second-instance launch, and clicking the Dock icon doesn't open a new window.

Known limitations:

  • vscode.window.state.focused is false, and commands that need keyboard focus (such as type) do nothing.
  • No window gets DOM focus, so the active editor group is always in the main window. After workbench.action.moveEditorToNewWindow, commands like workbench.action.closeActiveEditor act on the main window's editor. Calling webContents.focus() instead doesn't help: windows never lose focus, so routing breaks again after switching windows.
  • Maximized and fullscreen windows report isMaximized() and isFullScreen() as false. The workbench therefore keeps its title bar instead of switching to its fullscreen layout.
  • Launches forwarded to an already-running instance that wasn't started with --hidden-window aren't hidden.

How to test

On macOS, run an extension test with and without the flag:

./scripts/code.sh --extensionDevelopmentPath=<ext> --extensionTestsPath=<test.js> --hidden-window
Without flag With --hidden-window
Windows on screen 1 0
Webview drew a frame, reported visible yes yes
20 × 50 ms timers 1021 ms 1020 ms
window.state.focused true false

Added unit tests for isHiddenWindowMode, hidden-mode applyState, focus() and toggleFullScreen(), runtime background throttling, and the auxiliary window mode used at creation and claim.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Native state restoration and CLI activation can still reveal or focus hidden windows, while auxiliary windows can receive an incorrect maximized state.

3 open issues
What changed in this PR

Adds --hidden-window for extension test runs, aiming to prevent visible windows and focus interruptions while keeping rendering and timers active.

Changes:

  • Registers the flag and honors it only with --extensionTestsPath.
  • Disables initial window visibility and background throttling, and guards explicit show/focus operations.
  • Adds unit tests for flag gating, state restoration, and focus suppression.
File Description
src/​vs/​platform/​windows/​test/​electron-main/​windowImpl.test.ts Tests hidden-mode gating and window behavior.
src/​vs/​platform/​windows/​electron-main/​windows.ts Adds the hidden-mode helper and browser-window options.
src/​vs/​platform/​windows/​electron-main/​windowImpl.ts Guards explicit show and focus calls.
src/​vs/​platform/​environment/​node/​argv.ts Registers the boolean CLI option.
src/​vs/​platform/​environment/​common/​argv.ts Adds the typed CLI argument.

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Runtime fullscreen and maximize operations bypass hidden-mode protection and can still reveal test windows.

1 open issue
3 resolved since last review

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The runtime throttling setter can undo hidden mode’s disabled throttling after workbench restore, undermining its rendering guarantees.

1 open issue

Review effort: Balanced

@trivikr
Trivikram Kamat (trivikr) force-pushed the test-extension-without-window-macos branch from 78ad076 to 141a723 Compare November 2, 2026 20:47
When passed together with --extensionTestsPath, workbench windows are
created with `show: false` and background throttling disabled, are not
shown after restoring a maximized/fullscreen state, and ignore focus
requests, so test runs on macOS no longer steal focus. Rendering stays
enabled; `vscode.window.state.focused` reports false.
maximize() and setFullScreen() reveal a window that was never shown,
so skipping only the trailing show() was not enough. Test windows can
still start maximized or fullscreen via window.newWindowDimensions.
In hidden mode, applyState now returns before either call and keeps
the default bounds.
LaunchMainService.start called app.focus({ steal: true }) on macOS
whenever another instance forwarded its arguments, which could bring a
--hidden-window extension test instance to the front. Skip it when
isHiddenWindowMode is true; windows it opens are already hidden.
toggleFullScreen (e.g. workbench.action.toggleFullScreen, Zen Mode) and
nativeHostMainService.maximizeWindow reveal a never-shown window, and
native fullscreen on macOS also switches Spaces. Return early from both
in hidden mode. The guard sits in toggleFullScreen rather than
setFullScreen so the renderer is not told about a fullscreen change
that never happened.
AuxiliaryWindow inferred Maximized from `show === false`, which
--hidden-window sets for every window. Carry the requested mode through
pendingWindowOptionsQueue instead and fall back to the inference only
when no queue entry exists. Fullscreen still restores as maximized, so
behavior outside hidden mode is unchanged.
ChatSuspendThrottlingHandler calls setBackgroundThrottling(true) at
startup when chat is idle, and NativeHostMainService forwarded it
unconditionally, overriding the creation-time setting for
--hidden-window windows. Route the value through
isBackgroundThrottlingAllowed, which keeps throttling disabled in
hidden mode.
@trivikr
Trivikram Kamat (trivikr) force-pushed the test-extension-without-window-macos branch from 141a723 to bdf280a Compare November 9, 2026 08:08
@trivikr

Copy link
Copy Markdown
Contributor Author

cc Connor Peet (@connor4312) Does this change look good?

@connor4312 Connor Peet (connor4312) left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! While validating this my agent found a case where the window could be revealed even if initially launched with a hidden window:


[P2] Auxiliary editor windows still become visible in hidden mode

I reproduced this on macOS with Electron 43.8.6, including a visual confirmation of both windows on the desktop. The initial main window stays hidden, but workbench.action.moveEditorToNewWindow makes the auxiliary editor visible. Opening a file through a second CLI invocation afterward also reveals the main window.

This is not the earlier unconditional app.focus() issue: a secondary CLI invocation before creating an auxiliary window stays hidden. Forced window focus and fullscreen requests also stayed hidden in the tests.

What is failing

The constructor overrides in defaultBrowserWindowOptions do not enforce the hidden-mode contract through the actual auxiliary-editor lifecycle:

  • Auxiliary windows originate from renderer window.open('about:blank', ...). I observed did-create-window receiving show: false and webPreferences.backgroundThrottling: false. The child is initially invisible at that event, but becomes visible as the editor is opened. The native BaseWindow.focus() guard therefore does not cover the whole path. I have not isolated the final native activation callback responsible for showing it, so I would not attribute that to the CLI's app.focus() call.
  • There is also a concrete throttling problem: the auxiliary WebContents already has backgroundThrottling === true at did-create-window, despite the override being false. Electron creates the popup WebContents before wrapping it in a BrowserWindow. Its existing-WebContents reuse path updates stored preferences but does not call SetBackgroundThrottling; the adopted WebContents retains its native default. Hidden auxiliary windows need the runtime setting applied to the actual WebContents, not only the constructor dictionary.

Please cover real auxiliary creation/editor activation and the subsequent file-open path. The added “normal hidden auxiliary window” test exercises a stubbed TestWindow.applyState(), not an actual window.open/AuxiliaryWindow lifecycle, so it passes while this reproduces.

Minimal repro

Use any valid minimal extension development folder, and save this as repro.cjs inside it:

const vscode = require('vscode');
const delay = ms => new Promise(resolve => setTimeout(resolve, ms));

exports.run = async () => {
	const document = await vscode.workspace.openTextDocument({
		content: 'This auxiliary editor should never appear on screen.'
	});
	await vscode.window.showTextDocument(document);
	await delay(3000); // The main window should still be invisible.
	await vscode.commands.executeCommand('workbench.action.moveEditorToNewWindow');
	await delay(30000); // Keep the test instance alive for the second CLI invocation.
};

From the built checkout, launch it with fresh, isolated directories:

probe=$(mktemp -d)
mkdir -p "$probe/workspace"
printf 'CLI visibility repro\n' > "$probe/workspace/cli.txt"
echo "Use this same probe directory in the second terminal: $probe"

env -u ELECTRON_RUN_AS_NODE VSCODE_SKIP_PRELAUNCH=1 ./scripts/code.sh \
	"$probe/workspace" \
	--user-data-dir="$probe/profile" \
	--extensions-dir="$probe/extensions" \
	--shared-data-dir="$probe/shared-data" \
	--extensionDevelopmentPath=/absolute/path/to/extension \
	--extensionTestsPath=/absolute/path/to/extension/repro.cjs \
	--hidden-window --disable-extensions --disable-workspace-trust \
	--skip-welcome --skip-release-notes

While the test is in its final 30-second delay, run this in another terminal, substituting the same probe directory printed above:

probe=/the/probe/directory/printed/above
env -u ELECTRON_RUN_AS_NODE VSCODE_SKIP_PRELAUNCH=1 ./scripts/code.sh \
	--user-data-dir="$probe/profile" \
	--shared-data-dir="$probe/shared-data" \
	--reuse-window "$probe/workspace/cli.txt"

Expected: neither window is ever visible; both WebContents remain unthrottled.

Actual: the auxiliary editor appears after the move command, with background throttling enabled; the second CLI open then reveals the main window too.

This was reduced to just showing an untitled document, moving it to a new window, and opening a file via CLI; the earlier webview/focus/fullscreen steps are not required. The visibility failures also reproduced without renderer automation attached. All test instances were isolated and closed afterward.

Auxiliary windows are created by window.open, so Electron creates their
WebContents before the BrowserWindow and does not apply the
`backgroundThrottling: false` constructor option to it. In hidden mode,
turn throttling off on the actual WebContents when the auxiliary window
is claimed.
BrowserWindow.moveTop() reveals a hidden window on macOS. The workbench
calls it when an editor is activated, so moving an editor to a new
window showed the auxiliary window, and a later file open from the CLI
showed the main window. In hidden mode, moveWindowTop now does nothing.
@trivikr

Copy link
Copy Markdown
Contributor Author

Thanks for the review! Both issues are fixed:

  • Throttling: c253dff turns off background throttling on the auxiliary window's WebContents when the window is claimed, since Electron ignores the backgroundThrottling constructor option for window.open popups.
  • Visibility: The window was revealed by BrowserWindow.moveTop(), which the workbench calls when an editor is activated (editorPart.ts, editorPanes.ts). That covers both the auxiliary editor and the main window on the later CLI open. 38719ea makes moveWindowTop do nothing in hidden mode.

With your repro on macOS (Electron 43.8.6), both windows now stay hidden through the editor move and the second CLI open, and both WebContents stay unthrottled.

On tests: the extension API can't see native visibility or throttling, so an integration test in vscode-api-tests can't catch this. A smoke test can, because the Playwright driver can check BrowserWindow.isVisible() in the main process. It needs a custom launch with --extensionTestsPath and --hidden-window, though. Do you want that in this PR or a follow-up?

Dominik Jelínek (djelinek) added a commit to djelinek/vscode-extension-tester that referenced this pull request Nov 25, 2026
VS Code 1.147.0 added a --hidden-window CLI flag (microsoft/vscode#344174)
that keeps every window hidden and unfocused. ExTester now exposes it as
--hidden_window on run-tests and setup-and-run, run.hiddenWindow in
extester.config.json, and the EXTESTER_HIDDEN_WINDOW environment variable,
so a local run no longer takes over the user's screen.

VS Code honours the flag only while running extension tests, so ExTester
also passes --extensionTestsPath with a generated runner whose run() never
settles (VS Code exits when the runner settles), plus a manifest-only
development path when EXTENSION_DEV_PATH is not set. Releases before
1.147.0 print a warning and launch visibly as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SiFCcXrV2iw6iRrgqkeVfu
Signed-off-by: Dominik Jelínek <djelinek@redhat.com>
Dominik Jelínek (djelinek) added a commit to djelinek/vscode-extension-tester that referenced this pull request Nov 25, 2026
VS Code 1.147.0 added a --hidden-window CLI flag (microsoft/vscode#344174)
that keeps every window hidden and unfocused. ExTester now exposes it as
--hidden_window on run-tests and setup-and-run, run.hiddenWindow in
extester.config.json, and the EXTESTER_HIDDEN_WINDOW environment variable,
so a local run no longer takes over the user's screen.

VS Code honours the flag only while running extension tests, so ExTester
also passes --extensionTestsPath with a generated runner whose run() never
settles (VS Code exits when the runner settles), plus a manifest-only
development path when EXTENSION_DEV_PATH is not set. Releases before
1.147.0 print a warning and launch visibly as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SiFCcXrV2iw6iRrgqkeVfu
Signed-off-by: Dominik Jelínek <djelinek@redhat.com>
Dominik Jelínek (djelinek) added a commit to djelinek/vscode-extension-tester that referenced this pull request Nov 25, 2026
VS Code 1.147.0 added a --hidden-window CLI flag (microsoft/vscode#344174)
that keeps every window hidden and unfocused. ExTester now exposes it as
--hidden_window on run-tests and setup-and-run, run.hiddenWindow in
extester.config.json, and the EXTESTER_HIDDEN_WINDOW environment variable,
so a local run no longer takes over the user's screen.

VS Code honours the flag only while running extension tests, so ExTester
also passes --extensionTestsPath with a generated runner whose run() never
settles (VS Code exits when the runner settles), plus a manifest-only
development path when EXTENSION_DEV_PATH is not set. Releases before
1.147.0 print a warning and launch visibly as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SiFCcXrV2iw6iRrgqkeVfu
Signed-off-by: Dominik Jelínek <djelinek@redhat.com>
Dominik Jelínek (djelinek) added a commit to djelinek/vscode-extension-tester that referenced this pull request Nov 25, 2026
… showing VS Code

VS Code 1.147.0 added a --hidden-window CLI flag (microsoft/vscode#344174)
that keeps every window hidden and unfocused. ExTester now exposes it as
--hidden_window on run-tests and setup-and-run, run.hiddenWindow in
extester.config.json, and the EXTESTER_HIDDEN_WINDOW environment variable,
so a local run no longer takes over the user's screen. The option is
marked experimental in the CLI help, the config schema and the docs.

VS Code honours the flag only while running extension tests, so ExTester
also passes --extensionTestsPath with a generated runner whose run() never
settles (VS Code exits when the runner settles), plus a manifest-only
development path when EXTENSION_DEV_PATH is not set. Releases before
1.147.0 print a warning and launch visibly as before.

Extension test mode cannot switch the window to another folder (VS Code
exits), so in hidden mode openResources() with a folder or .code-workspace
restarts VS Code with the resources as launch arguments and moves the new
WebDriver session into the existing driver object. VSBrowser.isHiddenWindow
lets suites skip what test mode cannot do (dialogs are never shown); the
test project's dialog suite and close-folder hook use it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SiFCcXrV2iw6iRrgqkeVfu
Signed-off-by: Dominik Jelínek <djelinek@redhat.com>
Dominik Jelínek (djelinek) added a commit to djelinek/vscode-extension-tester that referenced this pull request Nov 25, 2026
… showing VS Code

VS Code 1.147.0 added a --hidden-window CLI flag (microsoft/vscode#344174)
that keeps every window hidden and unfocused. ExTester now exposes it as
--hidden_window on run-tests and setup-and-run, run.hiddenWindow in
extester.config.json, and the EXTESTER_HIDDEN_WINDOW environment variable,
so a local run no longer takes over the user's screen. The option is
marked experimental in the CLI help, the config schema and the docs.

VS Code honours the flag only while running extension tests, so ExTester
also passes --extensionTestsPath with a generated runner whose run() never
settles (VS Code exits when the runner settles), plus a manifest-only
development path when EXTENSION_DEV_PATH is not set. Releases before
1.147.0 print a warning and launch visibly as before.

Extension test mode cannot switch the window to another folder (VS Code
exits), so in hidden mode openResources() with a folder or .code-workspace
restarts VS Code with the resources as launch arguments and moves the new
WebDriver session into the existing driver object. VSBrowser.isHiddenWindow
lets suites skip what test mode cannot do (dialogs are never shown); the
test project's dialog suite and close-folder hook use it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SiFCcXrV2iw6iRrgqkeVfu
Signed-off-by: Dominik Jelínek <djelinek@redhat.com>
Dominik Jelínek (djelinek) added a commit to djelinek/vscode-extension-tester that referenced this pull request Nov 25, 2026
… showing VS Code

VS Code 1.147.0 added a --hidden-window CLI flag (microsoft/vscode#344174)
that keeps every window hidden and unfocused. ExTester now exposes it as
--hidden_window on run-tests and setup-and-run, run.hiddenWindow in
extester.config.json, and the EXTESTER_HIDDEN_WINDOW environment variable,
so a local run no longer takes over the user's screen. The option is
marked experimental in the CLI help, the config schema and the docs.

VS Code honours the flag only while running extension tests, so ExTester
also passes --extensionTestsPath with a generated runner whose run() never
settles (VS Code exits when the runner settles), plus a manifest-only
development path when EXTENSION_DEV_PATH is not set. Releases before
1.147.0 print a warning and launch visibly as before.

Extension test mode cannot switch the window to another folder (VS Code
exits), so in hidden mode openResources() with a folder or .code-workspace
restarts VS Code with the resources as launch arguments and moves the new
WebDriver session into the existing driver object. VSBrowser.isHiddenWindow
lets suites skip what test mode cannot do (dialogs are never shown); the
test project's dialog suite and close-folder hook use it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SiFCcXrV2iw6iRrgqkeVfu
Signed-off-by: Dominik Jelínek <djelinek@redhat.com>
Dominik Jelínek (djelinek) added a commit to djelinek/vscode-extension-tester that referenced this pull request Nov 25, 2026
… showing VS Code

VS Code 1.147.0 added a --hidden-window CLI flag (microsoft/vscode#344174)
that keeps every window hidden and unfocused. ExTester now exposes it as
--hidden_window on run-tests and setup-and-run, run.hiddenWindow in
extester.config.json, and the EXTESTER_HIDDEN_WINDOW environment variable,
so a local run no longer takes over the user's screen. The option is
marked experimental in the CLI help, the config schema and the docs.

VS Code honours the flag only while running extension tests, so ExTester
also passes --extensionTestsPath with a generated runner whose run() never
settles (VS Code exits when the runner settles), plus a manifest-only
development path when EXTENSION_DEV_PATH is not set. Releases before
1.147.0 print a warning and launch visibly as before.

Extension test mode cannot switch the window to another folder (VS Code
exits), so in hidden mode openResources() with a folder or .code-workspace
restarts VS Code with the resources as launch arguments and moves the new
WebDriver session into the existing driver object. VSBrowser.isHiddenWindow
lets suites skip what test mode cannot do (dialogs are never shown); the
test project's dialog suite and close-folder hook use it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SiFCcXrV2iw6iRrgqkeVfu
Signed-off-by: Dominik Jelínek <djelinek@redhat.com>
Dominik Jelínek (djelinek) added a commit to djelinek/vscode-extension-tester that referenced this pull request Nov 25, 2026
… showing VS Code

VS Code 1.147.0 added a --hidden-window CLI flag (microsoft/vscode#344174)
that keeps every window hidden and unfocused. ExTester now exposes it as
--hidden_window on run-tests and setup-and-run, run.hiddenWindow in
extester.config.json, and the EXTESTER_HIDDEN_WINDOW environment variable,
so a local run no longer takes over the user's screen. The option is
marked experimental in the CLI help, the config schema and the docs.

VS Code honours the flag only while running extension tests, so ExTester
also passes --extensionTestsPath with a generated runner whose run() never
settles (VS Code exits when the runner settles), plus a manifest-only
development path when EXTENSION_DEV_PATH is not set. Releases before
1.147.0 print a warning and launch visibly as before.

Extension test mode cannot switch the window to another folder (VS Code
exits), so in hidden mode openResources() with a folder or .code-workspace
restarts VS Code with the resources as launch arguments and moves the new
WebDriver session into the existing driver object. VSBrowser.isHiddenWindow
lets suites skip what test mode cannot do (dialogs are never shown); the
test project's dialog suite and close-folder hook use it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SiFCcXrV2iw6iRrgqkeVfu
Signed-off-by: Dominik Jelínek <djelinek@redhat.com>
Dominik Jelínek (djelinek) added a commit to djelinek/vscode-extension-tester that referenced this pull request Nov 25, 2026
… showing VS Code

VS Code 1.147.0 added a --hidden-window CLI flag (microsoft/vscode#344174)
that keeps every window hidden and unfocused. ExTester now exposes it as
--hidden_window on run-tests and setup-and-run, run.hiddenWindow in
extester.config.json, and the EXTESTER_HIDDEN_WINDOW environment variable,
so a local run no longer takes over the user's screen. The option is
marked experimental in the CLI help, the config schema and the docs.

VS Code honours the flag only while running extension tests, so ExTester
also passes --extensionTestsPath with a generated runner whose run() never
settles (VS Code exits when the runner settles), plus a manifest-only
development path when EXTENSION_DEV_PATH is not set. Releases before
1.147.0 print a warning and launch visibly as before.

Extension test mode cannot switch the window to another folder (VS Code
exits), so in hidden mode openResources() with a folder or .code-workspace
restarts VS Code with the resources as launch arguments and moves the new
WebDriver session into the existing driver object. VSBrowser.isHiddenWindow
lets suites skip what test mode cannot do (dialogs are never shown); the
test project's dialog suite and close-folder hook use it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SiFCcXrV2iw6iRrgqkeVfu
Signed-off-by: Dominik Jelínek <djelinek@redhat.com>
Dominik Jelínek (djelinek) added a commit to djelinek/vscode-extension-tester that referenced this pull request Nov 25, 2026
… showing VS Code

VS Code 1.147.0 added a --hidden-window CLI flag (microsoft/vscode#344174)
that keeps every window hidden and unfocused. ExTester now exposes it as
--hidden_window on run-tests and setup-and-run, run.hiddenWindow in
extester.config.json, and the EXTESTER_HIDDEN_WINDOW environment variable,
so a local run no longer takes over the user's screen. The option is
marked experimental in the CLI help, the config schema and the docs.

VS Code honours the flag only while running extension tests, so ExTester
also passes --extensionTestsPath with a generated runner whose run() never
settles (VS Code exits when the runner settles), plus a manifest-only
development path when EXTENSION_DEV_PATH is not set. Releases before
1.147.0 print a warning and launch visibly as before.

Extension test mode cannot switch the window to another folder (VS Code
exits), so in hidden mode openResources() with a folder or .code-workspace
restarts VS Code with the resources as launch arguments and moves the new
WebDriver session into the existing driver object. VSBrowser.isHiddenWindow
lets suites skip what test mode cannot do (dialogs are never shown); the
test project's dialog suite and close-folder hook use it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SiFCcXrV2iw6iRrgqkeVfu
Signed-off-by: Dominik Jelínek <djelinek@redhat.com>
Dominik Jelínek (djelinek) added a commit to djelinek/vscode-extension-tester that referenced this pull request Nov 25, 2026
… showing VS Code

VS Code 1.147.0 added a --hidden-window CLI flag (microsoft/vscode#344174)
that keeps every window hidden and unfocused. ExTester now exposes it as
--hidden_window on run-tests and setup-and-run, run.hiddenWindow in
extester.config.json, and the EXTESTER_HIDDEN_WINDOW environment variable,
so a local run no longer takes over the user's screen. The option is
marked experimental in the CLI help, the config schema and the docs.

VS Code honours the flag only while running extension tests, so ExTester
also passes --extensionTestsPath with a generated runner whose run() never
settles (VS Code exits when the runner settles), plus a manifest-only
development path when EXTENSION_DEV_PATH is not set. Releases before
1.147.0 print a warning and launch visibly as before.

Extension test mode cannot switch the window to another folder (VS Code
exits), so in hidden mode openResources() with a folder or .code-workspace
restarts VS Code with the resources as launch arguments and moves the new
WebDriver session into the existing driver object. VSBrowser.isHiddenWindow
lets suites skip what test mode cannot do (dialogs are never shown); the
test project's dialog suite and close-folder hook use it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SiFCcXrV2iw6iRrgqkeVfu
Signed-off-by: Dominik Jelínek <djelinek@redhat.com>
Dominik Jelínek (djelinek) added a commit to djelinek/vscode-extension-tester that referenced this pull request Nov 25, 2026
… showing VS Code

VS Code 1.147.0 added a --hidden-window CLI flag (microsoft/vscode#344174)
that keeps every window hidden and unfocused. ExTester now exposes it as
--hidden_window on run-tests and setup-and-run, run.hiddenWindow in
extester.config.json, and the EXTESTER_HIDDEN_WINDOW environment variable,
so a local run no longer takes over the user's screen. The option is
marked experimental in the CLI help, the config schema and the docs.

VS Code honours the flag only while running extension tests, so ExTester
also passes --extensionTestsPath with a generated runner whose run() never
settles (VS Code exits when the runner settles), plus a manifest-only
development path when EXTENSION_DEV_PATH is not set. Releases before
1.147.0 print a warning and launch visibly as before.

Extension test mode cannot switch the window to another folder (VS Code
exits), so in hidden mode openResources() with a folder or .code-workspace
restarts VS Code with the resources as launch arguments and moves the new
WebDriver session into the existing driver object. VSBrowser.isHiddenWindow
lets suites skip what test mode cannot do (dialogs are never shown); the
test project's dialog suite and close-folder hook use it.

test project's dialog suite and close-folder hook use it. Commands that
still reach the executor of the closed session, such as a captured Actions
object or a command in flight during the restart, are forwarded to the new
session instead of failing with ECONNREFUSED.

Linux is not supported: a never-shown window renders unreliably under X11/
Xvfb, so ExTester warns and shows the window there. The new hidden CI jobs
run on macOS and Windows.

ExTester Runner gets an experimental extesterRunner.hiddenWindow setting
that sets EXTESTER_HIDDEN_WINDOW=true for npx extest and custom run
commands; a value in the env setting wins.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SiFCcXrV2iw6iRrgqkeVfu
Signed-off-by: Dominik Jelínek <djelinek@redhat.com>
Dominik Jelínek (djelinek) added a commit to djelinek/vscode-extension-tester that referenced this pull request Nov 25, 2026
… showing VS Code

VS Code 1.147.0 added a --hidden-window CLI flag (microsoft/vscode#344174)
that keeps every window hidden and unfocused. ExTester now exposes it as
--hidden_window on run-tests and setup-and-run, run.hiddenWindow in
extester.config.json, and the EXTESTER_HIDDEN_WINDOW environment variable,
so a local run no longer takes over the user's screen. The option is
marked experimental in the CLI help, the config schema and the docs.

VS Code honours the flag only while running extension tests, so ExTester
also passes --extensionTestsPath with a generated runner whose run() never
settles (VS Code exits when the runner settles), plus a manifest-only
development path when EXTENSION_DEV_PATH is not set. Releases before
1.147.0 print a warning and launch visibly as before.

Extension test mode cannot switch the window to another folder (VS Code
exits), so in hidden mode openResources() with a folder or .code-workspace
restarts VS Code with the resources as launch arguments and moves the new
WebDriver session into the existing driver object. VSBrowser.isHiddenWindow
lets suites skip what test mode cannot do (dialogs are never shown); the
test project's dialog suite and close-folder hook use it.

test project's dialog suite and close-folder hook use it. Commands that
still reach the executor of the closed session, such as a captured Actions
object or a command in flight during the restart, are forwarded to the new
session instead of failing with ECONNREFUSED.

Under X11/Xvfb a never-shown window sometimes starts without being drawn
(1-4 animation frames/s). ExTester measures the frame rate after each hidden
launch and restarts VS Code up to twice when it is below 10 frames/s. The
status bar page object now waits for editor items (language, encoding,
position, ...) that VS Code adds on a later frame, and the notifications
test allows for a late notification. The new hidden CI jobs run on all
three platforms.

ExTester Runner gets an experimental extesterRunner.hiddenWindow setting
that sets EXTESTER_HIDDEN_WINDOW=true for npx extest and custom run
commands; a value in the env setting wins.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SiFCcXrV2iw6iRrgqkeVfu
Signed-off-by: Dominik Jelínek <djelinek@redhat.com>
Dominik Jelínek (djelinek) added a commit to djelinek/vscode-extension-tester that referenced this pull request Nov 25, 2026
… showing VS Code

VS Code 1.147.0 added a --hidden-window CLI flag (microsoft/vscode#344174)
that keeps every window hidden and unfocused. ExTester now exposes it as
--hidden_window on run-tests and setup-and-run, run.hiddenWindow in
extester.config.json, and the EXTESTER_HIDDEN_WINDOW environment variable,
so a local run no longer takes over the user's screen. The option is
marked experimental in the CLI help, the config schema and the docs.

VS Code honours the flag only while running extension tests, so ExTester
also passes --extensionTestsPath with a generated runner whose run() never
settles (VS Code exits when the runner settles), plus a manifest-only
development path when EXTENSION_DEV_PATH is not set. Releases before
1.147.0 print a warning and launch visibly as before.

Extension test mode cannot switch the window to another folder (VS Code
exits), so in hidden mode openResources() with a folder or .code-workspace
restarts VS Code with the resources as launch arguments and moves the new
WebDriver session into the existing driver object. VSBrowser.isHiddenWindow
lets suites skip what test mode cannot do (dialogs are never shown); the
test project's dialog suite and close-folder hook use it.

test project's dialog suite and close-folder hook use it. Commands that
still reach the executor of the closed session, such as a captured Actions
object or a command in flight during the restart, are forwarded to the new
session instead of failing with ECONNREFUSED.

Under X11/Xvfb a never-shown window sometimes starts without being drawn
(1-4 animation frames/s). ExTester measures the frame rate after each hidden
launch and restarts VS Code up to twice when it is below 10 frames/s.
Before each hidden restart it waits until the processes of the previous
instance are gone (via ps, not on Windows), so the new instance does not
compete with one that is still shutting down. The
status bar page object now waits for editor items (language, encoding,
position, ...) that VS Code adds on a later frame, and the notifications
test allows for a late notification. The new hidden CI jobs run on all
three platforms.

ExTester Runner gets an experimental extesterRunner.hiddenWindow setting
that sets EXTESTER_HIDDEN_WINDOW=true for npx extest and custom run
commands; a value in the env setting wins.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SiFCcXrV2iw6iRrgqkeVfu
Signed-off-by: Dominik Jelínek <djelinek@redhat.com>
Dominik Jelínek (djelinek) added a commit to djelinek/vscode-extension-tester that referenced this pull request Nov 25, 2026
… showing VS Code

VS Code 1.147.0 added a --hidden-window CLI flag (microsoft/vscode#344174)
that keeps every window hidden and unfocused. ExTester now exposes it as
--hidden_window on run-tests and setup-and-run, run.hiddenWindow in
extester.config.json, and the EXTESTER_HIDDEN_WINDOW environment variable,
so a local run no longer takes over the user's screen. The option is
marked experimental in the CLI help, the config schema and the docs.

VS Code honours the flag only while running extension tests, so ExTester
also passes --extensionTestsPath with a generated runner whose run() never
settles (VS Code exits when the runner settles), plus a manifest-only
development path when EXTENSION_DEV_PATH is not set. Releases before
1.147.0 print a warning and launch visibly as before.

Extension test mode cannot switch the window to another folder (VS Code
exits), so in hidden mode openResources() with a folder or .code-workspace
restarts VS Code with the resources as launch arguments and moves the new
WebDriver session into the existing driver object. VSBrowser.isHiddenWindow
lets suites skip what test mode cannot do (dialogs are never shown); the
test project's dialog suite and close-folder hook use it.

test project's dialog suite and close-folder hook use it. Commands that
still reach the executor of the closed session, such as a captured Actions
object or a command in flight during the restart, are forwarded to the new
session instead of failing with ECONNREFUSED.

Under X11/Xvfb a never-shown window sometimes starts without being drawn
(1-4 animation frames/s). ExTester measures the frame rate after each hidden
launch and restarts VS Code up to twice when it is below 10 frames/s. The
status bar page object now waits for editor items (language, encoding,
position, ...) that VS Code adds on a later frame, TextEditor.moveCursor waits for
the status bar to show the new position after each key instead of a fixed
20 ms, so a late update no longer makes it press the key once too often,
and the notifications test runs the command again when nothing shows up. The new hidden CI jobs run on all
three platforms.

ExTester Runner gets an experimental extesterRunner.hiddenWindow setting
that sets EXTESTER_HIDDEN_WINDOW=true for npx extest and custom run
commands; a value in the env setting wins.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SiFCcXrV2iw6iRrgqkeVfu
Signed-off-by: Dominik Jelínek <djelinek@redhat.com>
Dominik Jelínek (djelinek) added a commit to djelinek/vscode-extension-tester that referenced this pull request Nov 25, 2026
… showing VS Code

VS Code 1.147.0 added a --hidden-window CLI flag (microsoft/vscode#344174)
that keeps every window hidden and unfocused. ExTester now exposes it as
--hidden_window on run-tests and setup-and-run, run.hiddenWindow in
extester.config.json, and the EXTESTER_HIDDEN_WINDOW environment variable,
so a local run no longer takes over the user's screen. The option is
marked experimental in the CLI help, the config schema and the docs.

VS Code honours the flag only while running extension tests, so ExTester
also passes --extensionTestsPath with a generated runner whose run() never
settles (VS Code exits when the runner settles), plus a manifest-only
development path when EXTENSION_DEV_PATH is not set. Releases before
1.147.0 print a warning and launch visibly as before.

Extension test mode cannot switch the window to another folder (VS Code
exits), so in hidden mode openResources() with a folder or .code-workspace
restarts VS Code with the resources as launch arguments and moves the new
WebDriver session into the existing driver object. VSBrowser.isHiddenWindow
lets suites skip what test mode cannot do (dialogs are never shown); the
test project's dialog suite and close-folder hook use it.

test project's dialog suite and close-folder hook use it. Commands that
still reach the executor of the closed session, such as a captured Actions
object or a command in flight during the restart, are forwarded to the new
session instead of failing with ECONNREFUSED.

Under X11/Xvfb a never-shown window sometimes starts without being drawn
(1-4 animation frames/s). ExTester measures the frame rate after each hidden
launch and restarts VS Code up to twice when it is below 10 frames/s. The
status bar page object now waits for editor items (language, encoding,
position, ...) that VS Code adds on a later frame, TextEditor.moveCursor waits for
the status bar to show the new position after each key instead of a fixed
20 ms, so a late update no longer makes it press the key once too often,
the notifications tests run the command again when nothing shows up, and
the EditorView setup gives the "Text File" quick pick more time to open. The new hidden CI jobs run on all
three platforms.

ExTester Runner gets an experimental extesterRunner.hiddenWindow setting
that sets EXTESTER_HIDDEN_WINDOW=true for npx extest and custom run
commands; a value in the env setting wins.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SiFCcXrV2iw6iRrgqkeVfu
Signed-off-by: Dominik Jelínek <djelinek@redhat.com>
Dominik Jelínek (djelinek) added a commit to djelinek/vscode-extension-tester that referenced this pull request Nov 25, 2026
… showing VS Code

VS Code 1.147.0 added a --hidden-window CLI flag (microsoft/vscode#344174)
that keeps every window hidden and unfocused. ExTester now exposes it as
--hidden_window on run-tests and setup-and-run, run.hiddenWindow in
extester.config.json, and the EXTESTER_HIDDEN_WINDOW environment variable,
so a local run no longer takes over the user's screen. The option is
marked experimental in the CLI help, the config schema and the docs.

VS Code honours the flag only while running extension tests, so ExTester
also passes --extensionTestsPath with a generated runner whose run() never
settles (VS Code exits when the runner settles), plus a manifest-only
development path when EXTENSION_DEV_PATH is not set. Releases before
1.147.0 print a warning and launch visibly as before.

Extension test mode cannot switch the window to another folder (VS Code
exits), so in hidden mode openResources() with a folder or .code-workspace
restarts VS Code with the resources as launch arguments and moves the new
WebDriver session into the existing driver object. VSBrowser.isHiddenWindow
lets suites skip what test mode cannot do (dialogs are never shown); the
test project's dialog suite and close-folder hook use it.

test project's dialog suite and close-folder hook use it. Commands that
still reach the executor of the closed session, such as a captured Actions
object or a command in flight during the restart, are forwarded to the new
session instead of failing with ECONNREFUSED.

Under X11/Xvfb a never-shown window sometimes starts without being drawn
(1-4 animation frames/s). ExTester measures the frame rate after each hidden
launch and restarts VS Code up to twice when it is below 10 frames/s. The
status bar page object now waits for editor items (language, encoding,
position, ...) that VS Code adds on a later frame, TextEditor.moveCursor waits for
the status bar to show the new position after each key instead of a fixed
20 ms, so a late update no longer makes it press the key once too often,
NotificationsCenter.getNotifications
reopens the center when VS Code closed it and skips rows that are not
rendered yet, the new NotificationsCenter.waitForNotification(message)
waits for a notification by its text, and StatusBar.openNotificationsCenter
throws instead of returning a closed center. The notification tests use
them and run the command again when nothing shows up, and the EditorView
setup opens untitled files with a direct command. The new hidden CI jobs run on all
three platforms.

ExTester Runner gets an experimental extesterRunner.hiddenWindow setting
that sets EXTESTER_HIDDEN_WINDOW=true for npx extest and custom run
commands; a value in the env setting wins.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SiFCcXrV2iw6iRrgqkeVfu
Signed-off-by: Dominik Jelínek <djelinek@redhat.com>
Dominik Jelínek (djelinek) added a commit to djelinek/vscode-extension-tester that referenced this pull request Nov 25, 2026
… showing VS Code

VS Code 1.147.0 added a --hidden-window CLI flag (microsoft/vscode#344174)
that keeps every window hidden and unfocused. ExTester now exposes it as
--hidden_window on run-tests and setup-and-run, run.hiddenWindow in
extester.config.json, and the EXTESTER_HIDDEN_WINDOW environment variable,
so a local run no longer takes over the user's screen. The option is
marked experimental in the CLI help, the config schema and the docs.

VS Code honours the flag only while running extension tests, so ExTester
also passes --extensionTestsPath with a generated runner whose run() never
settles (VS Code exits when the runner settles), plus a manifest-only
development path when EXTENSION_DEV_PATH is not set. Releases before
1.147.0 print a warning and launch visibly as before.

Extension test mode cannot switch the window to another folder (VS Code
exits), so in hidden mode openResources() with a folder or .code-workspace
restarts VS Code with the resources as launch arguments and moves the new
WebDriver session into the existing driver object. VSBrowser.isHiddenWindow
lets suites skip what test mode cannot do (dialogs are never shown); the
test project's dialog suite and close-folder hook use it.

test project's dialog suite and close-folder hook use it. Commands that
still reach the executor of the closed session, such as a captured Actions
object or a command in flight during the restart, are forwarded to the new
session instead of failing with ECONNREFUSED.

Under X11/Xvfb a never-shown window sometimes starts without being drawn
(1-4 animation frames/s). ExTester measures the frame rate after each hidden
launch and restarts VS Code up to twice when it is below 10 frames/s. The
status bar page object now waits for editor items (language, encoding,
position, ...) that VS Code adds on a later frame, TextEditor.moveCursor waits for
the status bar to show the new position after each key instead of a fixed
20 ms, so a late update no longer makes it press the key once too often,
NotificationsCenter.getNotifications
reopens the center when VS Code closed it and skips rows that are not
rendered yet, the new NotificationsCenter.waitForNotification(message)
waits for a notification by its text, and StatusBar.openNotificationsCenter
throws instead of returning a closed center. Input.clear retries for up to 3 s
while the quick input does not accept keys yet. The notification tests use
them and run the command again when nothing shows up, and the EditorView
setup opens untitled files with a direct command. The new hidden CI jobs run on all
three platforms.

ExTester Runner gets an experimental extesterRunner.hiddenWindow setting
that sets EXTESTER_HIDDEN_WINDOW=true for npx extest and custom run
commands; a value in the env setting wins.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SiFCcXrV2iw6iRrgqkeVfu
Signed-off-by: Dominik Jelínek <djelinek@redhat.com>
Dominik Jelínek (djelinek) added a commit to djelinek/vscode-extension-tester that referenced this pull request Nov 25, 2026
… showing VS Code

VS Code 1.147.0 added a --hidden-window CLI flag (microsoft/vscode#344174)
that keeps every window hidden and unfocused. ExTester exposes it as
--hidden_window on run-tests and setup-and-run, run.hiddenWindow in
extester.config.json and the EXTESTER_HIDDEN_WINDOW environment variable,
marked experimental in the CLI help, the config schema and the docs.

VS Code honours the flag only while running extension tests, so ExTester
also passes --extensionTestsPath with a generated runner whose run() never
settles (VS Code exits when the runner settles), plus a manifest-only
development path when EXTENSION_DEV_PATH is not set. Releases before
1.147.0 print a warning and launch visibly as before.

Extension test mode cannot switch the window to another folder, so in
hidden mode openResources() with a folder or .code-workspace restarts VS
Code with the resources as launch arguments and moves the new WebDriver
session into the existing driver object. Commands that still reach the
executor of the closed session are forwarded to the new one.
VSBrowser.isHiddenWindow lets suites skip what test mode cannot do.

Under X11/Xvfb a never-shown window sometimes starts without being drawn
(1-4 animation frames/s), so ExTester measures the frame rate after each
hidden launch and restarts VS Code up to twice when it is below 10.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SiFCcXrV2iw6iRrgqkeVfu
Signed-off-by: Dominik Jelínek <djelinek@redhat.com>
Dominik Jelínek (djelinek) added a commit to djelinek/vscode-extension-tester that referenced this pull request Nov 25, 2026
… showing VS Code

VS Code 1.147.0 added a --hidden-window CLI flag (microsoft/vscode#344174)
that keeps every window hidden and unfocused. ExTester exposes it as
--hidden_window on run-tests and setup-and-run, run.hiddenWindow in
extester.config.json and the EXTESTER_HIDDEN_WINDOW environment variable,
marked experimental in the CLI help, the config schema and the docs.

VS Code honours the flag only while running extension tests, so ExTester
also passes --extensionTestsPath with a generated runner whose run() never
settles (VS Code exits when the runner settles), plus a manifest-only
development path when EXTENSION_DEV_PATH is not set. Releases before
1.147.0 print a warning and launch visibly as before.

Extension test mode cannot switch the window to another folder, so in
hidden mode openResources() with a folder or .code-workspace restarts VS
Code with the resources as launch arguments and moves the new WebDriver
session into the existing driver object. Commands that still reach the
executor of the closed session are forwarded to the new one.
VSBrowser.isHiddenWindow lets suites skip what test mode cannot do.

Under X11/Xvfb a never-shown window sometimes starts without being drawn
(1-4 animation frames/s), so ExTester measures the frame rate after each
hidden launch and restarts VS Code up to twice when it is below 10.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SiFCcXrV2iw6iRrgqkeVfu
Signed-off-by: Dominik Jelínek <djelinek@redhat.com>
Dominik Jelínek (djelinek) added a commit to djelinek/vscode-extension-tester that referenced this pull request Nov 25, 2026
… showing VS Code

VS Code 1.147.0 added a --hidden-window CLI flag (microsoft/vscode#344174)
that keeps every window hidden and unfocused. ExTester exposes it as
--hidden_window on run-tests and setup-and-run, run.hiddenWindow in
extester.config.json and the EXTESTER_HIDDEN_WINDOW environment variable,
marked experimental in the CLI help, the config schema and the docs.

VS Code honours the flag only while running extension tests, so ExTester
also passes --extensionTestsPath with a generated runner whose run() never
settles (VS Code exits when the runner settles), plus a manifest-only
development path when EXTENSION_DEV_PATH is not set. Releases before
1.147.0 print a warning and launch visibly as before.

Extension test mode cannot switch the window to another folder, so in
hidden mode openResources() with a folder or .code-workspace restarts VS
Code with the resources as launch arguments and moves the new WebDriver
session into the existing driver object. Commands that still reach the
executor of the closed session are forwarded to the new one.
VSBrowser.isHiddenWindow lets suites skip what test mode cannot do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SiFCcXrV2iw6iRrgqkeVfu
Signed-off-by: Dominik Jelínek <djelinek@redhat.com>
Dominik Jelínek (djelinek) added a commit to djelinek/vscode-extension-tester that referenced this pull request Nov 25, 2026
… showing VS Code

VS Code 1.147.0 added a --hidden-window CLI flag (microsoft/vscode#344174)
that keeps every window hidden and unfocused. ExTester exposes it as
--hidden_window on run-tests and setup-and-run, run.hiddenWindow in
extester.config.json and the EXTESTER_HIDDEN_WINDOW environment variable,
marked experimental in the CLI help, the config schema and the docs.

VS Code honours the flag only while running extension tests, so ExTester
also passes --extensionTestsPath with a generated runner whose run() never
settles (VS Code exits when the runner settles), plus a manifest-only
development path when EXTENSION_DEV_PATH is not set. Releases before
1.147.0, and versions that cannot be parsed, print a warning and launch
visibly as before.

Extension test mode cannot switch the window to another folder, so in
hidden mode openResources() with a folder or .code-workspace restarts VS
Code with the resources as launch arguments and moves the new WebDriver
session into the existing driver object. The restart keeps the user data
dir and appends to test.log and chromedriver.log. Commands sent while the
restart runs are forwarded to the new session. VSBrowser.isHiddenWindow,
known from the moment the browser is created (before the test files load),
lets suites skip what test mode cannot do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SiFCcXrV2iw6iRrgqkeVfu
Signed-off-by: Dominik Jelínek <djelinek@redhat.com>
Dominik Jelínek (djelinek) added a commit to djelinek/vscode-extension-tester that referenced this pull request Nov 26, 2026
… showing VS Code

VS Code 1.147.0 added a --hidden-window CLI flag (microsoft/vscode#344174)
that keeps every window hidden and unfocused. ExTester exposes it as
--hidden_window on run-tests and setup-and-run, run.hiddenWindow in
extester.config.json and the EXTESTER_HIDDEN_WINDOW environment variable,
marked experimental in the CLI help, the config schema and the docs.

VS Code honours the flag only while running extension tests, so ExTester
also passes --extensionTestsPath with a generated runner whose run() never
settles (VS Code exits when the runner settles), plus a manifest-only
development path when EXTENSION_DEV_PATH is not set. Releases before
1.147.0, and versions that cannot be parsed, print a warning and launch
visibly as before.

Extension test mode cannot switch the window to another folder, so in
hidden mode openResources() with a folder or .code-workspace restarts VS
Code with the resources as launch arguments and moves the new WebDriver
session into the existing driver object. The restart keeps the user data
dir and appends to test.log and chromedriver.log. Commands sent while the
restart runs are forwarded to the new session. VSBrowser.isHiddenWindow,
known from the moment the browser is created (before the test files load),
lets suites skip what test mode cannot do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SiFCcXrV2iw6iRrgqkeVfu
Signed-off-by: Dominik Jelínek <djelinek@redhat.com>
Dominik Jelínek (djelinek) added a commit to djelinek/vscode-extension-tester that referenced this pull request Nov 26, 2026
… showing VS Code

VS Code 1.147.0 added a --hidden-window CLI flag (microsoft/vscode#344174)
that keeps every window hidden and unfocused. ExTester exposes it as
--hidden_window on run-tests and setup-and-run, run.hiddenWindow in
extester.config.json and the EXTESTER_HIDDEN_WINDOW environment variable,
marked experimental in the CLI help, the config schema and the docs.

VS Code honours the flag only while running extension tests, so ExTester
also passes --extensionTestsPath with a generated runner whose run() never
settles (VS Code exits when the runner settles), plus a manifest-only
development path when EXTENSION_DEV_PATH is not set. Releases before
1.147.0, and versions that cannot be parsed, print a warning and launch
visibly as before.

Extension test mode cannot switch the window to another folder, so in
hidden mode openResources() with a folder or .code-workspace restarts VS
Code with the resources as launch arguments and moves the new WebDriver
session into the existing driver object. The restart keeps the user data
dir and appends to test.log and chromedriver.log. Commands sent while the
restart runs are forwarded to the new session. VSBrowser.isHiddenWindow,
known from the moment the browser is created (before the test files load),
lets suites skip what test mode cannot do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SiFCcXrV2iw6iRrgqkeVfu
Signed-off-by: Dominik Jelínek <djelinek@redhat.com>
Dominik Jelínek (djelinek) added a commit to redhat-developer/vscode-extension-tester that referenced this pull request Nov 26, 2026
… showing VS Code

VS Code 1.147.0 added a --hidden-window CLI flag (microsoft/vscode#344174)
that keeps every window hidden and unfocused. ExTester exposes it as
--hidden_window on run-tests and setup-and-run, run.hiddenWindow in
extester.config.json and the EXTESTER_HIDDEN_WINDOW environment variable,
marked experimental in the CLI help, the config schema and the docs.

VS Code honours the flag only while running extension tests, so ExTester
also passes --extensionTestsPath with a generated runner whose run() never
settles (VS Code exits when the runner settles), plus a manifest-only
development path when EXTENSION_DEV_PATH is not set. Releases before
1.147.0, and versions that cannot be parsed, print a warning and launch
visibly as before.

Extension test mode cannot switch the window to another folder, so in
hidden mode openResources() with a folder or .code-workspace restarts VS
Code with the resources as launch arguments and moves the new WebDriver
session into the existing driver object. The restart keeps the user data
dir and appends to test.log and chromedriver.log. Commands sent while the
restart runs are forwarded to the new session. VSBrowser.isHiddenWindow,
known from the moment the browser is created (before the test files load),
lets suites skip what test mode cannot do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SiFCcXrV2iw6iRrgqkeVfu
Signed-off-by: Dominik Jelínek <djelinek@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

6 participants