Print Preview: Remove use-cloud-print event
This event can cause a race condition in release build tests, since the real event can fire after the original instance of print-preview-app is removed from the DOM and the new one has been attached. This can result in multiple use-cloud-print events (one real, one test) in tests of cloud print behavior. This race condition appears to be exposed by waiting for the HTML Imports polyfill and element definition, which are necessary changes for migrating Print Preview to use the polyfill. There is also no need for a separate event now that Print Preview is using cr.sendWithPromise to handle initial settings instead of relying on chrome.send and multiple calls to CallJavascriptFunctionUnsafe, which needed to be ordered on the C++ side. Instead, we can send the cloud print URL in the initial settings if cloud print is enabled, and always set the cloud print interface before initializing the DestinationStore in JS to guarantee that autoselection of cloud printers works. Bug: 925517 Change-Id: Ifa84ef832ee8d129ab25ab5bfdb0f33882d1b48a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1576120 Commit-Queue: Rebekah Potter <rbpotter@chromium.org> Reviewed-by:Demetrios Papadopoulos <dpapad@chromium.org> Cr-Commit-Position: refs/heads/master@{#652743}
Showing
Please register or sign in to comment