(url)
| 955 | } |
| 956 | |
| 957 | async function createPageTarget(url) { |
| 958 | const response = await fetch( |
| 959 | `http://127.0.0.1:${debugPort}/json/new?${encodeURIComponent(url)}`, |
| 960 | { method: "PUT" }, |
| 961 | ); |
| 962 | if (!response.ok) { |
| 963 | throw new Error( |
| 964 | `Failed to create Chrome target: ${response.status} ${await response.text()}`, |
| 965 | ); |
| 966 | } |
| 967 | return response.json(); |
| 968 | } |
| 969 | |
| 970 | async function collectDirectWebRtcStats(cdp) { |
| 971 | return evaluate( |
no test coverage detected