원클릭으로
devtools-migrate-chromium-test
Use when migrating Chromium layout tests to DevTools unit tests
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Use when migrating Chromium layout tests to DevTools unit tests
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Use when starting a new task, creating a branch, switching branches, managing branches, creating and uploading CLs, handling stacked changes, or checking release and roll status in the DevTools Gerrit-based workflow. ALWAYS use this instead of running standard git checkout/switch commands for branch creation.
Reproduce and investigate flakiness in a test.
Refactor user-facing UIStrings and localization comments in a DevTools module folder according to UX writing guidelines (child task of b/40799900). Use when simplifying wording, checking sentence case, or improving L10n comments in UIStrings for a specific folder or issue. Don’t use for general code changes or non-UIStrings files.
Migrates legacy imperative DOM construction to local declarative Lit-html templates rendered inside existing containers.
Consolidates manual DOM creation, updates, and constructors into private helper methods and structured state interfaces.
High-level orchestrator for managing multi-pass migration of Chrome DevTools legacy components to the modern UI engineering vision (UI.Widget & Lit-html).
| name | devtools-migrate-chromium-test |
| description | Use when migrating Chromium layout tests to DevTools unit tests |
.js) and its expectation file (-expected.txt) in your initial prompt.front_end/.[FileName].test.ts.ui/legacy/components/data_grid/DataGrid.ts, the test should be ui/legacy/components/data_grid/DataGrid.test.ts.TestRunner style to the modern Mocha/Chai style used in DevTools.describeWithEnvironment or describe as appropriate.TestRunner.addResult and expectation comparisons with standard assertions (assert.strictEqual, assert.isTrue, etc.).renderElementIntoDOM to attach elements to a test container.sources list of the devtools_ui_module("unittests") or devtools_foundation_module("foundation_unittests") target in the corresponding BUILD.gn file.verification skill to correctly build the project and run the new test.version-control skill. Make sure the CL description has a Fixed: <issue number> trailer instead of Bug: <issue number>.datagrid-editable-longtext.js)import {TestRunner} from 'test_runner';
import * as DataGrid from 'devtools/ui/legacy/components/data_grid/data_grid.js';
(async function () {
TestRunner.addResult('This tests long text in datagrid.');
// ... setup grid ...
TestRunner.addResult('Original lengths');
// ... dump results ...
TestRunner.completeTest();
})();
DataGrid.test.ts)import * as DataGrid from './data_grid.js';
import {renderElementIntoDOM} from '../../../../testing/DOMHelpers.js';
import {describeWithEnvironment} from '../../../../testing/EnvironmentHelpers.js';
describeWithEnvironment('DataGrid', () => {
it('tests long text in datagrid', () => {
// ... setup grid ...
// Use assertions instead of printing results
assert.strictEqual(keyElement.textContent.length, 1500);
});
});
LocalizedString. You can often bypass this in tests by casting the object array as DataGrid.DataGrid.ColumnDescriptor[] or similar, or by using i18n.i18n.lockedString if appropriate.dataGrid.update()). In TypeScript unit tests, you should avoid this. Look for public alternatives (e.g., updateInstantly()) or trigger the behavior by dispatching standard DOM events (e.g., element.dispatchEvent(new Event('scroll')) instead of calling onScroll()).TreeElement.expandRecursively() have a default depth limit (e.g., 3) to prevent infinite loops. If your test requires expanding deeper trees, remember to pass a higher max depth argument: expandRecursively(10).RemoteObject), look for existing mock helpers in related test files (e.g., createDeepRemoteObjectMock in ObjectPropertiesSection.test.ts) instead of trying to create real SDK objects or complex mocks from scratch. Other helpers live inside front_end/testing.npm run test may exit with code 1 due to memory leaks (e.g., WebFrame LEAKED) or infrastructure issues (e.g., gpkg or Corp Airlock logs), even if the tests themselves passed. Always check the end of the test log for TOTAL: X SUCCESS to confirm if the test logic was successful.raf() from front_end/testing/DOMHelpers.ts to wait for the next rendering cycle.If you encountered any novel issues, workarounds, or helpful tips during the migration that are not already documented, please report them to the user so they can be added to the skill documentation.