PDF Viewer: Return a Promise from getViewportFromUrlParams().
The API was previously callback-based, instead of Promise-based. Callback-based APIs are more tedious to use. As a concrete example, the PDFExtensionJSTest.ParamsParser tests were incorrectly not waiting for any of the callbacks to execute before declaring the test successful. In the process also - Changed Navigator#navigate() to return a Promise, instead of firing a 'navigate-for-testing' event. - Fixed incorrect type annotation for OpenPdfParams#viewPosition. Bug: None Change-Id: Ib14b6499d3c661bb62c21c1836324ceecf1494ea Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2618219 Commit-Queue: Daniel Hosseinian <dhoss@chromium.org> Reviewed-by:Daniel Hosseinian <dhoss@chromium.org> Auto-Submit: dpapad <dpapad@chromium.org> Cr-Commit-Position: refs/heads/master@{#842168}
Showing
This diff is collapsed.
Please register or sign in to comment