-
Dan McArdle authored
In a prior CL [1], I added the CheckIdempotency() function, which tests that GURL canonicalization produces a fixed point the first time it's called. There was some confusion whether CheckIdempotency was duplicating logic that already existed in the fuzzer; the fuzzer already had a few lines to copy the GURL with a no-op call to ReplaceComponents and check that the spec string is unchanged. This "copy check" is subtly different than the idempotency check. In particular, it cannot catch the "file:///.//" -> "file:////" -> "file:///" bug because it never reaches DoParseFileURL. For context, the non-idempotency bug for "file:///.//" arises because * DoPartialPath drops "./", taking "file:///.//" to "file:////" * DoParseFileURL collapses "//" to "/", taking "file:////" to "file:///". [1]: http://crrev.com/c/2414615 Bug: 1128999 Change-Id: Ib35982f56cac3ced23d13def74f073a0245bdee3 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2424764Reviewed-by:
Charlie Harrison <csharrison@chromium.org> Reviewed-by:
Vaclav Brozek <vabr@chromium.org> Commit-Queue: Dan McArdle <dmcardle@chromium.org> Cr-Commit-Position: refs/heads/master@{#810286}
b42f618b