Update js2gtest rule to support source-absolute paths.

See either of the two .unitjs files for how this change makes test slightly simpler.
BUILD rules (including js2gtest) support source absolute paths (eg //foo/bar.js),
however the js compilation step of the js2gtest rule only supported relative paths.
So from within the test, the GEN_INCLUDE would have to be '../../../../../foo/bar.js'.
This is fragile (breaks if the test is moved) and surprising (the source-absolute
syntax works in the BUILD file but not in the associated JS file).

This change fixes the js2gtest rule to support source-absolute syntax, and,
switches one js2gtest rule to use the new feature as proof it works.

Other js2gtests rules are left as-is to prove nothing is broken.

Change-Id: Id153e35dd9d88bf6fc9c0e26f0de23ab17a1e003
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1547734
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: David Tseng <dtseng@chromium.org>
Commit-Queue: A Olsen <olsen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#653119}
6 files changed