Merge "Make download manager tests more reliable." into jb-mr2-dev