Commit a444094d authored by arthursonzogni's avatar arthursonzogni Committed by Commit Bot

[Origin] Temporary exclude test case from fuzzer.

The origin stored inside and outside blink uses a different convention
for the "unspecified" port.

                      ┌──────────────────┬───────────┐
                      │ port unspecified │ port zero │
┌─────────────────────┼──────────────────┼───────────┤
│url::Origin          │ -1               │ 0         │
├─────────────────────┼──────────────────┼───────────┤
│blink::SecurityOrigin│ 0                │ 0         │
└─────────────────────┴──────────────────┴───────────┘

As a result, this property do not survive the conversion in between
those types.

This patch temporary provide different expectations, so that the fuzzer
can continue to explore more cases.

Fixed: 1143052
Bug: 1136678,1143052
Change-Id: Ibbc9f5757a190c52fdb0d8c26c0b98cc30f353fd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2505649Reviewed-by: default avatarMike West <mkwst@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#821715}
parent 2aa57793
......@@ -32,6 +32,24 @@ void RoundTripFromContent(const GURL& input) {
WebSecurityOrigin web_security_origin_2 = security_origin;
url::Origin origin_2 = web_security_origin_2;
// The notion of unspecified port and port zero doesn't match in between
// url::Origin and blink::SecurityOrigin. This cause some conversion problems.
// ┌──────────────────┬───────────┐
// │ port unspecified │ port zero │
// ┌─────────────────────┼──────────────────┼───────────┤
// │url::Origin │ -1 │ 0 │
// ├─────────────────────┼──────────────────┼───────────┤
// │blink::SecurityOrigin│ 0 │ 0 │
// └─────────────────────┴──────────────────┴───────────┘
// TODO(https://crbug.com/1136678): Remove this, once fixed.
if (!origin_1.opaque() && origin_1.port() == 0) {
CHECK_NE(origin_1, origin_2);
CHECK_EQ(url::DefaultPortForScheme(origin_2.scheme().data(),
origin_2.scheme().size()),
origin_2.port());
return;
}
CHECK_EQ(origin_1, origin_2);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment