Fix and enable ExtensionApiTest.Bookmarks
chrome.bookmarks.removeTree is asynchronous. The test wasn't waiting for the result of removeTree before proceeding, hence there was flakiness. This CL changes the test (getRecentSetup) so that we wait for all steps to complete before proceeding to next test. This CL also modifies BookmarksRemoveTreeFunction to not inherit from BookmarksRemoveFunction. Instead make both of them inherit from a separate base (BookmarksRemoveFunctionBase). This eliminates the potential of incorrectly calculating |recursive| variable, because the current code relies on pointer equality (ExtensionFunction::name() == BookmarksRemoveTreeFunction::function_name()) test. The pointer equality check isn't supposed to be stable and it readily fails on ASAN bots. Bug: 383452 Change-Id: Idf3995750b4f7ab647caebe8d1c777a19e708d1e Reviewed-on: https://chromium-review.googlesource.com/899853 Commit-Queue: Istiaque Ahmed <lazyboy@chromium.org> Reviewed-by:Devlin <rdevlin.cronin@chromium.org> Cr-Commit-Position: refs/heads/master@{#534669}
Showing
Please register or sign in to comment