blob: 3d0d32836027458b8e1c1584cbbbe8537c45612c [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../../http/tests/inspector/resources/inspector-test.js"></script>
<script src="resources/stack-trace-utilities.js"></script>
<script src="resources/tail-deleted-frames-intermediate-native-tail-deleted-calls.js"></script>
<script>
function test()
{
let suite = InspectorTest.createAsyncSuite("Debugger.TailDeletedFrames.IntermediateTailDeletedFrames");
suite.addTestCase({
name: "Debugger.TailDeletedFrames.IntermediateTailDeletedFrames",
description: "Ensure intermediate tail deleted frames in a log do not show up in the call stack",
async test() {
// Trigger breakpoint.
InspectorTest.evaluateInPage(`startABC()`);
// FIXME: ShadowChicken only works if each tail call function emits a prologue
// on entry. Unfortunately native function calls do not emit a prologue, so the
// ShadowChicken stack cannot properly asses the tail call from `THIS_DOES_NOT_CALL_c`.
InspectorTest.fail("This should not have `THIS_DOES_NOT_CALL_c` in the call stack.")
// Dump stack when paused.
await WI.debuggerManager.awaitEvent(WI.DebuggerManager.Event.Paused);
InspectorTest.log("PAUSED");
await logAsyncStackTrace();
// Resume and end test.
WI.debuggerManager.resume();
await WI.debuggerManager.awaitEvent(WI.DebuggerManager.Event.Resumed);
InspectorTest.log("RESUMED");
}
});
suite.runTestCasesAndFinish();
}
</script>
</head>
<body onload="runTest()">
<p>Ensure proper tail deleted frames with different call stacks.</p>
</body>
</html>