Introduce mechanism for junit tests to use GURLs
Introduces JUnitTestGURLs, which returns GURLs generated from serialized GURLs for use in junit tests where the native library cannot be loaded. This allows junit tests to do simple operations with GURLs and allow unit testing of classes that use GURL without caring too much about more complex things like formatting or comparing origins, etc. The alternative to this is migrating the junit tests to instrumentation tests, but this isn't always feasible. For example, QualityEnforcerUnitTest is really difficult to re-write as an instrumentation test because of how it mocks out Activity behaviour and tests toasts. Bug: 783819 Change-Id: I37cf3a869958bd30e7ae86d2b212fd19961c1d7e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2417063Reviewed-by:Chris Palmer <palmer@chromium.org> Reviewed-by:
Yaron Friedman <yfriedman@chromium.org> Commit-Queue: Michael Thiessen <mthiesse@chromium.org> Cr-Commit-Position: refs/heads/master@{#808347}
Showing
Please register or sign in to comment