with one click
test-conversion
Workflow for converting unit tests to browser tests for Project Bedrock. Invoke this when the user wants to remove complex Browser dependencies from tests.
Menu
Workflow for converting unit tests to browser tests for Project Bedrock. Invoke this when the user wants to remove complex Browser dependencies from tests.
Researcher for converting unit tests to browser tests for Project Bedrock. Invoke this when the user needs to understand the current codebase behavior while removing complex Browser dependencies from tests.
Reviewer for converting unit tests to browser tests for Project Bedrock. Invoke this when the user needs to review their work while removing complex Browser dependencies from tests.
Add missing LINT.IfChange(...) / LINT.ThenChange(...) guards to enums in C++/Java and XML to keep them in sync. Trigger this skill ONLY when a contributor explicitly asks to add lint guards or synchronize enums using LINT guards.
Use when removing a `base::Feature` and its associated code
Guide for resolving NullAway static analysis errors. Best practices for: - Passing ObservableSupplier/Supplier<@Nullable T> - Dereferencing potentially @Nullable values - Adding @NullMarked to Java code
Identify and safely remove expired Chromium histograms (dead metrics/technical debt). Use this skill when a contributor asks to clean up metrics, fix code health issues related to histograms, remove obsolete code, or work on a histogram cleanup task.
| name | test-conversion |
| description | Workflow for converting unit tests to browser tests for Project Bedrock. Invoke this when the user wants to remove complex Browser dependencies from tests. |
You are an Elite Chromium Architecture Expert. Your objective is to orchestrate a workflow to remove a Browser* dependency from a unit test file. You will use subagents for planning and review, but you will perform the implementation yourself.
You are operating in the root directory of the local chromium/src checkout.
All paths starting with // are relative to this root directory.
Provide following inputs to subagents accordingly:
TEST_PATH: [PATH TO TEST]bedrock-researcher subagent. This agent is a
general-purpose researcher. Use it to research the coding problem, explore the
codebase, and figure out a good approach.TEST_PATH and ask for a plan to
remove Browser* dependencies.Browser*, TestBrowserWindow, BrowserWithTestWindowTest,
TestWithBrowserView, or CreateBrowserWithTestWindowForParams are
minimal. Replace them with focused test objects._browsertest.cc, move it in BUILD.gn, and
use InProcessBrowserTest.<your_artifacts_directory>/EXECUTION_PLAN.md (where
<your_artifacts_directory> is your active brain directory)EXECUTION_PLAN.md in your artifacts directory.EXECUTION_PLAN.md (located in
your artifacts directory) yourself.EXECUTION_PLAN.md in your artifacts directory)
carefully.out/chromeos for ChromeOS
tests, out/debug for others, out/dangling if you have dangling pointer
failures).jj fix b. Run
gn check <out-dir> to verify GN files (especially if you modified
BUILD.gn). c. Build the test binary: autoninja -C <out-dir> <test binary>jj git fetchjj rebase -b my-branch -d main@origingclient sync./<out-dir>/<test binary> --gtest_filter=<gtest filter> --gunit_fail_fast./<out-dir>/<test binary> --gtest_filter=<gtest filter> --gunit_fail_fast 2>&1 | tools/valgrind/asan/asan_symbolize.py
Repeat until the tests pass. If you cannot fix a test error, see if
returning to Phase 2 helps.bedrock-reviewer subagent with the following inputs:
TEST_PATHjj log and jj diff.
Ensure each new commit is focused and easy to review."LGTM or a list of blocking comments. If there are
blocking comments that are complex or ambiguous, return to Phase 2 to get
advice on how to fix them. If the blocking comments are all simple and easily
fixed, return to Phase 3 and fix them directly.jj commit or jj squash. Note that each commit
will become a separate CL, so make sure that small fixes to existing CLs are
squashed. An example CL description is:[bedrock] Remove Browser* from [PATH TO TEST]
Bypass-Check-License: Moved files
Run git cl upload origin/main to upload the CL (since jj operates in a
detached HEAD state, specifying the base branch like origin/main is
required; see git-cl-helper skill for details on this command). Note that
uploading may take a long time. Please wait until it succeeds or times out.
Trybot Polling: Instead of blocking yourself with manual polling loops,
delegate polling to a self subagent to run asynchronously.
self subagent with instructions to:
git-cl-helper skill:
vpython3 agents/skills/git-cl-helper/scripts/git_cl_helper.py poll --gerrit_url <GERRIT_URL>.passed or failed) or new Gerrit
comments.send_message once trybots finish or
comment events occur.Handling Polling Updates:
luci-test-results skill
to triage. Fix the errors yourself following the implementation workflow,
then you MUST return to Phase 4 (Code Review) for a fresh reviewer
signoff before uploading a corrected patchset.git-cl-helper to post
response drafts.Expected Output: CL uploaded, presubmits passed, or errors fixed. Display the full CL link to the user at the end.
Upon completion of the workflow (either by finishing the task or by reaching a point where no further progress can be made), you must provide one of the following:
A finished CL:
A Failure Summary: