Move all-PASS baseline optimization to BaselineOptimizer

which is a more logical and intuitive place than Rebaseline.

Besides, we add support for removing redundant all-PASS testharness.js
baselines that are not at the root. This may happen when a platfrom
result becomes all-PASS, when its fallback platforms are already
all-PASS, in which case we only download a new all-PASS baseline to the
platform. The previous optimization only looked at the root.

Bug: 768525
Change-Id: Icf4fa98850f5a72541a20d54217a64daef8cb389
Commit-Queue: Robert Ma <>
Reviewed-by: Quinten Yearsley <>
Cr-Commit-Position: refs/heads/master@{#521173}
5 files changed