Commit 316c04d2 authored by Erik Luo's avatar Erik Luo Committed by Commit Bot

DevTools: test old regression with OOPIF logs with bad stackTrace

Around M63, logs from OOPIFs contained invalid scriptIds that led to
linkifier failure, preventing users from seeing their logs.

A fix [1] landed to make JSPresentationUtils not throw when linkifier
fails. This CL adds a test.

[1] https://chromium.googlesource.com/chromium/src/+/060e1aacae0500e12dbb746ef4242dc3ec49eadb

Bug: 826210
Change-Id: Ie343b7927ee15c0def8fc28723b2d763ecad875a
Reviewed-on: https://chromium-review.googlesource.com/1011453Reviewed-by: default avatarDmitry Gozman <dgozman@chromium.org>
Commit-Queue: Erik Luo <luoe@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550473}
parent 0d969695
Tests that console messages with invalid stacktraces will still be rendered, crbug.com/826210
(unknown) This should be visible
(anonymous)
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
(async function() {
TestRunner.addResult('Tests that console messages with invalid stacktraces will still be rendered, crbug.com/826210\n');
await TestRunner.loadModule('console_test_runner');
await TestRunner.showPanel('console');
var consoleView = Console.ConsoleView.instance();
consoleView._setImmediatelyFilterMessagesForTest();
// Add invalid message.
var badStackTrace = {
callFrames: [
{
'functionName': '',
'scriptId': 'invalid-ScriptId',
'url': '',
'lineNumber': 0,
'columnNumber': 0,
}
]
};
var badStackTraceMessage = new SDK.ConsoleMessage(
TestRunner.runtimeModel, SDK.ConsoleMessage.MessageSource.ConsoleAPI,
SDK.ConsoleMessage.MessageLevel.Error, "This should be visible",
SDK.ConsoleMessage.MessageType.Error, null, undefined, undefined,
undefined, badStackTrace);
SDK.consoleModel.addMessage(badStackTraceMessage);
ConsoleTestRunner.dumpConsoleMessages();
TestRunner.completeTest();
})();
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment