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

Unified Diff: LayoutTests/inspector/console/console-revoke-error-in-worker.html

Issue 1095943002: DevTools: [console] Logged promise rejections do not change state once handled (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: for landing Created 5 years, 8 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: 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..15116eed9099505b31ff8270b2ba1ffeea7291ed
--- /dev/null
+++ b/LayoutTests/inspector/console/console-revoke-error-in-worker.html
@@ -0,0 +1,57 @@
+<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);
+ WebInspector.multitargetConsoleModel.addEventListener(WebInspector.ConsoleModel.Events.MessageUpdated, messageUpdated);
+
+ 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.dumpConsoleClassesBrief();
+ InspectorTest.addResult("");
+ InspectorTest.addResult("Handling promise");
+ InspectorTest.evaluateInPageWithTimeout("handlePromiseRejection()");
+ }
+ }
+
+ function messageUpdated()
+ {
+ InspectorTest.dumpConsoleClassesBrief();
+ InspectorTest.completeTest();
+ }
+}
+
+</script>
+</head>
+
+<body onload="runTest()">
+<p>Tests that console revokes lazily handled promise rejections.</p>
+
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698