blob: f9d8139c747b157491546244bc0d194c6dd8ca04 [file] [log] [blame]
(async function(testRunner) {
const {session, dp} = await testRunner.startBlank(
`Check the console message printed on a QuicTransport handshake failure.`);
const url = 'quic-transport://localhost';
await dp.Log.enable();
testRunner.log('Log Enabled');
dp.Log.onEntryAdded(event => {
const entry = event.params.entry;
// Remove the error code, as it is platform-specific and can change.
const text = entry.text.replace(/net::ERR_[A-Z_]+/, '[net error]');
testRunner.log('Log.onEntryAdded');
testRunner.log(`source: ${entry.source}`);
testRunner.log(`level: ${entry.level}`);
testRunner.log(`text: ${text}`);
testRunner.completeTest();
});
session.evaluate(`new QuicTransport('${url}');`);
testRunner.log('Instantiate QuicTransport.');
})