Layout tests: Enable fetching generated files from the build directory.

This CL allows URLs that start with "file:///gen/" to be mapped to the files in "<build_dir>/gen/".

One use case is to allow loading generated mojom.js files using <script> tag. (We are already loading those generated mojom.js files, but using a special JS function exposed to the testing environment for AMD-style module loading. This CL is a cleaner approach.)

BUG=699569
TBR=jam@chromium.org
(jam@ delegated to other reviewers)

Review-Url: https://codereview.chromium.org/2759803002
Cr-Commit-Position: refs/heads/master@{#459641}
3 files changed