Skip to content

Commit 4e3e437

Browse files
authored
chore: update TODOs (#12765)
1 parent a98ac2e commit 4e3e437

File tree

5 files changed

+1
-28
lines changed

5 files changed

+1
-28
lines changed

packages/puppeteer-core/src/bidi/BidiOverCdp.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,8 @@ export async function connectBidiOverCdp(
5656
const bidiServer = await BidiMapper.BidiServer.createAndStart(
5757
transportBiDi,
5858
cdpConnectionAdapter,
59-
// TODO: most likely need a little bit of refactoring
6059
cdpConnectionAdapter.browserClient(),
61-
'',
60+
/* selfTargetId= */ '',
6261
{
6362
// Override Mapper's `unhandledPromptBehavior` default value of `dismiss` to
6463
// `ignore`, so that user can handle the prompt instead of just closing it.

packages/puppeteer-core/src/bidi/Browser.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ export interface BidiBrowserOptions {
4848
export class BidiBrowser extends Browser {
4949
readonly protocol = 'webDriverBiDi';
5050

51-
// TODO: Update generator to include fully module
5251
static readonly subscribeModules: [string, ...string[]] = [
5352
'browsingContext',
5453
'network',

packages/puppeteer-core/src/bidi/BrowserConnector.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ async function getBiDiConnection(
109109
);
110110
}
111111

112-
// TODO: use other options too.
113112
const bidiOverCdpConnection = await BiDi.connectBidiOverCdp(cdpConnection, {
114113
acceptInsecureCerts: ignoreHTTPSErrors,
115114
});

packages/puppeteer-core/src/bidi/HTTPResponse.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ export class BidiHTTPResponse extends HTTPResponse {
105105
}
106106

107107
override timing(): Protocol.Network.ResourceTiming | null {
108-
// TODO: File and issue with BiDi spec
109108
throw new UnsupportedOperation();
110109
}
111110

packages/puppeteer-core/src/bidi/core/Session.ts

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ import {DisposableStack, disposeSymbol} from '../../util/disposable.js';
1717
import {Browser} from './Browser.js';
1818
import type {BidiEvents, Commands, Connection} from './Connection.js';
1919

20-
// TODO: Once Chrome supports session.status properly, uncomment this block.
21-
// const MAX_RETRIES = 5;
22-
2320
/**
2421
* @internal
2522
*/
@@ -31,26 +28,6 @@ export class Session
3128
connection: Connection,
3229
capabilities: Bidi.Session.CapabilitiesRequest
3330
): Promise<Session> {
34-
// Wait until the session is ready.
35-
//
36-
// TODO: Once Chrome supports session.status properly, uncomment this block
37-
// and remove `getBiDiConnection` in BrowserConnector.
38-
39-
// let status = {message: '', ready: false};
40-
// for (let i = 0; i < MAX_RETRIES; ++i) {
41-
// status = (await connection.send('session.status', {})).result;
42-
// if (status.ready) {
43-
// break;
44-
// }
45-
// // Backoff a little bit each time.
46-
// await new Promise(resolve => {
47-
// return setTimeout(resolve, (1 << i) * 100);
48-
// });
49-
// }
50-
// if (!status.ready) {
51-
// throw new Error(status.message);
52-
// }
53-
5431
const {result} = await connection.send('session.new', {
5532
capabilities,
5633
});

0 commit comments

Comments
 (0)