| Index: third_party/WebKit/LayoutTests/inspector/sources/debugger-async/async-await/async-callstack-async-await2.html
|
| diff --git a/third_party/WebKit/LayoutTests/inspector/sources/debugger-async/async-await/async-callstack-async-await2.html b/third_party/WebKit/LayoutTests/inspector/sources/debugger-async/async-await/async-callstack-async-await2.html
|
| index 77b73e4958935df4a9a8a511d472986d3edf7a8d..d87dd49426a59780cd6992b9e0bb7c643a645cfe 100644
|
| --- a/third_party/WebKit/LayoutTests/inspector/sources/debugger-async/async-await/async-callstack-async-await2.html
|
| +++ b/third_party/WebKit/LayoutTests/inspector/sources/debugger-async/async-await/async-callstack-async-await2.html
|
| @@ -45,7 +45,7 @@ function testFunction()
|
|
|
| function testFunctionTimeout()
|
| {
|
| - var functions = [doTestPromiseAll, doTestThrowFromChain, doTestRejectFromChain, doTestPromiseResolve, doTestPromiseReject];
|
| + var functions = [doTestChainedPromises, doTestChainedPromisesJSON];
|
| for (var i = 0; i < functions.length; ++i)
|
| functions[i]();
|
| }
|
| @@ -60,71 +60,30 @@ function errorCallback(error)
|
| debugger;
|
| }
|
|
|
| -async function doTestPromiseAll()
|
| +async function doTestChainedPromises()
|
| {
|
| try {
|
| - let all = await Promise.all([11, 22, 33, 44, 55].map(timeoutPromise));
|
| - thenCallback(all);
|
| + await timeoutPromise(1);
|
| + debugger;
|
| + await timeoutPromise(2);
|
| + debugger;
|
| + await 3;
|
| + debugger;
|
| + await settledPromise(4);
|
| + debugger;
|
| + thenCallback(await timeoutPromise(5));
|
| } catch (e) {
|
| errorCallback(e);
|
| }
|
| }
|
|
|
| -async function throwFromChain()
|
| -{
|
| - await timeoutPromise(1);
|
| - await timeoutPromise(2);
|
| - await settledPromise(3);
|
| - throw Error("thrown from 4");
|
| - await timeoutPromise(5);
|
| - debugger;
|
| -}
|
| -
|
| -async function doTestThrowFromChain()
|
| -{
|
| - try {
|
| - let result = await throwFromChain();
|
| - thencallback(result);
|
| - } catch (e) {
|
| - errorCallback(e);
|
| - }
|
| -}
|
| -
|
| -async function rejectFromChain()
|
| -{
|
| - await timeoutPromise(1);
|
| - await timeoutPromise(2);
|
| - await timeoutPromise(3);
|
| - await timeoutPromise(new Error(4));
|
| - throw new Error("thrown from rejectFromChain");
|
| - debugger;
|
| -}
|
| -
|
| -async function doTestRejectFromChain()
|
| -{
|
| - try {
|
| - let result = await rejectFromChain();
|
| - thenCallback(result);
|
| - } catch (e) {
|
| - errorCallback(e);
|
| - }
|
| -}
|
| -
|
| -async function doTestPromiseResolve()
|
| -{
|
| - try {
|
| - let result = await Promise.resolve(1);
|
| - thenCallback(result);
|
| - } catch (e) {
|
| - errorCallback(e);
|
| - }
|
| -}
|
| -
|
| -async function doTestPromiseReject()
|
| +async function doTestChainedPromisesJSON()
|
| {
|
| try {
|
| - let result = await Promise.reject(new Error("2"))
|
| - thenCallback(result);
|
| + let one = await timeoutPromise(1);
|
| + let stringify = await JSON.stringify(one);
|
| + let parse = await JSON.parse(stringify);
|
| + thenCallback(parse);
|
| } catch (e) {
|
| errorCallback(e);
|
| }
|
| @@ -132,7 +91,7 @@ async function doTestPromiseReject()
|
|
|
| var test = function()
|
| {
|
| - var totalDebuggerStatements = 5;
|
| + var totalDebuggerStatements = 6;
|
| var maxAsyncCallStackDepth = 5;
|
| InspectorTest.runAsyncCallStacksTest(totalDebuggerStatements, maxAsyncCallStackDepth);
|
| }
|
|
|