Skip to content

Commit e5585b8

Browse files
ktranDevtools-frontend LUCI CQ
authored andcommitted
[cxx_extension] Explicitly await highlighted bytes in LMI test
After changing the timing of updates through https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/7241006 we observed flakiness on the bots regarding highlilghted byte data. A potential source of error is that the new rerendering timing creates a temporary state that is observed which is not the actual final state that the user sees. Therefore, wait until we see the expected data before doing the assertion. Fixed: 407941051 Change-Id: I49ceb4b58ae801721ea27fe9230000e685b8712b Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/7263824 Commit-Queue: Kim-Anh Tran <[email protected]> Reviewed-by: Piotr Paulski <[email protected]>
1 parent 94f4696 commit e5585b8

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

extensions/cxx_debugging/e2e/standalone/MemoryInspector.test.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ import {
1515
} from '../cxx-debugging-extension-helpers.js';
1616

1717
describe('LinearMemoryInspector', () => {
18-
// Started failing 2025.12.09, probably related to crrev.com/c/7241006
19-
it.skip('[crbug.com/407941051] can show variables', async () => {
18+
it('can show variables', async () => {
2019
const {inspectedPage, devToolsPage} = getBrowserAndPagesWrappers();
2120
const test =
2221
'extensions/cxx_debugging/e2e/resources/scope-view-primitives__Scope_view_formats_primitive_types_correctly_0.html';
@@ -43,8 +42,14 @@ describe('LinearMemoryInspector', () => {
4342
root: localVariable,
4443
});
4544

46-
const byteHighlights = await devToolsPage.waitForMany('.byte-cell.highlight-area', 8);
47-
const byteHighlightText = await Promise.all(byteHighlights.map(cell => cell.evaluate(cell => cell.textContent)));
45+
const byteHighlightText = await devToolsPage.waitForFunction(async () => {
46+
const byteHighlights = await devToolsPage.waitForMany('.byte-cell.highlight-area', 8);
47+
const byteHighlightText = await Promise.all(byteHighlights.map(cell => cell.evaluate(cell => cell.textContent)));
48+
if (byteHighlightText[0] === '33' && byteHighlightText[7] === '3F') {
49+
return byteHighlightText;
50+
}
51+
return false;
52+
});
4853
assert.deepEqual(byteHighlightText, ['33', '33', '33', '33', '33', '33', 'F3', '3F']);
4954

5055
const valueHighlights = await devToolsPage.waitForMany('.text-cell.highlight-area', 8);

0 commit comments

Comments
 (0)