Files
firefox/devtools/client/debugger/test/mochitest/doc_promise.html
T
Paolo Amadini 7afba17088 Bug 1362970 - Part 2 - Script-generated patch to convert .then(null, ...) to .catch(...). r=florian
Changes to Promise tests designed to test .then(null) have been reverted, and the browser/extensions directory was excluded because the projects it contains have a separate process for accepting changes.

MozReview-Commit-ID: 1buqgX1EP4P
2017-06-19 11:32:37 +01:00

31 lines
771 B
HTML

<!-- Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Debugger + Promise test page</title>
</head>
<body>
<script>
window.pending = new Promise(function () {});
window.fulfilled = Promise.resolve({ a: 1, b: 2, c: 3 });
window.rejected = Promise.reject(new Error("uh oh"));
window.doPause = function () {
var p = window.pending;
var f = window.fulfilled;
var r = window.rejected;
debugger;
};
// Attach an error handler so that the logs don't have a warning about an
// unhandled, rejected promise.
window.rejected.catch(function () {});
</script>
</body>
</html>