Commit 759581ea authored by kozyatinskiy's avatar kozyatinskiy Committed by Commit bot

[inspector] test for fixed empty stack processing in console.count

BUG=chromium:644629
R=dgozman@chromium.org

Review-Url: https://codereview.chromium.org/2370033003
Cr-Commit-Position: refs/heads/master@{#39938}
parent cfed56c2
setTimeout(console.count, 0) doesn't crash with enabled async stacks.
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
print("setTimeout(console.count, 0) doesn't crash with enabled async stacks.")
InspectorTest.sendCommand("Debugger.enable", {});
InspectorTest.sendCommand("Debugger.setAsyncCallStackDepth", { maxDepth: 1 });
InspectorTest.sendCommand("Runtime.evaluate", { expression: "setTimeout(console.count, 0)" });
InspectorTest.completeTestAfterPendingTimeouts();
......@@ -156,6 +156,13 @@ InspectorTest.logMessage = function(message)
InspectorTest.completeTest = quit.bind(null);
InspectorTest.completeTestAfterPendingTimeouts = function()
{
InspectorTest.sendCommand("Runtime.evaluate", {
expression: "new Promise(resolve => setTimeout(resolve, 0))",
awaitPromise: true }, InspectorTest.completeTest);
}
InspectorTest.evaluateInPage = function(string, callback)
{
InspectorTest.sendCommand("Runtime.evaluate", { "expression": string }, function(message) {
......
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