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

security_origin_fuzzer: remove exception for port zero.

This was a TODO(https://crbug.com/1136678). The associated bug has been
fixed.

TBR=mkwst@chromium.org

Fixed: 1151647
Bug: 1136678,1151647
Change-Id: I74e73d83be87a063b7a5266f64d6a5abba7e1dec
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2552411
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: default avatarArthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: default avatarDavid Van Cleve <davidvc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#830219}
parent 80f7b9eb
......@@ -32,28 +32,6 @@ 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
// when the scheme is a standard one and the unspecified port can be converted
// to the default one.
// ┌──────────────────┬───────────┐
// │ 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 &&
url::DefaultPortForScheme(origin_1.scheme().data(),
origin_1.scheme().size()) != -1) {
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