Fix Platform Keys API tests flakiness
Before this CL, platform keys API tests were disabled because they were flaky. The main reason behind that was mixing chrome.test.callbackPass() and chrome.test.succeed() in more than one test. This introduces unpredictable behavior as if the callback counter is incremented anywhere in a test function, the test infrastructure will automatically invoke chrome.test.succeed(). For more information about this problem, please refer to https://chromium.googlesource.com/chromium/src.git/+/master/extensions/docs/testing_api.md#don_t-mix-chrome_test_callbackpass_et-al_and-chrome_test_succeed This CL fixes mixing chrome.test.callbackPass() and chrome.test.succeed() by adapting only one of them in each test. This is a quick fix so as to include platform keys API tests again in trybots, but a refactor to totally avoid using callbackPass is being tracked in crbug.com/1154680. The flakiness is verified to be fixed by running the suite 20 consecutive successful times using the following command. browser_tests --gtest_filter=*EnterprisePlatform* --gtest_repeat=20 Bug: 1157137 Change-Id: If7a94d4cc37e5b0719d18fdd3a9cef425de17ca1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2624473Reviewed-by:Maksim Ivanov <emaxx@chromium.org> Commit-Queue: Omar Morsi <omorsi@google.com> Cr-Commit-Position: refs/heads/master@{#843993}
Showing
Please register or sign in to comment