Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(251)

Unified Diff: third_party/WebKit/LayoutTests/inspector/sources/debugger-async/async-await/async-callstack-async-await.html

Issue 2099723002: [LayoutTests] Split up inspector/sources/debugger-async/async-await/async-callstack-async-await.html (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Skip tests except in virtual suite Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/inspector/sources/debugger-async/async-await/async-callstack-async-await.html
diff --git a/third_party/WebKit/LayoutTests/inspector/sources/debugger-async/async-await/async-callstack-async-await.html b/third_party/WebKit/LayoutTests/inspector/sources/debugger-async/async-await/async-callstack-async-await.html
deleted file mode 100644
index dcb1c026c6bf17b26cf98b48cda8047e449b2cd1..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/inspector/sources/debugger-async/async-await/async-callstack-async-await.html
+++ /dev/null
@@ -1,211 +0,0 @@
-<html>
-<head>
-<script src="../../../../http/tests/inspector/inspector-test.js"></script>
-<script src="../../../../http/tests/inspector/debugger-test.js"></script>
-<script>
-
-function timeoutPromise(value, ms)
-{
- return new Promise(function promiseCallback(resolve, reject) {
- function resolvePromise()
- {
- resolve(value);
- }
- function rejectPromise()
- {
- reject(value);
- }
- if (value instanceof Error)
- setTimeout(rejectPromise, ms || 0);
- else
- setTimeout(resolvePromise, ms || 0);
- });
-}
-
-function settledPromise(value)
-{
- function resolveCallback(resolve, reject)
- {
- resolve(value);
- }
- function rejectCallback(resolve, reject)
- {
- reject(value);
- }
- if (value instanceof Error)
- return new Promise(rejectCallback);
- else
- return new Promise(resolveCallback);
-}
-
-function testFunction()
-{
- setTimeout(testFunctionTimeout, 0);
-}
-
-function testFunctionTimeout()
-{
- var functions = [doTestPromiseConstructor, doTestSettledPromisesResolved, doTestSettledPromisesRejected, doTestChainedPromises, doTestChainedPromisesJSON, doTestPromiseAll, doTestThrowFromChain, doTestRejectFromChain, doTestPromiseResolve, doTestPromiseReject];
- for (var i = 0; i < functions.length; ++i)
- functions[i]();
-}
-
-function thenCallback(value)
-{
- debugger;
-}
-
-function errorCallback(error)
-{
- debugger;
-}
-
-async function doTestPromiseConstructor()
-{
- try {
- let result = await new Promise(function promiseCallback(resolve, reject) {
- resolve(1);
- debugger;
- });
- thenCallback(result);
- } catch (e) {
- errorCallback(e);
- }
-}
-
-async function doTestSettledPromisesResolved()
-{
- try {
- let value = await settledPromise("resolved");
- thenCallback(value);
- } catch (e) {
- errorCallback(e);
- }
-}
-
-async function doTestSettledPromisesRejected()
-{
- try {
- let value = await settledPromise(new Error("rejected"));
- thenCallback(value);
- } catch (e) {
- errorCallback(e);
- }
-}
-
-async function doTestChainedPromises()
-{
- try {
- 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 doTestChainedPromisesJSON()
-{
- try {
- let one = await timeoutPromise(1);
- let stringify = await JSON.stringify(one);
- let parse = await JSON.parse(stringify);
- thenCallback(parse);
- } catch (e) {
- errorCallback(e);
- }
-}
-
-async function doTestPromiseAll()
-{
- try {
- let all = await Promise.all([11, 22, 33, 44, 55].map(timeoutPromise));
- thenCallback(all);
- } 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()
-{
- try {
- let result = await Promise.reject(new Error("2"))
- thenCallback(result);
- } catch (e) {
- errorCallback(e);
- }
-}
-
-var test = function()
-{
- var totalDebuggerStatements = 15;
- var maxAsyncCallStackDepth = 5;
- InspectorTest.runAsyncCallStacksTest(totalDebuggerStatements, maxAsyncCallStackDepth);
-}
-
-</script>
-</head>
-
-<body onload="runTest()">
-<p>
-Tests asynchronous call stacks for async functions.
-</p>
-
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698