| Index: LayoutTests/inspector/console/console-revoke-error-in-worker.html
|
| diff --git a/LayoutTests/inspector/console/console-revoke-error-in-worker.html b/LayoutTests/inspector/console/console-revoke-error-in-worker.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..a566ab9e3142ec9ef451724389cd9c19140bb2ea
|
| --- /dev/null
|
| +++ b/LayoutTests/inspector/console/console-revoke-error-in-worker.html
|
| @@ -0,0 +1,55 @@
|
| +<html>
|
| +<head>
|
| +<script src="../../http/tests/inspector/inspector-test.js"></script>
|
| +<script src="../../http/tests/inspector/console-test.js"></script>
|
| +<script>
|
| +
|
| +var worker;
|
| +
|
| +function createPromise()
|
| +{
|
| + worker = new Worker("resources/worker-with-defer-handled-promise.js");
|
| +}
|
| +
|
| +function handlePromiseRejection()
|
| +{
|
| + worker.postMessage("");
|
| +}
|
| +
|
| +function test()
|
| +{
|
| + WebInspector.multitargetConsoleModel.addEventListener(WebInspector.ConsoleModel.Events.MessageAdded, messageAdded);
|
| +
|
| + InspectorTest.addResult("Creating worker with promise");
|
| + InspectorTest.evaluateInPageWithTimeout("createPromise()");
|
| +
|
| + function messageAdded(event)
|
| + {
|
| + InspectorTest.addResult("");
|
| + InspectorTest.addResult("Message added: " + event.data.level + " " + event.data.type);
|
| + var counter = WebInspector.Main.WarningErrorCounter._instanceForTest;
|
| + for (var counter of counter._counters)
|
| + InspectorTest.addResult(" " + counter.title);
|
| +
|
| + if (event.data.level === WebInspector.ConsoleMessage.MessageLevel.Error) {
|
| + InspectorTest.dumpConsoleMessagesIgnoreErrorStackFrames(false, true);
|
| + InspectorTest.addResult("");
|
| + InspectorTest.addResult("Handling promise");
|
| + InspectorTest.evaluateInPageWithTimeout("handlePromiseRejection()");
|
| + }
|
| +
|
| + if (event.data.level === WebInspector.ConsoleMessage.MessageLevel.RevokedError) {
|
| + InspectorTest.dumpConsoleMessagesIgnoreErrorStackFrames(false, true);
|
| + InspectorTest.completeTest();
|
| + }
|
| + }
|
| +}
|
| +
|
| +</script>
|
| +</head>
|
| +
|
| +<body onload="runTest()">
|
| +<p>Tests that console revokes lazily handled promise rejections.</p>
|
| +
|
| +</body>
|
| +</html>
|
|
|