blob: e99e32aae2df65a3ca9425fd1f46f095c64f7466 [file] [edit]
// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import {assert} from 'chai';
import {describe, it} from '../conductor/mocha-interface.js';
import {
getConsoleMessages,
navigateToConsoleTab,
} from '../helpers/console-helpers.js';
describe('The Console Tab', () => {
it('Does not crash if it fails to convert alert() argument to string', async ({devToolsPage, inspectedPage}) => {
await navigateToConsoleTab(devToolsPage);
await inspectedPage.reload();
const result =
(await getConsoleMessages(devToolsPage, inspectedPage, 'alert-toString-exception', undefined, undefined))[0];
assert.strictEqual(result, 'Uncaught Exception in toString().');
});
});