Fix flaky CertificateProviderApiTest.Basic test.
The flakiness was caused by waiting for a wrong number of JavaScript test results, which resulted in inconsistency between events that were expected to happen and the events that have actually happened. In a detailed manner, the reportCertificates callback in file basic.js is wrapped through chrome.test.callbackPass method, which itself calls chrome.test.succeed method; meanwhile the C++ code in certificate_provider_apitest.cc didn't expect this chrome.test.succeed call, and it behaved as if the chrome.certificateProvider.onSignDigestRequested event handler was already executed - which is not always true and causes flakiness. BUG=576364 Review URL: https://codereview.chromium.org/1632053002 Cr-Commit-Position: refs/heads/master@{#371501}
Showing
Please register or sign in to comment