47276d3db3
This method could be called on pause and will do stepInto next scheduled callback if any will happen until next break. First implementation support only callbacks chained by Promise.prototype.then. BUG=chromium:432469 R=yangguo@chromium.org,dgozman@chromium.org Review-Url: https://codereview.chromium.org/2723273002 Cr-Commit-Position: refs/heads/master@{#43616}
192 lines
2.9 KiB
Plaintext
192 lines
2.9 KiB
Plaintext
Checks Debugger.scheduleStepIntoAsync.
|
|
|
|
Running test: testScheduleErrors
|
|
paused at:
|
|
function testNoScheduledTask() {
|
|
#debugger;
|
|
return 42;
|
|
|
|
{
|
|
error : {
|
|
code : -32000
|
|
message : Current scheduled step into async was overriden with new one.
|
|
}
|
|
id : <messageId>
|
|
}
|
|
{
|
|
error : {
|
|
code : -32000
|
|
message : No async tasks were scheduled before pause.
|
|
}
|
|
id : <messageId>
|
|
}
|
|
paused at:
|
|
debugger;
|
|
#return 42;
|
|
}
|
|
|
|
|
|
Running test: testSimple
|
|
paused at:
|
|
function testSimple() {
|
|
#debugger;
|
|
Promise.resolve().then(v => v * 2);
|
|
|
|
paused at:
|
|
debugger;
|
|
#Promise.resolve().then(v => v * 2);
|
|
}
|
|
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
}
|
|
}
|
|
paused at:
|
|
debugger;
|
|
Promise.resolve().then(#v => v * 2);
|
|
}
|
|
|
|
|
|
Running test: testNotResolvedPromise
|
|
paused at:
|
|
var p = new Promise(resolve => resolveCallback = resolve);
|
|
#debugger;
|
|
p.then(v => v * 2);
|
|
|
|
paused at:
|
|
debugger;
|
|
#p.then(v => v * 2);
|
|
resolveCallback();
|
|
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
}
|
|
}
|
|
paused at:
|
|
debugger;
|
|
p.then(#v => v * 2);
|
|
resolveCallback();
|
|
|
|
|
|
Running test: testTwoAsyncTasks
|
|
paused at:
|
|
function testTwoAsyncTasks() {
|
|
#debugger;
|
|
Promise.resolve().then(v => v * 2);
|
|
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
}
|
|
}
|
|
paused at:
|
|
debugger;
|
|
Promise.resolve().then(#v => v * 2);
|
|
Promise.resolve().then(v => v * 4);
|
|
|
|
|
|
Running test: testTwoTasksAndGoToSecond
|
|
paused at:
|
|
function testTwoAsyncTasks() {
|
|
#debugger;
|
|
Promise.resolve().then(v => v * 2);
|
|
|
|
paused at:
|
|
debugger;
|
|
#Promise.resolve().then(v => v * 2);
|
|
Promise.resolve().then(v => v * 4);
|
|
|
|
paused at:
|
|
Promise.resolve().then(v => v * 2);
|
|
#Promise.resolve().then(v => v * 4);
|
|
}
|
|
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
}
|
|
}
|
|
paused at:
|
|
Promise.resolve().then(v => v * 2);
|
|
Promise.resolve().then(#v => v * 4);
|
|
}
|
|
|
|
|
|
Running test: testTwoAsyncTasksWithBreak
|
|
paused at:
|
|
function testTwoAsyncTasksWithBreak() {
|
|
#debugger;
|
|
Promise.resolve().then(v => v * 2);
|
|
|
|
paused at:
|
|
debugger;
|
|
#Promise.resolve().then(v => v * 2);
|
|
debugger;
|
|
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
}
|
|
}
|
|
paused at:
|
|
Promise.resolve().then(v => v * 2);
|
|
#debugger;
|
|
Promise.resolve().then(v => v * 4);
|
|
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
}
|
|
}
|
|
paused at:
|
|
debugger;
|
|
Promise.resolve().then(#v => v * 4);
|
|
}
|
|
|
|
|
|
Running test: testPromiseAll
|
|
paused at:
|
|
function testPromiseAll() {
|
|
#debugger;
|
|
Promise.all([ Promise.resolve(), Promise.resolve() ]).then(v => v * 2);
|
|
|
|
paused at:
|
|
debugger;
|
|
#Promise.all([ Promise.resolve(), Promise.resolve() ]).then(v => v * 2);
|
|
}
|
|
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
}
|
|
}
|
|
paused at:
|
|
debugger;
|
|
Promise.all([ Promise.resolve(), Promise.resolve() ]).then(#v => v * 2);
|
|
}
|
|
|
|
|
|
Running test: testWithBlackboxedCode
|
|
paused at:
|
|
function testBlackboxedCreatePromise() {
|
|
#debugger;
|
|
createPromise().then(v => v * 2);
|
|
|
|
paused at:
|
|
debugger;
|
|
#createPromise().then(v => v * 2);
|
|
}
|
|
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
}
|
|
}
|
|
paused at:
|
|
debugger;
|
|
createPromise().then(#v => v * 2);
|
|
}
|
|
|