Skip to content

Commit 13f3bb6

Browse files
OrKoNDevtools-frontend LUCI CQ
authored and
Devtools-frontend LUCI CQ
committed
Make describeWithRealConnection wait for render coordinator
No-Tree-Checks: True Fixed: 417895340 Change-Id: Id6f711eea6e2b11263a67bd9f4e7ee0cdb82e3fd Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6549741 Reviewed-by: Nikolay Vitkov <nvitkov@chromium.org> Commit-Queue: Alex Rudenko <alexrudenko@chromium.org> Auto-Submit: Alex Rudenko <alexrudenko@chromium.org>
1 parent c2974f7 commit 13f3bb6

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

front_end/models/ai_assistance/EvaluateAction.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,7 @@ describe('FreestylerEvaluateAction', () => {
105105
functionDeclaration, [], await executionContextForTest(), {throwOnSideEffect});
106106
}
107107

108-
// Flaky test, leaves pending promises behind.
109-
it.skip('[crbug.com/417895340] should serialize primitive values correctly', async () => {
108+
it('should serialize primitive values correctly', async () => {
110109
assert.strictEqual(await executeForTest('const data = "string"'), '\'string\'');
111110
assert.strictEqual(await executeForTest('const data = 999n'), '999n');
112111
assert.strictEqual(await executeForTest('const data = true'), 'true');

front_end/testing/RealConnection.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import * as ProtocolClient from '../core/protocol_client/protocol_client.js';
88
import * as Root from '../core/root/root.js';
99
import * as SDK from '../core/sdk/sdk.js';
1010
import * as Main from '../entrypoints/main/main.js';
11+
import * as RenderCoordinator from '../ui/components/render_coordinator/render_coordinator.js';
1112

1213
import {deinitializeGlobalVars} from './EnvironmentHelpers.js';
1314

@@ -53,9 +54,10 @@ function describeBody(fn: () => void) {
5354
initialized = true;
5455
});
5556

56-
beforeEach('describeWithRealConnection', () => {
57+
beforeEach('describeWithRealConnection', async () => {
5758
resetHostBindingStubState();
5859
Common.Settings.Settings.instance().clearAll();
60+
await RenderCoordinator.done();
5961
});
6062

6163
fn();
@@ -66,6 +68,7 @@ function describeBody(fn: () => void) {
6668
throw new Error('Missing deprecatedRunAfterPendingDispatches');
6769
}
6870
await new Promise<void>(resolve => runAfterPendingDispatches(resolve));
71+
await RenderCoordinator.done();
6972
});
7073
}
7174

0 commit comments

Comments
 (0)