Deflake preservesPitch tests
This CL changes preservesPitch tests to wait until the audioElement's currentTime is at least 0.5 seconds before trying to detect the pitch. Without this check, the test can try to detect the pitch before the audio has played enough, which can return a dominant frequency of 0Hz and fail the test. The CL also makes a few stylistic changes, and fixes an off-by-one error in the number of increments used to calculate frequencies. Bug: 1096238 Change-Id: I6e98e172862a47bea1c4026737138293914f7906 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2298281 Auto-Submit: Thomas Guilbert <tguilbert@chromium.org> Commit-Queue: Philip Jägenstedt <foolip@chromium.org> Reviewed-by:Philip Jägenstedt <foolip@chromium.org> Cr-Commit-Position: refs/heads/master@{#788535}
Showing
Please register or sign in to comment