This restores commit 748bb5a0f1, along with a fix for a Chromium test suite build issue (and a new test for that case). Differential Revision: https://reviews.llvm.org/D73242
748bb5a0f1