Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: test/wrappers/pages.js

Issue 29886668: Noissue - Fixed: Error was silently ignored in Promise.finally() polyfill in tests (Closed)
Patch Set: Created Sept. 20, 2018, 5:20 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/wrappers/pages.js
===================================================================
--- a/test/wrappers/pages.js
+++ b/test/wrappers/pages.js
@@ -27,7 +27,12 @@
// the built-in finally() method of the Promise object.
function promiseFinally(p, callback)
{
- return p.then(callback, callback);
+ return p.then(
+ callback,
+ err => Promise.resolve(callback()).then(() =>
+ Promise.reject(err)
+ )
+ );
}
function closeWindow(driver, goTo, returnTo, callback)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld