Commit c5074742 authored by Alexey Kozyatinskiy's avatar Alexey Kozyatinskiy Committed by Commit Bot

[DevTools] removed obsolete test

We don't run microtasks on pause to avoid running any code in page
context so Promise rejection is never fired on pause.

TBR=dgozman@chromium.org

Bug: chromium:572723
Change-Id: I9072cd9c2d3de21e55bc7f77875d0308a869b1bb
Reviewed-on: https://chromium-review.googlesource.com/720142
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: default avatarAleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#508924}
parent 8332df81
......@@ -1497,9 +1497,6 @@ crbug.com/564109 [ Win ] virtual/mojo-loading/http/tests/webfont/font-display-i
crbug.com/399951 http/tests/mime/javascript-mimetype-usecounters.html [ Pass Failure ]
crbug.com/399951 virtual/mojo-loading/http/tests/mime/javascript-mimetype-usecounters.html [ Pass Failure ]
crbug.com/572723 http/tests/devtools/sources/debugger/debugger-uncaught-promise-on-pause.html [ Timeout Pass ]
crbug.com/667560 virtual/mojo-loading/http/tests/devtools/sources/debugger/debugger-uncaught-promise-on-pause.html [ Timeout Pass ]
crbug.com/594672 fast/events/iframe-object-onload.html [ Failure Pass ]
crbug.com/594672 fast/events/scale-and-scroll-iframe-body.html [ Failure Pass ]
crbug.com/594672 fast/events/updateLayoutForHitTest.html [ Failure Pass ]
......
CONSOLE MESSAGE: line 10: console.clear
CONSOLE ERROR: line 16: Uncaught (in promise) Error: inspector.err1
CONSOLE ERROR: line 34: Uncaught (in promise) Error: inspector.err2
Tests uncaught promise rejections fired during pause.
Set timer for test function.
debugger-uncaught-promise-on-pause.html:10 Console was cleared
debugger-uncaught-promise-on-pause.html:16 Uncaught (in promise) Error: inspector.err1
runPromises @ debugger-uncaught-promise-on-pause.html:16
timeout @ debugger-uncaught-promise-on-pause.html:41
debugger-uncaught-promise-on-pause.html:34 Uncaught (in promise) Error: inspector.err2
runPromises @ debugger-uncaught-promise-on-pause.html:34
timeout @ debugger-uncaught-promise-on-pause.html:41
<html>
<head>
<script src="../../../inspector/inspector-test.js"></script>
<script src="../../../inspector/console-test.js"></script>
<script src="../../../inspector/debugger-test.js"></script>
<script>
function testFunction()
{
console.clear();
debugger;
}
function runPromises(source)
{
Promise.reject(new Error(source + ".err1"))
.then()
.then()
.then(); // Last is unhandled.
var reject
var m0 = new Promise(function(res, rej) { reject = rej; });
var m1 = m0.then(function() {});
var m2 = m0.then(function() {});
var m3 = m0.then(function() {});
var m4 = 0;
m0.catch(function() {
m2.catch(function() {
m1.catch(function() {
m4 = m3.then(function() {}); // Unhandled.
});
});
});
reject(new Error(source + ".err2"));
}
function runPromisesFromInspector()
{
// setTimeout to cut off VM call frames from the stack trace.
setTimeout(function timeout() {
runPromises("inspector")
}, 0);
}
function test() {
SourcesTestRunner.setQuiet(true);
SourcesTestRunner.startDebuggerTest(step1);
function step1() {
ConsoleTestRunner.addConsoleViewSniffer(addMessage, true);
SourcesTestRunner.runTestFunctionAndWaitUntilPaused(didPause);
}
function didPause(callFrames, reason, breakpointIds, asyncStackTrace) {
TestRunner.evaluateInPage('runPromisesFromInspector()', resumeExecution);
}
function resumeExecution() {
SourcesTestRunner.resumeExecution();
}
var count = 0;
function addMessage(uiMessage) {
if (uiMessage.toString().indexOf('inspector.err') !== -1)
++count;
if (count === 2)
ConsoleTestRunner.expandConsoleMessages(dump);
}
function dump() {
ConsoleTestRunner.dumpConsoleMessagesIgnoreErrorStackFrames();
TestRunner.completeTest();
}
}
</script>
</head>
<body onload="runTest()">
<p>
Tests uncaught promise rejections fired during pause.
</p>
</body>
</html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment