Status Update
Comments
tk...@chromium.org <tk...@chromium.org> #2
[Monorail components: Blink>Network]
ar...@google.com <ar...@google.com> #3
ph...@chromium.org <ph...@chromium.org> #4
ph...@chromium.org <ph...@chromium.org> #5
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #6
commit 5c2514f6082f00006ab0daa25cccaffb29e3843a
Author: Kenichi Ishibashi <bashi@chromium.org>
Date: Mon Mar 13 06:41:47 2023
Remove quic-transport scheme
`quic-transport` scheme was introduced for the QuicTransport API, but
it was replaced with the WebTransport API. The WebTransport API uses `https` scheme. Chromium doesn't use `quic-transport` scheme in any
place.
Note that this scheme does nothing for a proxy that uses QUIC as the
underlying transport layer. A proxy may use HTTP/3 but the scheme
should be `https` in that case.
Bug: 1416006
Change-Id: I595f42e2676dc712c1aab1426de3f7c51ad61c73
Reviewed-on:
Commit-Queue: Kenichi Ishibashi <bashi@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Reviewed-by: Charlie Harrison <csharrison@chromium.org>
Reviewed-by: Varun Khaneja <vakh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1116250}
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
gj...@google.com <gj...@google.com> #7
na...@google.com <na...@google.com> #8
gj...@google.com <gj...@google.com> #9
gj...@google.com <gj...@google.com> #10
gj...@google.com <gj...@google.com> #11
de...@google.com <de...@google.com> #12
ha...@chromium.org <ha...@chromium.org> #13
ha...@chromium.org <ha...@chromium.org> #16
ha...@chromium.org <ha...@chromium.org> #17
It seems some of these issues overlap.
To streamline issue management and tracking, I would like to merge these reports into a single issue:
If I find it's more appropriate to create a sub issue for specific aspects, I'll do so.
For now, consolidating these reports into one issue will help us track and address potential root causes more effectively.
ha...@chromium.org <ha...@chromium.org> #18
ha...@chromium.org <ha...@chromium.org> #19
ha...@chromium.org <ha...@chromium.org> #20
ha...@chromium.org <ha...@chromium.org> #21
ha...@chromium.org <ha...@chromium.org> #22
ph...@chromium.org <ph...@chromium.org> #23
pm...@chromium.org <pm...@chromium.org> #24
pm...@chromium.org <pm...@chromium.org> #25
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #26
commit 67985d6809954707cdcdf17698f36254c1f45d9b
Author: Hayato Ito <hayato@chromium.org>
Date: Thu Oct 26 01:11:29 2023
Refactor url_parse_unittest.cc
This CL is pure refacotring, to prepare for
No behavior is changed.
Suppress clang-tidy warnings by fixing the followings:
- [modernize-use-nullptr]: Use nullptr
- [modernize-loop-convert]: Use range-based for loop instead
Bug: 1416006
Change-Id: I13f7297396b6800508a65f48fd72b4890964e428
Reviewed-on:
Auto-Submit: Hayato Ito <hayato@chromium.org>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1215252}
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #27
commit 14e638ecc947e45be51df41bdd1b624bba12eed3
Author: Hayato Ito <hayato@chromium.org>
Date: Mon Oct 30 02:22:58 2023
Refactor url_util_unittest.cc
This CL is pure refacotring, to prepare for
No behavior is changed.
Suppress clang-tidy warnings by fixing the followings:
- [modernize-use-nullptr]: Use nullptr
- [modernize-loop-convert]: Use range-based for loop instead
Bug: 1416006
Change-Id: If44052025fbbb2cd9b4701bd8b50775f85ab19ba
Reviewed-on:
Reviewed-by: Adam Rice <ricea@chromium.org>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1216750}
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #28
commit d311bb222cf8924118c336c8de95d4e7c44e6893
Author: Hayato Ito <hayato@chromium.org>
Date: Fri Nov 10 01:35:55 2023
Add a feature flag for standard-compliant non-special scheme URL parsing
This CL is separate from the main CL (
As a first step, this CL adds a URL feature flag and a virtual test with
it.
Bug: 1416006
Change-Id: I12533902bffff2e74bd48b98833c1dd13aeddf5d
Reviewed-on:
Commit-Queue: Hayato Ito <hayato@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1222683}
[add]
[add]
[modify]
[modify]
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #30
commit 2579d83bbdf1b6893506568fce4916ead75715c4
Author: Hayato Ito <hayato@chromium.org>
Date: Wed Nov 29 07:57:40 2023
Rename IsURLSlash to IsSlashOrBackslash
This CL is separate from
This is a pure renaming, no behavior change.
Bug: 1416006
Change-Id: Id861375a9b7344f3775246fbf9991752ec28c5c5
Reviewed-on:
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1230486}
[modify]
[modify]
[modify]
[modify]
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #31
commit b37956bf218bc0780bb7264c21bb41b4d7e07353
Author: Hayato Ito <hayato@chromium.org>
Date: Mon Dec 04 05:01:52 2023
Add non-special scheme URLs parser
This CL is separate from the main CL (
This CL adds a URL parser for non-special URLs.
The newly added parser functions are currently unused and will be used
in following CLs. Thus, guarding these functions by the flag is
unnecessary at this point.
As described in `url/README.md`, URL library has two layers:
1. Parsing
2. Canonicalization
This CL updates "Parsing" layer for non-special URLs.
Canonicalization of non-special URLs is a more complex task. It will be
addressed in following CLs.
Tests:
This CL adds minimal unit tests for the ParseNonSpecialURL() function.
These tests should be sufficient to verify the basic behavior of the
parser.
The WPT URL tests have a good coverage for non-special URLs and will be
used in following CLs, so I don't add much unit tests in this CL to
avoid duplication.
Bug: 1416006
Change-Id: Ibe5450ccdd4fc6d5c2386b1e838e9e254ce90308
Reviewed-on:
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Timothy Gu <timothygu@chromium.org>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1232562}
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #32
commit 203c30248db0dc01c52429ea2664a139396f2203
Author: Hayato Ito <hayato@chromium.org>
Date: Mon Dec 11 04:58:57 2023
[URL] Canonicalize hosts in non special URLs
This CL, separate from the main CL (
several functions to canonicalize hosts in non-special URLs,
implementing the following URL Standard sections:
-
-
The newly added functions are currently unused and will be used
in following CLs. Thus, guarding these functions by the flag is
unnecessary at this point.
Tests:
This CL adds minimal unit tests for CanonicalizeNonSpecialHost(...)
functions. These tests should be sufficient to verify the basic behavior
of the canonicalization functions.
The WPT URL tests have a good coverage for non-special URLs and will be
used in following CLs.
Bug: 1416006
Change-Id: I762053754bcf3417e277e660a9d83833573ddb2c
Reviewed-on:
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1235585}
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #33
commit 727115f21900e7b5851854e9233c02d59534fba9
Author: Hayato Ito <hayato@chromium.org>
Date: Mon Dec 11 06:41:58 2023
[URL] Support non-special URLs in CanonicalizePath
This CL, separate from the main CL (
updates the canonicalize functions for URL paths to consider non-special
URLs, implementing the following URL Standard sections:
-
-
The URL Standard is a bit difficult to read, so here is the summary of
the changes for non-special URLs:
- Backslashes (\) are no longer treated as path separators.
- The canonical path is empty instead of a single slash (/) if no path
component is present.
Bug: 1416006
Change-Id: I18303f021cc27eea6f2b33ba3dc575a9f512c26c
Reviewed-on:
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1235601}
[modify]
[modify]
[modify]
[modify]
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #34
commit 735a5cbcef5c4d88e84b2258ad6cfdf05300e2a3
Author: Hayato Ito <hayato@chromium.org>
Date: Wed Dec 13 02:49:38 2023
[URL] Canonicalize non-special URLs
Add CanonicalizeNonSpecialURL functions, putting the followings into
together:
-
-
-
This CL is separate from the main CL (
Bug: 1416006
Change-Id: If7125ff5f052e465dcaa5876061690697899872b
Reviewed-on:
Reviewed-by: Timothy Gu <timothygu@chromium.org>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1236752}
[modify]
[modify]
[modify]
[modify]
[modify]
[add]
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #35
commit 08f24b9178f337a0ce50c143daab639cd85e3169
Author: Hayato Ito <hayato@chromium.org>
Date: Wed Dec 13 10:01:41 2023
[URL] Remove unused parameters
Remove unused parameters and template parameters from:
- url::CanonicalizeStandardURL
- url::CanonicalizeFileSystemURL
- DoCanonicalizeFileSystemURL
Bug: 1416006
Change-Id: I40f29d53c947aae6c09b3809a2378ea19c212a0f
Reviewed-on:
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Reviewed-by: Viktor Semeniuk <vsemeniuk@google.com>
Commit-Queue: Viktor Semeniuk <vsemeniuk@google.com>
Auto-Submit: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1236868}
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #36
commit 667ad268cecc08965eeb12ea56f79f3fa3a24d0d
Author: Hayato Ito <hayato@chromium.org>
Date: Wed Jan 24 08:45:39 2024
Add a comment to mention the EarlyAccess allow list
See
Bug: 1520386,1416006
Change-Id: Ia50a361faed473500331dcabb15d8910dbe31e55
Reviewed-on:
Reviewed-by: Adam Rice <ricea@chromium.org>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1251298}
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #37
commit f3ae9cad5b60b2ef99d117d298f916f21c29657c
Author: Hayato Ito <hayato@chromium.org>
Date: Mon Jan 29 07:20:01 2024
[URL] Carry over parsed.host correctly in canonicalizing url's host
The current code incorrectly assigns an invalid Component ({0, -1}) to
`out_host` during URL canonicalization, even when the input host is
empty (e.g. {6, 0}). Fix that because the difference matters in
non-special URLs.
This is a blocking issue for
Bug: 1416006
Change-Id: I6894aa3af6819c70e5cc8feb8ba64ef3c52e00f3
Reviewed-on:
Reviewed-by: Timothy Gu <timothygu@chromium.org>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1253173}
[modify]
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #38
commit 0f402c037c5a86d11eafe654dd454a6e6cac9a5c
Author: Hayato Ito <hayato@chromium.org>
Date: Mon Jan 29 07:53:13 2024
[URL] Support non-special URLs in Resolve()
Implement correct support for non-special URLs in gurl::Resolve() and
other functions, which are used on resolving a relative URL on a given
base URL.
Example:
Prior to this change:
> new URL("path", "git://host/") => throws an invalid URL error
After this change:
> new URL("path", "git://host/") => "git://host/path""
The feature is currently guarded by the flag.
This CL adds several parameterized unit tests to test flag-dependent
behaviors. Currently flag-independent behaviors are not tested with
the flag. I will revisit this later.
Though this CL introduces new expectation files for virtual tests,
there is no regression and the total number of test failures has
decreased. I use rebaseline cl tool and accept the result as is. It
seems there are several expectation files across different platforms,
accumulated over time.
Bug: 1416006
Change-Id: Ib52e9977867befa1483f7821c469a4dd8f427627
Reviewed-on:
Reviewed-by: Timothy Gu <timothygu@chromium.org>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1253180}
[modify]
[modify]
[add]
[modify]
[modify]
[add]
[modify]
[modify]
[modify]
[add]
[add]
[modify]
[add]
[modify]
[add]
he...@chromium.org <he...@chromium.org> #39
--- /b/s/w/io7pu4bthf/layout-test-results/webaudio/internals/audioworkletprocessor-gc.https-expected.txt
+++ /b/s/w/io7pu4bthf/layout-test-results/webaudio/internals/audioworkletprocessor-gc.https-actual.txt
@@ -1,5 +1,3 @@
This is a testharness.js-based test.
-[FAIL] Test GC of AudioWorkletProcessor
- assert_equals: the initial handler count should be zero. expected 0 but got 5
Harness: the test ran to completion.
I will go ahead and revert the CL.
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #40
commit 54148048e463a6945fadba1f885856c388e64e78
Author: Alexander Hendrich <hendrich@chromium.org>
Date: Mon Jan 29 10:48:19 2024
Revert "[URL] Support non-special URLs in Resolve()"
This reverts commit 0f402c037c5a86d11eafe654dd454a6e6cac9a5c.
Reason for revert: fails on linux bot (
Original change's description:
Bug: 1416006
Change-Id: I839ec6d567bbe36351c8c530526113c1e94c7f07
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on:
Auto-Submit: Alexander Hendrich <hendrich@chromium.org>
Owners-Override: Alexander Hendrich <hendrich@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Alexander Hendrich <hendrich@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1253214}
[modify]
[modify]
[delete]
[modify]
[modify]
[delete]
[modify]
[modify]
[modify]
[delete]
[delete]
[modify]
[delete]
[modify]
[delete]
he...@chromium.org <he...@chromium.org> #41
Failure reason:
gurl.cc(120): Check failed: test_url.parsed_.host == parsed_.host ({0, -1} vs. {7, 0})
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #42
commit b505aca89dc9b2860a0bb480c19d571faacb67be
Author: Joshua Hood <jdh@chromium.org>
Date: Mon Jan 29 13:39:32 2024
Revert "[URL] Carry over parsed.host correctly in canonicalizing url's host"
This reverts commit f3ae9cad5b60b2ef99d117d298f916f21c29657c.
Reason for revert:
Original change's description:
Bug: 1416006
Change-Id: Ic53dda4105bd01db1558e26476d3233ec37f280b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on:
Owners-Override: Joshua Hood <jdh@chromium.org>
Auto-Submit: Joshua Hood <jdh@chromium.org>
Commit-Queue: Joshua Hood <jdh@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1253259}
[modify]
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #43
commit bbdc90b76304d8fa34b9b65e9b942e88352519e3
Author: Hayato Ito <hayato@chromium.org>
Date: Wed Jan 31 02:57:28 2024
Reland "[URL] Carry over parsed.host correctly in canonicalizing url's host"
This is a reland of commit f3ae9cad5b60b2ef99d117d298f916f21c29657c
The diff to the reveted CL is
The reverted CL caused a DCHECK() error [1] inside the NDEBUG block of
the GURL sanitizer check. It is likely that the CQ try bots do not
include any debug bots by default.
I ran linux_chromium_dbg_ng in CQ try too this time.
Although I added a comment why we need to handle Component(0, 0)
specially, it's a bit complicated topic. I will revisit this when I
update url::Origin and other code to support empty hosts of
non-special URLs in a more robust manner.
- [1]
Original change's description:
Bug: 1416006
Change-Id: I097f39f2cad8a20d13e242594734bf8f9428b853
Reviewed-on:
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1254331}
[modify]
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #44
commit 1087d8e07c2948dbcd195cd7c700037b4b5bc3b0
Author: Hayato Ito <hayato@chromium.org>
Date: Wed Jan 31 05:48:13 2024
Reland "[URL] Support non-special URLs in Resolve()"
This is a reland of commit 0f402c037c5a86d11eafe654dd454a6e6cac9a5c
The diff to the reveted CL is
I removed expectation files under
flag-specific/disable-site-isolation-trials that were introduced by a
previous 'rebaseline cl'.
While the tool aims to update expectations accurately, it seems
manual verification is still needed.
Original change's description:
Bug: 1416006
Change-Id: I60b2a26fb796a19a20034055abba3214e50ebaee
Reviewed-on:
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1254363}
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[add]
[add]
[modify]
[add]
[modify]
[add]
is...@google.com <is...@google.com> #45
[Monorail blocking:
[Monorail mergedwith:
[Monorail components added to Component Tags custom field.]
ap...@google.com <ap...@google.com> #46
Branch: main
commit be97d681ef495b558cf1bc64ba296d1a7b6d42d2
Author: Hayato Ito <hayato@chromium.org>
Date: Tue Feb 06 09:40:57 2024
[URL] Support non-special URLs in ReplaceComponents()
Implement correct support for non-special URLs in
gurl::ReplaceComponents().
Example:
Prior to this change:
> const url = new URL("git://host/path")
> url.host = "hello";
> url.pathname = "world";
> url.href
"git://host/path"
After this change:
> const url = new URL("git://host/path")
> url.host = "hello";
> url.pathname = "world";
> url.href
"git://hello/world"
This CL also adds ParseNonSpecialURLInternal(...) functions with
`trim_path_end` parameter, which is required to support the following
tricky case, preserving a trailing whitespace in paths when removing a
hash.
> const url = new URL("git://host/path #a")
> url.hash = "";
> url.href
"git://host/path%20"
Note: The existing ParsePathURL(...) has a similar `trim_path_end` parameter.
Bug: 1416006
Change-Id: Ibc7aaed7a9b4a1ab608eb1d90e961f1cc8921c0c
Reviewed-on:
Commit-Queue: Hayato Ito <hayato@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Timothy Gu <timothygu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1256669}
M third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-setters-a-area.window_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-setters-a-area.window_include=javascript-expected.txt
M third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-setters-stripping.any-expected.txt
M third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-setters-stripping.any.worker-expected.txt
M third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-setters.any.worker_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-setters.any.worker_include=javascript-expected.txt
M third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-setters.any_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-setters.any_include=javascript-expected.txt
M url/gurl_unittest.cc
M url/third_party/mozilla/url_parse.cc
M url/url_canon.h
M url/url_canon_internal.cc
M url/url_canon_non_special_url.cc
M url/url_canon_unittest.cc
M url/url_parse_internal.h
M url/url_util.cc
M url/url_util_unittest.cc
ap...@google.com <ap...@google.com> #47
Branch: main
commit f78f2dae48473a10e962dab92a5b725b75a74001
Author: Hayato Ito <hayato@chromium.org>
Date: Tue Feb 06 22:56:40 2024
[URL] Removes a test case which was moved to flag-dependent tests
The test case was already migrated to flag-dependent tests in a
previous CL,
I forgot to remove the test case from the original location.
Bug: 1416006
Change-Id: I5ab40095d6a79e69040ccc2d9a2d208d7cb243b1
Reviewed-on:
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Auto-Submit: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1257048}
M url/url_util_unittest.cc
ap...@google.com <ap...@google.com> #48
Branch: main
commit a2bacc3a698bc74d61ff47ca4039dbf245d6953a
Author: Hayato Ito <hayato@chromium.org>
Date: Fri Feb 09 07:02:51 2024
[URL] Migrate some tests in gurl_unittest to flag-dependent tests
Bug: 40063064
Change-Id: Iff261b92d88cc22dd1666d0c5be246302c482fce
Reviewed-on:
Commit-Queue: Hayato Ito <hayato@chromium.org>
Reviewed-by: Timothy Gu <timothygu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1258379}
M url/gurl.h
M url/gurl_unittest.cc
ap...@google.com <ap...@google.com> #49
Branch: main
commit a5bb75e1fdd2f34e49038998af3844f3f9f7b9b5
Author: Hayato Ito <hayato@chromium.org>
Date: Fri Feb 09 07:19:04 2024
[URL] Disallow setting user/password/port for URLs with empty hosts
This CL aligns with the URL Standard by preventing the setting of
user, password, or port for URLs that don't permit them, specifically
when the host is null or empty.
This is a follow-up of the previous review:
Prior to this change:
> const url = "git:///";
> url.username = "x";
> url.href
"git://x@/"
After this change:
> const url = "git:///";
> url.username = "x";
> url.href
"git:///"
The URL Standard:
-
Username/password/port setters:
-
-
-
Since non-special URLs can now have a null or empty host, we should
consider a case where users set username/password/port for valid URLs
that have a null or empty host.
First, I attempted to update url::ReplaceComponents() so we can return
early, but GURL::ReplaceComponents() and KURL::ReplaceComponents() are
using url::ReplaceComponents() differently. I couldn't find a good
way.
Next, I considered updating both GURL::ReplaceComponents() and
KURL::ReplaceComponents() so they return early without calling
url::ReplaceComponents(), but redundancy was a concern.
After that, I realized that the best place to address this is the
canonicalization function for non-special URLs,
DoCanonicalizeNonSpecialURL(), as canonicalization occurs after URL
replacements, anyway. Implementing proper canonicalization should
effectively resolve the issue.
Bug: 40063064
Change-Id: Ibeb7f2dbaad196d83d26c8fb87bf47496bc989e5
Reviewed-on:
Reviewed-by: Timothy Gu <timothygu@chromium.org>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1258381}
M third_party/blink/renderer/core/url/dom_url_utils.cc
M third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-setters-a-area.window_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-setters.any.worker_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-setters.any_exclude=(file_javascript_mailto)-expected.txt
M url/gurl_unittest.cc
M url/url_canon_non_special_url.cc
M url/url_parse_unittest.cc
ap...@google.com <ap...@google.com> #50
Branch: main
commit 826a8158bd76bbe6ced7ef25dad6ee74deac8948
Author: Hayato Ito <hayato@chromium.org>
Date: Mon Feb 19 07:55:06 2024
[URL] Migrate net/base/url_util_unittest to flag-dependent tests
Bug: 40063064
Change-Id: I561037692c18d97f509de765f87243897be678b0
Reviewed-on:
Reviewed-by: Adam Rice <ricea@chromium.org>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1262269}
M net/base/url_util_unittest.cc
ap...@google.com <ap...@google.com> #51
Branch: main
commit 826a8158bd76bbe6ced7ef25dad6ee74deac8948
Author: Hayato Ito <hayato@chromium.org>
Date: Mon Feb 19 07:55:06 2024
[URL] Migrate net/base/url_util_unittest to flag-dependent tests
Bug: 40063064
Change-Id: I561037692c18d97f509de765f87243897be678b0
Reviewed-on:
Reviewed-by: Adam Rice <ricea@chromium.org>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1262269}
M net/base/url_util_unittest.cc
ap...@google.com <ap...@google.com> #52
Branch: main
commit 2eb072ba0f723dfff81b923249ef9e7bbb1dae57
Author: Hayato Ito <hayato@chromium.org>
Date: Mon Feb 19 09:01:18 2024
Add non-special URL test cases to scheme_host_port_unittest
Add several test cases to increase test coverage.
Bug: 40063064
Change-Id: Ifefb968a4fc9c7cfee7808ec90e2e5cfd47c8acf
Reviewed-on:
Commit-Queue: Hayato Ito <hayato@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1262279}
M url/scheme_host_port_unittest.cc
ap...@google.com <ap...@google.com> #53
Branch: main
commit 2eb072ba0f723dfff81b923249ef9e7bbb1dae57
Author: Hayato Ito <hayato@chromium.org>
Date: Mon Feb 19 09:01:18 2024
Add non-special URL test cases to scheme_host_port_unittest
Add several test cases to increase test coverage.
Bug: 40063064
Change-Id: Ifefb968a4fc9c7cfee7808ec90e2e5cfd47c8acf
Reviewed-on:
Commit-Queue: Hayato Ito <hayato@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1262279}
M url/scheme_host_port_unittest.cc
ap...@google.com <ap...@google.com> #54
Branch: main
commit 170aec2a2d5cd73e07bfb0aae09374ec8bc3cab5
Author: Hayato Ito <hayato@chromium.org>
Date: Wed Feb 21 04:09:59 2024
[URL] Migrate url/url_util_unittest to flag-dependent tests
URLUtilTest::TestNoRefComponent test was originally written before
full support for non-special URLs became available. We need a
flag-dependent test here because the test uses an internal parse
function.
The test case corresponds to the following user scenario:
> const url = new URL("any#body", "mailto://to/");
> assertEquals(url.href, "mailto://to/any#body");
Bug: 40063064
Change-Id: Icca4260f4646368e19412d6e9009b7098cfd0d37
Reviewed-on:
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1263130}
M url/url_util_unittest.cc
ap...@google.com <ap...@google.com> #55
Branch: main
commit d3c90ed5528623aa64aab9a42c4039c08453cff6
Author: Hayato Ito <hayato@chromium.org>
Date: Tue Mar 05 07:31:34 2024
[URL] Enable setting a host, port, or pathname on non-special URLs
This CL, a follow-up to
URL APIs to set a host, port, or pathname, on non-special URLs.
This functionality was previously available for internal URL structures
through prior CLs, but not exposed to JS APIs.
The CL updates KURL::IsHierarchical() to recognize non-special URLs as
hierarchical and introduces KURL::CanRemoveHost() to handle an empty
host correctly.
Maintaining the current behavior with the feature flag disabled while
introducing these changes might slightly impact code readability,
unfortunately.
Examples:
Before:
> const url = new URL("git://h/")
> url.host = "";
> url.href
"git://h/"
After:
> const url = new URL("git://h/")
> url.host = "";
> url.href
"git:///"
Before:
> const url = new URL("git://h/");
> url.port = 80;
> url.href
"git://h/"
After:
> const url = new URL("git://h/")
> url.port = 80;
> url.href
"git://h:80/"
Note: Setting an empty host is disallowed when a port exists, as
follows:
> const url = new URL("git://h:80/")
> url.host = "";
> url.href
"git://h:80/"
Tests:
The WPT url tests has a good coverage of these test cases. Many
previously failing tests are now passing.
Some tests involving `pathname` are still failing. These failures occur
because `pathname` processing should differ between special and
non-special URLs. That will be addressed in a separate follow-up CL.
Bug: 40063064
Change-Id: I0d71921edfa5f13ae60b8ce7ea8117d5fdeef7de
Reviewed-on:
Commit-Queue: Hayato Ito <hayato@chromium.org>
Reviewed-by: Timothy Gu <timothygu@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1268290}
M third_party/blink/renderer/core/url/dom_url_utils.cc
M third_party/blink/renderer/platform/weborigin/kurl.cc
M third_party/blink/renderer/platform/weborigin/kurl.h
M third_party/blink/renderer/platform/weborigin/kurl_test.cc
M third_party/blink/renderer/platform/weborigin/security_origin.cc
M third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-setters-a-area.window_exclude=(file_javascript_mailto)-expected.txt
A third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-setters-a-area.window_include=file-expected.txt
M third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-setters-a-area.window_include=javascript-expected.txt
M third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-setters-stripping.any-expected.txt
M third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-setters-stripping.any.worker-expected.txt
M third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-setters.any.worker_exclude=(file_javascript_mailto)-expected.txt
A third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-setters.any.worker_include=file-expected.txt
M third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-setters.any.worker_include=javascript-expected.txt
M third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-setters.any_exclude=(file_javascript_mailto)-expected.txt
A third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-setters.any_include=file-expected.txt
M third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-setters.any_include=javascript-expected.txt
ap...@google.com <ap...@google.com> #56
Branch: main
commit cddb0878c7ed93f79684b845751f35eeb4794528
Author: Hayato Ito <hayato@chromium.org>
Date: Wed Mar 13 01:02:24 2024
[URL] Update Origin and SecurityOrigin to consider non-special URLs
Update url::Origin and blink::SecurityOrigin to consider the correct
support of non-special scheme URLs (
host and port information are now available even for non-special URLs.
Background:
The Web Standard requires non-special URLs to have an opaque origin.
Chromium generally follows this standard. Thus, regarding Origin, the
correct support of non-special URLs should have minimal impact on web
compatibility because host and port parts are unimportant to opaque
origins.
However, due to historical reasons, Chromium has implemented several
workarounds for non-special scheme URLs, such as `url::SchemeRegistry`
and AndroidWebViewHack.
Example:
url::SchemeRegistry allows non-special URLs to be treated as if they
have non-opaque origins, as if they were standard URLs in parsing them,
and so on.
Suppose that we register "local-but-nonstandard:" scheme as a Local
scheme using `url::AddLocalScheme("local-but-nonstandard")`.
Then, the origin of "local-but-nonstandard://examplecom:80" URL becomes
non-opaque.
However, given that "local-but-nonstandard:" scheme is not registered as
a standard scheme, the origin's internal `SchemeHostPort` tuple will be:
("local-but-nonstandard", "", 0)
instead of
("local-but-nonstandard", "
because of incomplete parsing of non-special URLs so far, where host and
port information are not captured.
Changes:
Now, we have a correct non-special URL scheme parsing. The origin's
internal SchemeHostPort tuple can be
("local-but-nonstandard", "
because the new parser parses non-special URLs correctly.
This CL updates url::Origin so that it considers non-special URLs
correctly, aligning with the correct non-special URL support.
Impacts:
While the overall web compatibility impact is expected to be minimal,
there might be some unintended consequences in Chromium specific
scenarios, such as:
- "local-but-nonstandard:" scheme behavior: Code relying on this
scheme's previous non-opaque behavior might be affected due to changes
in origin handling.
- AndroidWebViewHack: Potential compatibility issues with the Android
WebView component, which is extremely high.
Ideally, we should update the current behavior everywhere so that we can
consider host and port parts, instead of ignoring them, however, this
would bring an extremely high risk of breakage for Android WebView.
There is basically no way to change how Android WebView behaves.
Therefore, this CL updates the behaviors of "local-but-nonstandard"
cases, but preserves the current Android WebView behavior by discarding
host and port information intentionally. This might be a bad outcome.
This is not a final decision. I'll re-evaluate once I have more
information.
The summary of what's changed and what's not changed:
For the two URLs, A) "non-standard://
"non-standard://
```
| | Same origin? | Serialization of A's origin |
|------------------+--------------+-----------------------------|
| Current behavior | true | "non-standard://" |
| After this CL | true | "non-standard://" |
```
For the two URLs, A) "local-but-nonstandard://
"local-but-nonstandard://
```
| | Same origin? | Serialization of A's origin |
|------------------+--------------+------------------------------------|
| Current behavior | true | "local-but-nonstandard://" |
| After this CL | false | "local-but-nonstandard://
```
See url/origin_unittest.cc and url/origin_abstract_tests.h in this CL
for details.
For historical context on nonstandard scheme URLs and Andvoid WebView
behavior, see the followings:
-
-
WPT url Tests:
There should be no impacts on WPT url tests.
Next steps:
Following CLs will address potential issues in tests and code currently
relying on the old workarounds. These subsequent changes will help us
assess the overall impact and ensure a smooth transition to the new
behavior.
Bug: 40063064
Change-Id: I53ac86503041b869a002a1ea02b18e0002b4b11d
Reviewed-on:
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1271918}
M android_webview/java/src/org/chromium/android_webview/common/ProductionSupportedFlagList.java
M third_party/blink/renderer/platform/weborigin/security_origin.cc
M third_party/blink/renderer/platform/weborigin/security_origin.h
M url/origin.cc
M url/origin_abstract_tests.h
M url/origin_unittest.cc
M url/scheme_host_port.cc
M url/scheme_host_port.h
M url/url_util.cc
M url/url_util.h
ap...@google.com <ap...@google.com> #57
Branch: main
commit 234328a0b4a4f5067673a0fcb4cdba7a78dec8c2
Author: Hayato Ito <hayato@chromium.org>
Date: Fri Mar 15 02:15:55 2024
[URL] Support resolving an opaque path with non-special base URLs
Fix the wrong result in resolving an opaque path with non-special base
URLs.
Before:
> const url = new URL("git:opaque", "git://host/a") ;
> url.href
=> "git://host/opaque"
After:
> const url = new URL("git:opaque", "git://host/a") ;
> url.href
=> "git:opaque"
URL Standard says "if url is special" in 2.6 of scheme-state:
> 2.6. Otherwise, if url is special, base is non-null, and base’s scheme
> is url’s scheme:
However, our implementation didn't implement this condition check.
While the WPT URL tests have a good coverage for these scenarios, I also
added unit tests for additional assurance.
Bug: 40063064
Change-Id: Ic9f9b4c3b55bd2cac0c8993638e55fc8d9cf8180
Reviewed-on:
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1273193}
M third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/a-element-xhtml_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/a-element_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-constructor.any.worker_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-constructor.any_exclude=(file_javascript_mailto)-expected.txt
M url/gurl_unittest.cc
M url/url_canon_relative.cc
ap...@google.com <ap...@google.com> #58
Branch: main
commit ec4bb766bb9f04e153aa0f2ad6909f9c298fe350
Author: Hayato Ito <hayato@chromium.org>
Date: Fri Mar 15 04:33:09 2024
[URL] Support empty hosts in relative URLs for non-special base URLs
Update Chromium's handling of relative URLs by allowing them to have
empty hosts (like "///path") when used with non-special base URLs.
Before:
> const url = new URL("///path", "git://host/a") ;
=> throws an Invalid URL error.
After:
> const url = new URL("///path", "git://host/a") ;
=> `url' is valid. url.href is "git:///path".
This change basically implements "host state" in URL Standard:
> 2.1. If url is special and buffer is the empty string, host-missing
> validation error, return failure.
Prior CLs already implemented this, but was not implemented correctly in resolving relative URLs for non-special base URLs.
While the WPT URL tests have a good coverage for these scenarios, I also
added unit tests for additional assurance.
Bug: 40063064
Change-Id: I46786955d5db27d29864e80a259ce4076500cb33
Reviewed-on:
Commit-Queue: Hayato Ito <hayato@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1273227}
M third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/a-element-xhtml_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/a-element_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-constructor.any.worker_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-constructor.any_exclude=(file_javascript_mailto)-expected.txt
M url/gurl_unittest.cc
M url/third_party/mozilla/url_parse.cc
M url/url_canon_relative.cc
M url/url_parse_internal.h
ap...@google.com <ap...@google.com> #59
Branch: main
commit 6957f7755b6e190a42676a199e856c7dc09c737f
Author: Hayato Ito <hayato@chromium.org>
Date: Mon Mar 18 03:00:46 2024
[URL] Ensure correct handling of path-only non-special URLs
Prevent a path-only non-special URL, "non-special:/.//path", from
ending up as "non-special://path", instead of "non-special:/.//path".
Note that a leading "/." should be *prepended* before the path so the
path part, "//path", shouldn't be considered as a URL's host part.
Previously, these URLs might incorrectly lose the leading "./" part, or
forget to add "./".
This implements the URL Standard: 4.5 serializing:
> 3. If url’s host is null, url does not have an opaque path, url’s
> path’s size is greater than 1, and url’s path[0] is the empty string,
> then append U+002F (/) followed by U+002E (.) to output.
Examples:
> const url = new URL("git:/.//a");
> url.href
=> should be "git:/.//a", instead of "git://a".
> const url = new URL("git:/");
> url.pathname = "//a";
> url.href
=> should be "git:/.//a", instead of "git://a".
> const url = new URL("", "git:/.//a");
> url.href
=> should be "git:/.//a", instead of "git://a".
> const url = new URL("..//b", "git:/.//a");
> url.href
=> should be "git:/.//b", instead of "git://b"
> const url = new URL("../b", "git:/.//a");
> url.href
=> should be "git:/b", instead of "git:/./b"
This CL also fixes the following case which replaces pathname with an
empty path.
> const url = new URL("git:/");
> url.pathname = "";
> url.href
=> should be "git:/", instead of "git:".
> url.pathname
=> should be "/", instead of "".
The URL Standard (
the behavior of this case. Unfortunately, it is not easy to understand
why url.pathname ends up as "/" in this case since the URL Standard
appear cryptic. Please read the URL Standard carefully to understand
that. I omit my understanding here.
Tests:
While the WPT URL tests provide good coverage for these scenarios, I
also added some minimal unit tests for additional assurance.
Bug: 40063064
Change-Id: I036236218a0bfbe7be5ab147088dd6fd52a8212a
Reviewed-on:
Commit-Queue: Hayato Ito <hayato@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1273979}
M third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/a-element-xhtml_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/a-element_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-constructor.any.worker_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-constructor.any_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-setters-a-area.window_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-setters.any.worker_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-setters.any_exclude=(file_javascript_mailto)-expected.txt
M url/gurl_unittest.cc
M url/url_canon.h
M url/url_canon_non_special_url.cc
M url/url_canon_relative.cc
M url/url_canon_unittest.cc
ap...@google.com <ap...@google.com> #60
Branch: main
commit 697a95529d7c01d00455e632af0deb5b7357b3be
Author: Hayato Ito <hayato@chromium.org>
Date: Thu Mar 21 05:53:25 2024
Revert the change to use MakeRefCounted
This is a follow-up of the prior review comment,
Bug: 40063064
Change-Id: I21530feda6272ef550238f47428f25625565ef39
Reviewed-on:
Auto-Submit: Hayato Ito <hayato@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Commit-Queue: Adam Rice <ricea@chromium.org>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1276062}
M third_party/blink/renderer/platform/weborigin/security_origin.cc
M third_party/blink/renderer/platform/weborigin/security_origin.h
ap...@google.com <ap...@google.com> #61
Branch: main
commit 8ca53a2ad11fb434d772c08b711fa305e8b042a8
Author: Hayato Ito <hayato@chromium.org>
Date: Mon Apr 01 03:40:26 2024
Track the failing WPT tests in url-non-special virtual tests
The following wpt tests will fail if we enable the
kStandardCompliantNonSpecialSchemeURLParsing flag [^1].
To address this, track these affected tests in url-non-special virtual
tests, in addition to wpt/url tests, which are already being tracked.
- external/wpt/fetch/data-urls/processing.any.html
- external/wpt/fetch/data-urls/processing.any.serviceworker.html
- external/wpt/fetch/data-urls/processing.any.sharedworker.html
- external/wpt/fetch/data-urls/processing.any.worker.html
- external/wpt/html/infrastructure/urls/resolving-urls/query-encoding/windows-1251.html
- external/wpt/html/infrastructure/urls/resolving-urls/query-encoding/windows-1252.html
- external/wpt/html/semantics/links/links-created-by-a-and-area-elements/non-special-url-getter-setter.window.html
- virtual/keepalive-in-browser-migration/external/wpt/fetch/data-urls/processing.any.html
- virtual/keepalive-in-browser-migration/external/wpt/fetch/data-urls/processing.any.serviceworker.html
- virtual/keepalive-in-browser-migration/external/wpt/fetch/data-urls/processing.any.sharedworker.html
- virtual/keepalive-in-browser-migration/external/wpt/fetch/data-urls/processing.any.worker.html
- virtual/plz-dedicated-worker-disabled/external/wpt/fetch/data-urls/processing.any.html
- virtual/plz-dedicated-worker-disabled/external/wpt/fetch/data-urls/processing.any.serviceworker.html
- virtual/plz-dedicated-worker-disabled/external/wpt/fetch/data-urls/processing.any.sharedworker.html
- virtual/plz-dedicated-worker-disabled/external/wpt/fetch/data-urls/processing.any.worker.html
- virtual/produce-compile-hints/external/wpt/fetch/data-urls/processing.any.html
- virtual/produce-compile-hints/external/wpt/fetch/data-urls/processing.any.serviceworker.html
- virtual/produce-compile-hints/external/wpt/fetch/data-urls/processing.any.sharedworker.html
- virtual/produce-compile-hints/external/wpt/fetch/data-urls/processing.any.worker.html
[^1]:
Bug: 40063064
Change-Id: I1c8ed4f670b549930f19750e303188d5543c9b63
Reviewed-on:
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1280650}
M third_party/blink/web_tests/VirtualTestSuites
A third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/fetch/data-urls/processing.any-expected.txt
A third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/fetch/data-urls/processing.any.serviceworker-expected.txt
A third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/fetch/data-urls/processing.any.sharedworker-expected.txt
A third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/fetch/data-urls/processing.any.worker-expected.txt
A third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/html/infrastructure/urls/resolving-urls/query-encoding/windows-1251_include=scheme-expected.txt
A third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/html/infrastructure/urls/resolving-urls/query-encoding/windows-1252_include=scheme-expected.txt
A third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/html/semantics/links/links-created-by-a-and-area-elements/non-special-url-getter-setter.window-expected.txt
ap...@google.com <ap...@google.com> #62
Branch: main
commit 4c7f2eadc7b1f3cd652211eeeb46364b2ae998fa
Author: Hayato Ito <hayato@chromium.org>
Date: Tue Apr 02 09:12:19 2024
[URL] Track the failing web tests in url-non-special virtual tests
The following web tests will fail if we enable the
kStandardCompliantNonSpecialSchemeURLParsing flag [^1].
To address this, track these affected tests in url-non-special virtual
tests, in addition to wpt tests, which are already being tracked.
- fast/dom/HTMLAnchorElement/set-href-attribute-hash.html
- fast/dom/HTMLAnchorElement/set-href-attribute-hostname.html
- fast/dom/HTMLAnchorElement/set-href-attribute-port.html
- fast/dom/HTMLAnchorElement/set-href-attribute-search.html
- fast/domurl/url-hash.html
- fast/loader/javascript-url-hierarchical-execution.html
- fast/loader/url-parse-1.html
- fast/url/invalid-urls-utf8.html
- fast/url/mailto.html
- fast/url/segments.html
- http/tests/security/base-url-data.html
- http/tests/security/base-url-javascript.html
[^1]:
Bug: 40063064
Change-Id: I97a627da21436c3c57f44d51497fc9b7bad96e5c
Reviewed-on:
Commit-Queue: Hayato Ito <hayato@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1281069}
M third_party/blink/web_tests/VirtualTestSuites
A third_party/blink/web_tests/platform/linux/virtual/url-non-special/fast/dom/HTMLAnchorElement/set-href-attribute-hash-expected.txt
A third_party/blink/web_tests/platform/linux/virtual/url-non-special/fast/dom/HTMLAnchorElement/set-href-attribute-hostname-expected.txt
A third_party/blink/web_tests/platform/linux/virtual/url-non-special/fast/dom/HTMLAnchorElement/set-href-attribute-port-expected.txt
A third_party/blink/web_tests/platform/linux/virtual/url-non-special/fast/dom/HTMLAnchorElement/set-href-attribute-search-expected.txt
A third_party/blink/web_tests/platform/linux/virtual/url-non-special/fast/domurl/url-hash-expected.txt
A third_party/blink/web_tests/platform/linux/virtual/url-non-special/fast/loader/javascript-url-hierarchical-execution-expected.txt
A third_party/blink/web_tests/platform/linux/virtual/url-non-special/fast/loader/url-parse-1-expected.txt
A third_party/blink/web_tests/platform/linux/virtual/url-non-special/fast/url/invalid-urls-utf8-expected.txt
A third_party/blink/web_tests/platform/linux/virtual/url-non-special/fast/url/mailto-expected.txt
A third_party/blink/web_tests/platform/linux/virtual/url-non-special/fast/url/segments-expected.txt
A third_party/blink/web_tests/platform/linux/virtual/url-non-special/http/tests/security/base-url-data-expected.txt
A third_party/blink/web_tests/platform/linux/virtual/url-non-special/http/tests/security/base-url-javascript-expected.txt
ap...@google.com <ap...@google.com> #63
Branch: main
commit 5d2acf1a08e3d68721f751bb2ee62ef186b656cf
Author: Hayato Ito <hayato@chromium.org>
Date: Wed Apr 03 05:09:56 2024
Remove wpt/svg/linking/reftests/url-processing-invalid-base.svg
This test appears to be based on non-standard URL behavior. It assumes
that a relative URL fragment like "#fragment" combined with the base URL
"invalid:" results in an invalid URL. However, this is not standard
compliant behavior. The combination of a relative fragment and the valid
base URL should always result in a valid URL.
Note: 'valid' (or 'invalid' ) in the context of this CL's description
means what the URL Standard defines here:
In this sense, "invalid:" is a valid base URL.
This test is currently passing on Chromium, but failing on Safari and
Firefox.
If Chromium supports non-special URLs correctly
(
Since any valid base URL cannot be made invalid by any relative
fragment, removing this test seems reasonable.
This test was added in
Bug: 40621475,40063064
Change-Id: I46dee043ab02e7899a512e5a2cee3fc773848e5c
Reviewed-on:
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1281665}
D third_party/blink/web_tests/external/wpt/svg/linking/reftests/url-processing-invalid-base.svg
ap...@google.com <ap...@google.com> #64
Branch: main
commit 7d2d2baed2ad75a9555feddf4b752723935528b4
Author: Hayato Ito <hayato@chromium.org>
Date: Tue Apr 09 07:28:25 2024
[URL] Update url-hash.html test to handle non-special URLs correctly
fast/domurl/url-hash.html is one of the tests which would fail if
kStandardCompliandNonSpecialSchemeURLParser flag is enabled [^1].
This test seems to test the current non-standard URL behavior in
Chromium [^2].
In preparation for shipping the feature, this CL does:
- Update the test itself not to test the non-standard URL behavior.
- Rebase the expectations of this test as failing and its
corresponding virtual test in virtual/url-non-special as passing.
When we ship the feature, the expectation of this test will be rebased
as PASS.
[^1]:
[^2]:
Bug: 40063064
Change-Id: I6930e3e340d276089c6de533c457c7ae6c47a5f0
Reviewed-on:
Reviewed-by: Adam Rice <ricea@chromium.org>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1284320}
A third_party/blink/web_tests/fast/domurl/url-hash-expected.txt
M third_party/blink/web_tests/fast/domurl/url-hash.html
M third_party/blink/web_tests/platform/linux/virtual/url-non-special/fast/domurl/url-hash-expected.txt
ap...@google.com <ap...@google.com> #65
Branch: main
commit 020b0367e57f90eadcaf73d756d7fde53ecebd03
Author: Hayato Ito <hayato@chromium.org>
Date: Thu Apr 11 08:36:10 2024
[URL] Make invalid-urls-utf8.html test be standard compliant
fast/url/invalid-urls-utf8.html is one of the tests which would fail
if kStandardCompliandNonSpecialSchemeURLParser flag is enabled [^1].
This test seems to test the current non-standard URL behavior in
Chromium [^2].
The test is using valid non-special URLs as invalid URLs, and made
incorrect assmpptions about trimming behavior of `href` attribute
valuie.
In preparation for shipping the feature, this CL does:
- Update the test to use only invalid URLs.
- Remove expected.trim().
- Add a test case for a special URL to ensure the value is not trimmed.
- Rebase the expectations of this test as failing and its
corresponding virtual test in virtual/url-non-special as passing.
When we ship the feature, the expectation of this test will be rebased
as PASS.
[^1]:
[^2]:
Bug: 40063064
Change-Id: Ic61b6a3265faa71b028f21bead4e13ca3e22cc21
Reviewed-on:
Reviewed-by: Adam Rice <ricea@chromium.org>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1285674}
M third_party/blink/web_tests/fast/url/invalid-urls-utf8-expected.txt
M third_party/blink/web_tests/fast/url/invalid-urls-utf8.html
M third_party/blink/web_tests/platform/linux/virtual/url-non-special/fast/url/invalid-urls-utf8-expected.txt
ap...@google.com <ap...@google.com> #66
Branch: main
commit 77b1a5c737c23d2f6d881fbf14395c305f756613
Author: Hayato Ito <hayato@chromium.org>
Date: Mon Apr 15 02:36:39 2024
[URL] Make mailto.html test be standard compliant
fast/url/mailto.html is one of the tests which would fail
if kStandardCompliandNonSpecialSchemeURLParser flag is enabled [^1].
This test seems to test the current non-compliant URL behavior in
Chromium [^2]. The following URL parser tester page might be helpful
to understand the expected behavior:
In preparation for shipping the feature, this CL does:
- Update the test to only test behavior that complies with the URL
Standard.
- Rebase the expectations of this test as failing and its
corresponding virtual test in virtual/url-non-special as passing.
When we ship the feature, the expectation of this test will be rebased
as PASS.
[^1]:
[^2]:
Bug: 40063064
Change-Id: I3e7bdcf2ffbbffd41fc521dc645ae41ae69a352d
Reviewed-on:
Commit-Queue: Hayato Ito <hayato@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1287129}
M third_party/blink/web_tests/fast/url/mailto-expected.txt
M third_party/blink/web_tests/fast/url/script-tests/mailto.js
M third_party/blink/web_tests/platform/linux/virtual/url-non-special/fast/url/mailto-expected.txt
ap...@google.com <ap...@google.com> #67
Branch: main
commit ac4a61c77800d889c41012fab7bd8a0f4ca1ea5f
Author: Hayato Ito <hayato@chromium.org>
Date: Tue Apr 16 08:51:49 2024
[URL] Make base-url-data.html test be standard compliant
http/tests/security/base-url-data.html is one of the tests which would
fail if kStandardCompliandNonSpecialSchemeURLParser flag is enabled
[^1] [^2].
This test seems to test the current non-standard URL behavior in
Chromium, which parses "data:/" URL as an opaque path URL, but that
should be parsed as an path only URL. The following URL parser tester
page might be helpful to understand the expected behavior:
In preparation for shipping the feature, this CL does:
- Update the expected value of the test, which shouldn't affect the
main purpose of the test.
- Rebase the expectations of this test as failing and its
corresponding virtual test in virtual/url-non-special as passing.
When we ship the feature, the expectation of this test will be rebased
as PASS.
[^1]:
[^2]:
Bug: 40063064
Change-Id: Ic840bdee14918ee71ae41fac0d68762edd8a10ad
Reviewed-on:
Reviewed-by: Adam Rice <ricea@chromium.org>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1287881}
M third_party/blink/web_tests/http/tests/security/base-url-data-expected.txt
M third_party/blink/web_tests/http/tests/security/base-url-data.html
M third_party/blink/web_tests/platform/linux/virtual/url-non-special/http/tests/security/base-url-data-expected.txt
ap...@google.com <ap...@google.com> #68
Branch: main
commit 5928ede6ec625d183ac8d38aa08de26bb1135787
Author: Hayato Ito <hayato@chromium.org>
Date: Wed Apr 17 01:40:50 2024
[URL] Don't navigate to an invalid "javascript:" scheme URL
fast/loader/javascript-url-hierarchical-execution.html is one of the
tests which would fail if kStandardCompliandNonSpecialSchemeURLParser
flag is enabled [^1] [^2].
It seems a browser navigates to "javascript://Spaceballs:" URL, and
the navigation hits
`DCHECK(!info.url_request.Url().ProtocolIs("javascript"))` [^3]:
```
bool WebLocalFrameImpl::WillStartNavigation(const WebNavigationInfo& info) {
DCHECK(!info.url_request.IsNull());
DCHECK(!info.url_request.Url().ProtocolIs("javascript"));
return GetFrame()->Loader().WillStartNavigation(info);
}
```
The test itself also fails because the custom policy delegate
indicates that a load was attempted.
Background / Investigation:
1. When the feature is enabled, "javascript:" scheme URLs can be an
invalid URL.
e.g. "javascript://a b", which is a hierarchical non-special URL,
but its host part contains a space, which is not allowed.
Currently, without the flag, any "javascript:" scheme URL is
considered as a valid URL because it is parsed as an *opaque path*
URL.
2. The current JavaScript execution code uses
`KURL::ProtocolIsJavaScript()` to process a URL as "javascript:"
URL, but it returns false for an invalid URL, even if the URL starts
with "javascript:".
So invalid "javascript:" URLs is not executed in a renderer and
the URL is passed to navigation code. That upsets browser
navigation code.
Fix:
I investigated the standard compliant behavior, and found
wpt/url/javascript-urls.window.js. It seems the HTML and URL Standard
requires that invalid "javascript:" URLs should NOT be executed.
So the fix is to prevent a navigation for an invalid "javascript:"
URL. See `FrameLoader::StartNavigation`.
The CL also updates the description of
`fast/loader/javascript-url-hierarchical-execution.html` to explain the intention of the test well. The previous description seems a bit outdated.
Now both `fast/loader/javascript-url-hierarchical-execution.html` and
`wpt/url/javascript-urls.window.js' tests in virtual/url-non-special
pass. Neither JavaScript execution nor navigation happens for invalid
"javascript:" URLs.
Impacts:
The following explanation is not directly related to this CL, but for
the record, let me note the impact:
The StandardCompliandNonSpecialSchemeURLParser feature affects URLs
which start with "javascript://" or "javascript:/". Usually, such a
"javascript:" URL contains only a comment. So there is no practical
changes in most cases, unless a URL contains a new line ('%0a'),
such as, "javascript://comment hello/%0aglobal_variable_a=1".
[^1]:
[^2]:
[^3]: Why a browser receives "javascript://Spaceballs:", instead of
"javascript://Spaceballs: The Comment!", is another interesting
topic, but I omit the details in this CL. In short, invalid URL's
string representation is not guaranteed.
Bug: 40063064
Change-Id: I914be8060166084815ba5186a106ecff00c179e9
Reviewed-on:
Commit-Queue: Hayato Ito <hayato@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1288459}
M third_party/blink/renderer/core/loader/frame_loader.cc
M third_party/blink/web_tests/fast/loader/javascript-url-hierarchical-execution-expected.txt
M third_party/blink/web_tests/fast/loader/javascript-url-hierarchical-execution.html
M third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/javascript-urls.window-expected.txt
D third_party/blink/web_tests/platform/linux/virtual/url-non-special/fast/loader/javascript-url-hierarchical-execution-expected.txt
ap...@google.com <ap...@google.com> #69
Branch: main
commit ab47a51f54e228d52c0e2961b71ca28d98d94bdd
Author: Hayato Ito <hayato@chromium.org>
Date: Wed Apr 17 07:38:50 2024
[URL] Make a failing Affiliation test pass with non-special URLs feature
All/AffiliationUtilsMainDomainTest.ParamTest/14 is one of the tests
which would fail when we enable the
StandardCompliandNonSpecialSchemeURLParser feature [^1][^2]:
The test is using a non-special URL,
"android://blabla@com.twitter.android". When the feature is enabled, a
non-special URL can be parsed correctly, which would affect the result
of the test.
This CL makes the test pass, regardless of whether the feature is
enabled or not, by moving the test case into a parameterized test, in
preparation for enabling the feature.
I'd like to notify a code owner that we are changing the behavior of
non-special URLs. Since I'm not familiar how Affiliation should work
for non-special URLs, I'm leaving it to the original test author to
verify or update the expected behavior, if necessary, possibly in
another CL.
[^1]:
[^2]:
Bug: 40063064
Change-Id: I086b02e7af4ea94a0c33961d5abef4c941a4c49d
Reviewed-on:
Commit-Queue: Hayato Ito <hayato@chromium.org>
Reviewed-by: Viktor Semeniuk <vsemeniuk@google.com>
Cr-Commit-Position: refs/heads/main@{#1288553}
M components/affiliations/core/browser/affiliation_utils_unittest.cc
ap...@google.com <ap...@google.com> #70
Branch: main
commit 1d39f0cc405b24dd7a1deaf13d5228ab79376c93
Author: Hayato Ito <hayato@chromium.org>
Date: Wed Apr 17 08:54:34 2024
[URL] Update the expectation of fast/url/segments.html test
fast/url/segments.html is one of the tests which would fail if
kStandardCompliandNonSpecialSchemeURLParser flag is enabled [^1] [^2].
This CL updates the expected values of the test, which are currently
based on non-compliant behaviors of non-special URLs.
I used `blink_tool.py rebaseline-cl' to rebase expectations across
platforms.
[^1]:
[^2]:
Bug: 40063064
Change-Id: I2dd4cc01d04e7e6eaff417a194a74c2016d68d8b
Reviewed-on:
Reviewed-by: Adam Rice <ricea@chromium.org>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1288584}
M third_party/blink/web_tests/fast/url/script-tests/segments.js
M third_party/blink/web_tests/platform/linux/fast/url/segments-expected.txt
M third_party/blink/web_tests/platform/linux/virtual/url-non-special/fast/url/segments-expected.txt
M third_party/blink/web_tests/platform/mac/fast/url/segments-expected.txt
M third_party/blink/web_tests/platform/win/fast/url/segments-expected.txt
ap...@google.com <ap...@google.com> #71
Branch: main
commit 0346227cc62011c79c3a70c5e35e0243fb6785e2
Author: Hayato Ito <hayato@chromium.org>
Date: Wed Apr 17 09:38:57 2024
[URL] Rewrite base-url-javascript.html and add variants
http/tests/security/base-url-javascript.html is one of the tests which
would fail if kStandardCompliandNonSpecialSchemeURLParser flag is
enabled [^1] [^2].
This test is using javascript URL, "javascript:// This is JavaScript",
as a base URL. Currently, this is a valid JavaScript URL, however,
once the StandardCompliandNonSpecialSchemeURLParser feature is
enabled, this URL becomes an invalid URL because its host part
contains a space character, which is not allowed. That's the reason
this test would fail if the flag is enabled.
For the comparison purposes, this CL rewrote and separated this test
into three tests, as follows:
1. base-url-https-invalid.html: Using an invalid https URL,
"https://[xxx]".
2. base-url-javascript-invalid.html: Using an invalid javascript URL,
"javascript:// (space) " (hierarchical non-special URL).
3. base-url-javascript-valid.html: Using a valid javascript URL,
"javascript:..." (opaque path URL).
Given that the current behaviors of Chromium is:
- 1. If a base URL is invalid (in the sense of the URL Standard),
image loading will fail, regardless of whether its scheme is "https"
or "javascript".
- 2. Otherwise, image should load successfully.
The test result should be:
| | Flag off | Flag on |
|--------+----------+---------|
| Test 1 | PASS | PASS |
| Test 2 | FAIL | PASS |
| Test 3 | PASS | PASS |
In preparation for shipping the feature, we mark the test 2 as FAIL,
though all of the corresponding virtual/url-non-special tests are
marked as PASS.
When we ship the feature, all of the expectation will be rebased as
PASS.
[^1]:
[^2]:
Bug: 40063064
Change-Id: Id7119d50e907961752e6b27119410c22a59f119b
Reviewed-on:
Reviewed-by: Koji Ishii <kojii@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1288603}
M third_party/blink/web_tests/VirtualTestSuites
A third_party/blink/web_tests/http/tests/security/base-url-https-invalid.html
D third_party/blink/web_tests/http/tests/security/base-url-javascript-expected.txt
A third_party/blink/web_tests/http/tests/security/base-url-javascript-invalid-expected.txt
A third_party/blink/web_tests/http/tests/security/base-url-javascript-invalid.html
M third_party/blink/web_tests/http/tests/security/base-url-javascript-valid.html
D third_party/blink/web_tests/platform/linux/virtual/url-non-special/http/tests/security/base-url-javascript-expected.txt
A third_party/blink/web_tests/virtual/url-non-special/http/tests/security/base-url-javascript-invalid-expected.txt
ap...@google.com <ap...@google.com> #72
Branch: main
commit de30b303934f59fbe6f6f7ff503d2d35fa13ae63
Author: Hayato Ito <hayato@chromium.org>
Date: Thu Apr 18 03:51:11 2024
[URL] Use a valid javascript URL in PDFExtensionJSTest.Navigator tests
The following tests would fail if we enable
StandardCompliandNonSpecialSchemeURLParser feature [^1][^2]:
- All/PDFExtensionJSTest.Navigator/0
- All/PDFExtensionJSTest.Navigator/1
The test currently uses a javascript URL,
"javascript:// this is not a document.pdf", which will become an invalid
URL when StandardCompliandNonSpecialSchemeURLParser flag is enabled.
See the following URL parser tester for details:
This CL updated the URL to a valid javascript URL,
"javascript://this-is-not-a-document.pdf".
Note: This test is not the only test which currently uses an invalid
javascript URL. Several other tests previously using invalid
JavaScript URLs have already been fixed.
I'm leaving it to the original test author to decide whether to add a
separate test for invalid URLs if that is necessary.
[^1]:
[^2]:
Bug: 40063064
Change-Id: I8a8b3228216c7667a63db7c34d9467e89fb17c79
Reviewed-on:
Commit-Queue: Hayato Ito <hayato@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1289131}
M chrome/test/data/pdf/navigator_test.ts
ap...@google.com <ap...@google.com> #73
Branch: main
commit c0ccf3b2ab3bfb32bcb50d627915dc5d48ac122c
Author: Hayato Ito <hayato@chromium.org>
Date: Fri Apr 19 01:06:56 2024
[URL] Make HistoryURLProviderTest test pass with non-special URL feature
HistoryURLProviderTest.SuggestExactInput is one of the tests which
would fail when we enable the
StandardCompliandNonSpecialSchemeURLParser feature [^1][^2]:
This CL makes the test pass, regardless of whether the feature is
enabled or not, by making the test a parameterized test and adding
expected outputs when the feature is enabled, in preparation for
enabling the feature.
Though the main purpose of this CL is to make the test pass when the
feature is enabled, I'd like to notify a code owner that we are
changing the behavior of non-special URLs via this CL's review. Since
I'm not familiar how HistoryURLProviderTest should work for
non-special URLs (e.g. "mailto:" URL), I'm leaving it to the original
test author to verify or update the expected behavior. A code owner
might want to do a follow-up in another CL.
I added several test cases for comparison purposes. Given that special
URLs ("http:") and non-special URLs ("mailto:") have the same
behavior, the expected outputs seem reasonable to me.
[^1]:
[^2]:
Bug: 40063064
Change-Id: I3ec500f9b267599a877cb0eeea48e96b21d77705
Reviewed-on:
Commit-Queue: Hayato Ito <hayato@chromium.org>
Reviewed-by: Gang Wu <gangwu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1289704}
M components/omnibox/browser/history_url_provider_unittest.cc
ap...@google.com <ap...@google.com> #74
Branch: main
commit 14089804e5b2e5e3fc6eb222b225999c2255fecd
Author: Hayato Ito <hayato@chromium.org>
Date: Tue Apr 23 02:22:01 2024
[URL] Make ProtocolHandlerRegistryTest pass with non-special URL feature
ProtocolHandlerRegistryTest is one of the tests which would fail when
we enable the StandardCompliandNonSpecialSchemeURLParser feature
[^1][^2]:
The test currently uses non-special URLs like::
- 1. "web+custom://custom handler"
- 2. "web+custom://custom/<>"
- 3. "web+bool://user:password@example/"
When the feature is enabled,
- 1 is no longer a valid URL.
- 2 is now correctly percent encoded.
- '<': %3C
- '>': %3E
- The credential part of 3 is correctly parsed.
That's why the test would fail with the feature enabled.
See the following URL parser tester for details:
1.
2.
3.
This CL makes the test pass, regardless of whether the feature is
enabled or not, by making the test a parameterized test and adding
expected outputs when the feature is enabled, in preparation for
enabling the feature.
Though the main purpose of this CL is to make the test pass when the
feature is enabled, I'd like to notify a code owner that we are
changing the behavior of non-special URLs via this CL's review. Since
I'm not familiar how ProtocolHandlerRegistryTest should work for
non-special URLs (e.g. "web+custom://" URL here), it's recommended for
a code owner or a domain expert to review and potentially do an
appropriate action in a follow-up CL, if necessary.
Depending on the severity of a potential breakage, I'd appreciate if
you could file a bug and marking it as blocking for
don't ship the feature until all critical issues are addressed.
Bug: 40063064
Change-Id: I4668fcf088f836026d30fd8cd38d21bd48898319
Reviewed-on:
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1291033}
M components/custom_handlers/protocol_handler_registry_unittest.cc
ap...@google.com <ap...@google.com> #75
Branch: main
commit 1f1d0569a7fe28a05cfe5206319b3daa3e0f9f07
Author: Hayato Ito <hayato@chromium.org>
Date: Tue Apr 23 02:42:19 2024
[URL] Use a valid non-special URL in AppSourceUrlRecorderTest test
AppSourceUrlRecorderTest.CheckCrostini is one of the test which would
fail if we enable the StandardCompliandNonSpecialSchemeURLParser
feature [^1][^2]:
The test currently uses a non-special URL,
"app://I-💖.unicode!Und der Eisbär?/Name",
which will become an invalid URL with the new feature enabled because
it's host part includes a space character.
See the following URL parser tester for details:
This CL updated the URL to a valid non-special "app:" URL,
"app://I-💖.unicode!Und_der_Eisbär?/Name".
I'd also like to notify a code owner that we are changing the behavior
of non-special URLs via this CL's review. Since I'm not familiar with
"app:" url, I'm leaving it to a code owner to decide whether to add a
separate test for invalid "app:" URLs if that is necessary.
[^1]:
[^2]:
Bug: 40063064
Change-Id: I1ee9905196751f04cab1fb2e63adc69f9edc728d
Reviewed-on:
Commit-Queue: Hayato Ito <hayato@chromium.org>
Reviewed-by: Jesse Doherty <jwd@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1291037}
M components/ukm/app_source_url_recorder_test.cc
ap...@google.com <ap...@google.com> #76
Branch: main
commit 395f7fe2af40dc3cec44f39552a18a5ae82ddb26
Author: Hayato Ito <hayato@chromium.org>
Date: Thu Apr 25 01:59:40 2024
[URL] Make URLBlocklistManagerTest pass with non-special URL feature
URLBlocklistManagerTest is one of the tests which would fail when we
enable the StandardCompliandNonSpecialSchemeURLParser feature
[^1][^2]:
The test currently uses a non-special URL, like "about://newtab".
When the feature is enabled, the host part in non-special URLs can be
correctly parsed. That's why the test would fail with the feature
enabled.
See the following URL parser tester for details:
hostname:
> whatwg-url : "newtab"
> Chrome: (empty string)
This CL makes the test pass, regardless of whether the feature is
enabled or not, by making the test a parameterized test and adding
expected outputs when the feature is enabled, in preparation for
enabling the feature.
Though the main purpose of this CL is to make the test pass when the
feature is enabled, I'd like to notify a code owner that we are
changing the behavior of non-special URLs via this CL's review. Since
I'm not familiar how URLBlocklistManager should work for non-special
URLs (e.g. "about://", "chrome://" URLs here), it's recommended for a
code owner or a domain expert to review and potentially do an
appropriate action in a follow-up CL, if necessary.
Depending on the severity of a potential breakage, I'd appreciate if
you could file a bug and marking it as blocking for
don't ship the feature until all critical issues are addressed.
[^1]:
[^2]:
Bug: 40063064
Change-Id: I63bf7c91462d1cf866e74b463b7326cca63a4467
Reviewed-on:
Reviewed-by: Igor Ruvinov <igorruvinov@chromium.org>
Reviewed-by: Julian Pastarmov <pastarmovj@chromium.org>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1292244}
M components/policy/core/browser/url_blocklist_manager_unittest.cc
ap...@google.com <ap...@google.com> #77
Branch: main
commit 3ab9b16c7c7713b2d90702e9e9581f13d7f7f46c
Author: Hayato Ito <hayato@chromium.org>
Date: Thu Apr 25 05:23:46 2024
[URL] Make WebBundleUtilsTest pass with non-special URL feature
WebBundleUtilsTest is one of the tests which would fail when we enable
the StandardCompliandNonSpecialSchemeURLParser feature [^1][^2]:
The test currently uses a non-special URL, like a
"urn://uuid:00000000-0000-0000-0000-000000000000",
which becomes an invalid URL when the feature is enabled.
See the following URL parser tester for details:
This CL removes the usage of invalid non-special URLs from the test.
[^1]:
[^2]:
Bug: 40063064
Change-Id: I8c2f6a2b50b5d1582e1d1e2f2805f8f93523f216
Reviewed-on:
Reviewed-by: Adam Rice <ricea@chromium.org>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1292277}
M components/web_package/web_bundle_utils_unittest.cc
ap...@google.com <ap...@google.com> #78
Branch: main
commit 23ccc84f71d403539887be3c95c005e52178c63a
Author: Hayato Ito <hayato@chromium.org>
Date: Fri Apr 26 03:55:23 2024
[URL] Make URLUtilTest pass with the non-special URL feature
URLUtilTest is one of the tests which would fail when we
enable the StandardCompliandNonSpecialSchemeURLParser feature
[^1][^2]:
The test currently uses a non-special URL, like "bogus://
When the feature is enabled, the host part in non-special URLs can be
correctly parsed. That's why the test would fail with the feature
enabled.
See the following URL parser tester for details:
hostname:
> whatwg-url : "
> Chrome: (empty string)
This CL makes the test pass, regardless of whether the feature is
enabled or not, by making the test a parameterized test and adding
expected outputs when the feature is enabled, in preparation for
enabling the feature.
Though the main purpose of this CL is to make the test pass when the
feature is enabled, I'd like to notify a code owner that we are
changing the behavior of non-special URLs via this CL's review. Since
I'm not familiar how `MatchFilters` should work for non-special URLs,
it's recommended for a code owner or a domain expert to review and
potentially do an appropriate action in a follow-up CL, if necessary.
Depending on the severity of a potential breakage, I'd appreciate if
you could file a bug and marking it as blocking for
don't ship the feature until all critical issues are addressed.
[^1]:
[^2]:
Bug: 40063064
Change-Id: Ia0f2b228f1f34a09b27a0c116ed1724c532977ed
Reviewed-on:
Commit-Queue: Hayato Ito <hayato@chromium.org>
Reviewed-by: Dominic Battre <battre@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1292858}
M components/url_matcher/BUILD.gn
M components/url_matcher/url_util_unittest.cc
ap...@google.com <ap...@google.com> #79
Branch: main
commit de3dd2ae3e33463545e876e284ec393993cc0afa
Author: Hayato Ito <hayato@chromium.org>
Date: Tue May 07 05:48:54 2024
[URL] Make OfflinePageTest test pass with non-special URL feature
OfflinePageHeaderTest.ToString is one of the tests which would fail
when we enable the StandardCompliandNonSpecialSchemeURLParser feature
[^1][^2]:
The test currently uses a non-special URL,
"content://foo/Bar \"\'\\Test"
When the feature is enabled, space and double-quote characters within
the path part of a non-special URL will be percent-encoded correctly.
That's why the test would fail with the feature enabled.
See the following URL parser tester for details:
> whatwg-url: content://foo/Bar%20%22'\Test
This CL makes the test pass, regardless of whether the feature is
enabled or not, by making the test a parameterized test and adding
expected outputs when the feature is enabled, in preparation for
enabling the feature.
Though the main purpose of this CL is to make the test pass when the
feature is enabled, I'd like to notify a code owner that we are
changing the behavior of non-special URLs via this CL's review. Since
I'm not familiar how OfflinePageHeaderTest should work for non-special
URLs (e.g. "content:" URL here), it's recommended for a code owner or
a domain expert to review and potentially do an appropriate action in
a follow-up CL, if necessary.
Depending on the severity of a potential breakage, I'd appreciate if
you could file a bug and marking it as blocking for
don't ship the feature until all critical issues are addressed.
[^1]:
[^2]:
Bug: 40063064
Change-Id: I1610aba0b7dfc83b9a8b41e9c504d3bc80a19272
Reviewed-on:
Reviewed-by: Justin DeWitt <dewittj@chromium.org>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1297296}
M components/offline_pages/core/request_header/BUILD.gn
M components/offline_pages/core/request_header/offline_page_header_unittest.cc
ap...@google.com <ap...@google.com> #80
Branch: main
commit 5ed87db03083869b6ac60878a2410e3d03eb8b47
Author: Hayato Ito <hayato@chromium.org>
Date: Mon May 13 07:54:44 2024
[URL] Opt-out "android:" scheme from non-special URL support
Regarding standard compliant non-special URLs support, it
turned out that we couldn't change the behavior of "android:" scheme
URLs. I feel like that we have to introduce an escape hatch.
See the discussion at
This CL introduces an escape hatch mechanism in SchemeRegistry to
preserve the existing behaviors for specific non-special schemes,
with "android://" being the sole example for now.
At this moment, SchemeRegistry doesn't provide any mechanism to update
the scheme list in runtime.
As part of this change, I'm also reverting a prior CL:
-
Bug: 40063064
Change-Id: If8b8e6e3a601eb19169bb539332882cef4ee86a6
Reviewed-on:
Commit-Queue: Hayato Ito <hayato@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Viktor Semeniuk <vsemeniuk@google.com>
Cr-Commit-Position: refs/heads/main@{#1299924}
M components/affiliations/core/browser/affiliation_utils_unittest.cc
M url/url_constants.h
M url/url_util.cc
M url/url_util_unittest.cc
ap...@google.com <ap...@google.com> #81
Branch: main
commit 33c9f7fcf0871ac4dbc365010e015e17fcdcd708
Author: Hayato Ito <hayato@chromium.org>
Date: Wed May 15 07:50:09 2024
[URL] Move the function definition for better diff
It's a preparatory step to improve the readability of the diff in
Bug: 40063064
Change-Id: I9574eddf25fb2a134b003d595e03e850fec80365
Reviewed-on:
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Auto-Submit: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1301150}
M url/url_util_unittest.cc
ap...@google.com <ap...@google.com> #82
Branch: main
commit ffa3455bacf5f95af59402b68d2c277ec9e8bb46
Author: Hayato Ito <hayato@chromium.org>
Date: Thu May 16 02:06:31 2024
[URL] Fix URLUtilTest tests for non-special scheme support
Bug: 40063064
Change-Id: Ie2c5d62290add5d92fdab7177de032104da66061
Reviewed-on:
Commit-Queue: Hayato Ito <hayato@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1301714}
M url/url_util_unittest.cc
ap...@google.com <ap...@google.com> #83
Branch: main
commit d1f07e00d72e8f317e1aa7a50d5bcf0527f160a2
Author: Hayato Ito <hayato@chromium.org>
Date: Fri May 17 01:44:04 2024
[URL] Fix IsXCallbackURL() to support non-special scheme URL feature
XCallbackURLTest.IsXCallbackURLtest is one of the tests which would
fail [^1][^2] when we enable the
StandardCompliandNonSpecialSchemeURLParser feature [^3]:
The test will fail because, with the feature enabled,
url.path_pierce() correctly return the path part of a non-special URL.
Previously, it returns a wrong part.
You can see the difference between the standard behavior and
Chromium's current behavior here:
`url.pathname` returns "//host/path", instead of "/path", for
"git://host/path" in current Chromium.
This CL updates `IsXCallbackURL` to handle both scenarios. When the
feature is enabled, it leverages the correct parsing result.
Otherwise, it falls back to the previous (manual) parsing method. This
ensures the test passes regardless of the feature state.
[^1]:
[^2]:
[^3]:
Bug: 40063064
Change-Id: I4883410b12a0615e58e41784646cbfaa8ee242d2
Reviewed-on:
Commit-Queue: Hayato Ito <hayato@chromium.org>
Reviewed-by: Olivier Robin <olivierrobin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1302366}
M ios/chrome/common/BUILD.gn
M ios/chrome/common/x_callback_url.cc
M ios/chrome/common/x_callback_url_unittest.cc
ap...@google.com <ap...@google.com> #84
Branch: main
commit d22f756ab3ba1ba5466ced3f10ba8eb7677db49a
Author: Hayato Ito <hayato@chromium.org>
Date: Mon May 20 03:30:41 2024
[URL] Preserve the behavior of DatabaseIdentifier for non-special URLs
DatabaseIdentifierTest.ExtractOriginDataFromIdentifier is one of the
tests which would fail when we enable the
StandardCompliandNonSpecialSchemeURLParser feature [^1][^2]:
The test will fail because, with the feature enabled, url.host() now
correctly returns the host part for non-special URLs. Previously, it
always an empty string for non-special URLs.
See
This CL updates `DatabaseIdentifier::Parse` to preserve the current
behavior to make the test pass regardless whether the feature is
enabled or not.
Though the main purpose of this CL is to make the test pass when the
feature is enabled, I'd like to notify a code owner that we are
changing the behavior of non-special URLs via this CL's review. Since
I'm not familiar how DatabaseIdentifier should work for non-special
URLs, it's recommended for a code owner or a domain expert to review
and potentially do an appropriate action in a follow-up CL, if
necessary.
[^1]:
[^2]:
Bug: 40063064
Change-Id: I410fba708ae0146703d3bb9690d3a1306cf4bb3b
Reviewed-on:
Reviewed-by: Ayu Ishii <ayui@chromium.org>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1303194}
M storage/common/database/database_identifier.cc
M storage/common/database/database_identifier_unittest.cc
ap...@google.com <ap...@google.com> #85
Branch: main
commit ddd96d726d2ffe780bfc2d9eae425e961ad91182
Author: Hayato Ito <hayato@chromium.org>
Date: Mon May 20 04:35:17 2024
[URL] Opt-out chromium-x-callback:// scheme from non-special URL support
The following tests are failing [^1][^2] in ios-simulator bot when we
enable the StandardCompliandNonSpecialSchemeURLParser feature [^3]:
- AppStartupParametersTest.ParseURLWithChromeURLInXCallbackURL
- AppStartupParametersTest.ParseURLWithJavascriptURLInXCallbackURL
- AppStartupParametersTest.ParseURLWithMalformedXCallbackURL
- AppStartupParametersTest.ParseURLWithXCallbackURL
- AppStartupParametersTest.ParseURLWithXCallbackURLAndExtraParams
It appears that these tests use "chromium-x-callback://" scheme.
Usually, I would try to fix the failures somehow, however, iOS
codebase presents a challenge for me (e.g. *.mm files, which scare
me).
Therefore, as a temporary solution, let me tentatively opt-out
"chromium-x-callback://" from non-special URL support, as I did it for
"android://" scheme [4]. That makes these failing tests pass
regardless of the feature state.
For a more permanent solution, code owners or domain experts familiar
with iOS development might want to work on a real fix, if necessary.
If a proper fix is critical before we ship the feature, I'd appreciate
if you could file a bug and marking it blocking for
we don't ship the feature until all critical issues are addressed.
[^1]:
[^2]:
[^3]:
[^4]:
Bug: 40063064
Change-Id: I17a0cd310059f8831d55304b6604f98133a0bdb1
Reviewed-on:
Reviewed-by: Mark Cogan <marq@chromium.org>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1303205}
M url/url_constants.h
M url/url_util.cc
ap...@google.com <ap...@google.com> #86
Branch: main
commit a735b96a423fae5c9801a069239fa525d3459971
Author: Hayato Ito <hayato@chromium.org>
Date: Tue May 21 06:29:35 2024
[URL] Opt-out almanack:// and cros-apps:// from non-special URL support
The following tests are failing [^1][^2] in linux-chromeos-rel when we
enable the StandardCompliandNonSpecialSchemeURLParser feature [^3]:
- All/AppInstallNavigationThrottleBrowserTest.InstallUrlFallback/AshDialogDisabled
- All/AppInstallNavigationThrottleBrowserTest.InstallUrlFallback/AshDialogEnabled
- All/AppInstallNavigationThrottleBrowserTest.LegacyScheme/AshDialogDisabled
- All/AppInstallNavigationThrottleBrowserTest.LegacyScheme/AshDialogEnabled
- All/AppInstallNavigationThrottleBrowserTest.UrlTriggeredInstallation/AshDialogDisabled
- All/AppInstallNavigationThrottleBrowserTest.UrlTriggeredInstallation/AshDialogEnabled
It appears that these tests use "almanack://" or "cros-apps://" scheme
for app installation.
Usually, I would try to fix the failures somehow, however, chromeos
codebase presents a challenge for me, due to limitations in my
familiarity with ChromeOS development.
Therefore, as a temporary solution, let me tentatively opt-out
"almanack://" and "cros-apps://" from non-special URL support, as I
did it for "android://" scheme [4]. That makes these failing tests
pass regardless of the feature state.
For a more permanent solution, code owners or domain experts familiar
with ChromeOS development might want to work on a real fix, if
necessary. If a proper fix is critical before we ship the feature, I'd
appreciate if you could file a bug and marking it blocking for bug
40063064 so we don't ship the feature until all critical issues are
addressed.
[^1]:
[^2]:
[^3]:
[^4]:
Bug: 40063064
Change-Id: Ic8c9ab12652d01bdfd0a2b100071f8d5318edbcb
Reviewed-on:
Reviewed-by: Tim Sergeant <tsergeant@chromium.org>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1303616}
M url/url_constants.h
M url/url_util.cc
ap...@google.com <ap...@google.com> #87
Branch: main
commit 7ab6175da13673b73e7d0dde4e0b589763528d46
Author: Hayato Ito <hayato@chromium.org>
Date: Thu May 23 02:31:13 2024
[URL] Make CSPSourceTest pass with non-special URL feature
There are a few tests in CSPSourceTest, namely AllowScheme and
CustomSchemeWithHost, that would break when we enable the
StandardCompliandNonSpecialSchemeURLParser feature [^1][^2]:
They fail because, with the feature enabled, url.host() now correctly
returns the host part for non-special URLs. Previously, it always an
empty string for non-special URLs.
This CL updates `SourceAllowHost` (defined in csp_sources.cc) to
preserve the current behavior of CSP when the feature is enabled.
I and reviewers agreed that the current behavior is not desired, but
decided to preserve the status-quo for now so that we can ship the
feature without being affected by a change to CSP at the same time.
[^1]:
[^2]:
Bug: 40063064
Change-Id: I2bb4ea179efae2e6d2217a24c81eaec3ab71cdd9
Reviewed-on:
Commit-Queue: Hayato Ito <hayato@chromium.org>
Reviewed-by: Antonio Sartori <antoniosartori@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1304834}
M services/network/public/cpp/content_security_policy/csp_source.cc
M services/network/public/cpp/content_security_policy/csp_source_unittest.cc
ap...@google.com <ap...@google.com> #88
Branch: main
commit 5de3a8d8986b27ec4278e4e6c949f909c8b2ae9b
Author: Hayato Ito <hayato@chromium.org>
Date: Thu May 23 06:48:24 2024
[URL] Preserve Blink's CSP behavior for non-special URLs
This CL is similar to
CSP implementation to ensure the behavior remains consistent
regardless of non-special URL support.
The following tests now pass:
- CSPSourceTest.MatchingAsSelf
- CSPSourceTest.SchemeIsEmpty
Bug: 40063064
Change-Id: I80d7e64a627ffc9dbb7616027467ea1c6616b983
Reviewed-on:
Reviewed-by: Antonio Sartori <antoniosartori@chromium.org>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1304889}
M third_party/blink/renderer/core/frame/csp/DEPS
M third_party/blink/renderer/core/frame/csp/csp_source.cc
M third_party/blink/renderer/core/frame/csp/csp_source_test.cc
ap...@google.com <ap...@google.com> #89
Branch: main
commit 38c63f8386ec97bff35384f73fa574d7f088d504
Author: Hayato Ito <hayato@chromium.org>
Date: Fri May 24 02:06:25 2024
Revert "[URL] Preserve Blink's CSP behavior for non-special URLs"
This reverts commit 5de3a8d8986b27ec4278e4e6c949f909c8b2ae9b.
Reason for revert: Possible culprit on
Original change's description:
> [URL] Preserve Blink's CSP behavior for non-special URLs
>
> This CL is similar to
> CSP implementation to ensure the behavior remains consistent
> regardless of non-special URL support.
>
> The following tests now pass:
>
> - CSPSourceTest.MatchingAsSelf
> - CSPSourceTest.SchemeIsEmpty
>
> Bug: 40063064
> Change-Id: I80d7e64a627ffc9dbb7616027467ea1c6616b983
> Reviewed-on:
> Reviewed-by: Antonio Sartori <antoniosartori@chromium.org>
> Commit-Queue: Hayato Ito <hayato@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1304889}
Bug: 40063064
Change-Id: I08672b26fd6f963db855024a07892b06339ef87e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on:
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1305479}
M third_party/blink/renderer/core/frame/csp/DEPS
M third_party/blink/renderer/core/frame/csp/csp_source.cc
M third_party/blink/renderer/core/frame/csp/csp_source_test.cc
ap...@google.com <ap...@google.com> #90
Branch: refs/branch-heads/6498
commit 16cfbdca08c5eb46bb79e71f5511c366a7d5c9b2
Author: Hayato Ito <hayato@chromium.org>
Date: Fri May 24 04:29:51 2024
Revert "[URL] Make CSPSourceTest pass with non-special URL feature"
This reverts commit 7ab6175da13673b73e7d0dde4e0b589763528d46.
Reason for revert: Probably culprit on
Original change's description:
> [URL] Make CSPSourceTest pass with non-special URL feature
>
> There are a few tests in CSPSourceTest, namely AllowScheme and
> CustomSchemeWithHost, that would break when we enable the
> StandardCompliandNonSpecialSchemeURLParser feature [^1][^2]:
>
> They fail because, with the feature enabled, url.host() now correctly
> returns the host part for non-special URLs. Previously, it always an
> empty string for non-special URLs.
>
> This CL updates `SourceAllowHost` (defined in csp_sources.cc) to
> preserve the current behavior of CSP when the feature is enabled.
>
> I and reviewers agreed that the current behavior is not desired, but
> decided to preserve the status-quo for now so that we can ship the
> feature without being affected by a change to CSP at the same time.
>
> [^1]:
>
> [^2]:
>
>
>
> Bug: 40063064
> Change-Id: I2bb4ea179efae2e6d2217a24c81eaec3ab71cdd9
> Reviewed-on:
> Commit-Queue: Hayato Ito <hayato@chromium.org>
> Reviewed-by: Antonio Sartori <antoniosartori@chromium.org>
> Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1304834}
(cherry picked from commit 59d5a19f4fe4d9b91085bb3ae6e5fe97663fcf6e)
Bug: 40063064
Change-Id: Idca2dcb29663dd56237c2d0e6e68646e89e0c23c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on:
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Hayato Ito <hayato@chromium.org>
Commit-Queue: Kenichi Ishibashi <bashi@chromium.org>
Cr-Original-Commit-Position: refs/heads/main@{#1305481}
Reviewed-on:
Commit-Queue: Prudhvikumar Bommana <pbommana@google.com>
Owners-Override: Prudhvikumar Bommana <pbommana@google.com>
Cr-Commit-Position: refs/branch-heads/6498@{#5}
Cr-Branched-From: 9c3c8463bc3fd837dc945f0db3697529eefc2332-refs/heads/main@{#1305318}
M services/network/public/cpp/content_security_policy/csp_source.cc
M services/network/public/cpp/content_security_policy/csp_source_unittest.cc
ap...@google.com <ap...@google.com> #91
Branch: refs/branch-heads/6498
commit 3ced0df4d6fe888f209320e6009cf4c38f1afbdb
Author: Hayato Ito <hayato@chromium.org>
Date: Fri May 24 04:29:43 2024
Revert "[URL] Preserve Blink's CSP behavior for non-special URLs"
This reverts commit 5de3a8d8986b27ec4278e4e6c949f909c8b2ae9b.
Reason for revert: Possible culprit on
Original change's description:
> [URL] Preserve Blink's CSP behavior for non-special URLs
>
> This CL is similar to
> CSP implementation to ensure the behavior remains consistent
> regardless of non-special URL support.
>
> The following tests now pass:
>
> - CSPSourceTest.MatchingAsSelf
> - CSPSourceTest.SchemeIsEmpty
>
> Bug: 40063064
> Change-Id: I80d7e64a627ffc9dbb7616027467ea1c6616b983
> Reviewed-on:
> Reviewed-by: Antonio Sartori <antoniosartori@chromium.org>
> Commit-Queue: Hayato Ito <hayato@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1304889}
(cherry picked from commit 38c63f8386ec97bff35384f73fa574d7f088d504)
Bug: 40063064
Change-Id: I08672b26fd6f963db855024a07892b06339ef87e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on:
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Original-Commit-Position: refs/heads/main@{#1305479}
Reviewed-on:
Commit-Queue: Prudhvikumar Bommana <pbommana@google.com>
Owners-Override: Prudhvikumar Bommana <pbommana@google.com>
Cr-Commit-Position: refs/branch-heads/6498@{#4}
Cr-Branched-From: 9c3c8463bc3fd837dc945f0db3697529eefc2332-refs/heads/main@{#1305318}
M third_party/blink/renderer/core/frame/csp/DEPS
M third_party/blink/renderer/core/frame/csp/csp_source.cc
M third_party/blink/renderer/core/frame/csp/csp_source_test.cc
ap...@google.com <ap...@google.com> #92
Branch: refs/branch-heads/6497
commit 24198e32681d281f6767c345a6f5e3e8b9ddfd08
Author: Hayato Ito <hayato@chromium.org>
Date: Fri May 24 06:18:32 2024
Revert "[URL] Make CSPSourceTest pass with non-special URL feature"
This reverts commit 7ab6175da13673b73e7d0dde4e0b589763528d46.
Reason for revert: Probably culprit on
Original change's description:
> [URL] Make CSPSourceTest pass with non-special URL feature
>
> There are a few tests in CSPSourceTest, namely AllowScheme and
> CustomSchemeWithHost, that would break when we enable the
> StandardCompliandNonSpecialSchemeURLParser feature [^1][^2]:
>
> They fail because, with the feature enabled, url.host() now correctly
> returns the host part for non-special URLs. Previously, it always an
> empty string for non-special URLs.
>
> This CL updates `SourceAllowHost` (defined in csp_sources.cc) to
> preserve the current behavior of CSP when the feature is enabled.
>
> I and reviewers agreed that the current behavior is not desired, but
> decided to preserve the status-quo for now so that we can ship the
> feature without being affected by a change to CSP at the same time.
>
> [^1]:
>
> [^2]:
>
>
>
> Bug: 40063064
> Change-Id: I2bb4ea179efae2e6d2217a24c81eaec3ab71cdd9
> Reviewed-on:
> Commit-Queue: Hayato Ito <hayato@chromium.org>
> Reviewed-by: Antonio Sartori <antoniosartori@chromium.org>
> Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1304834}
(cherry picked from commit 59d5a19f4fe4d9b91085bb3ae6e5fe97663fcf6e)
Bug: 40063064
Change-Id: Idca2dcb29663dd56237c2d0e6e68646e89e0c23c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on:
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Hayato Ito <hayato@chromium.org>
Commit-Queue: Kenichi Ishibashi <bashi@chromium.org>
Cr-Original-Commit-Position: refs/heads/main@{#1305481}
Reviewed-on:
Owners-Override: Prudhvikumar Bommana <pbommana@google.com>
Commit-Queue: Prudhvikumar Bommana <pbommana@google.com>
Cr-Commit-Position: refs/branch-heads/6497@{#5}
Cr-Branched-From: a55c0391d426501451f08bfb0c431d58190f7f5e-refs/heads/main@{#1305081}
M services/network/public/cpp/content_security_policy/csp_source.cc
M services/network/public/cpp/content_security_policy/csp_source_unittest.cc
ap...@google.com <ap...@google.com> #93
Branch: refs/branch-heads/6497
commit 45bf58cb75f71e836bf6ad04f2b51803329dfec1
Author: Hayato Ito <hayato@chromium.org>
Date: Fri May 24 06:18:25 2024
Revert "[URL] Preserve Blink's CSP behavior for non-special URLs"
This reverts commit 5de3a8d8986b27ec4278e4e6c949f909c8b2ae9b.
Reason for revert: Possible culprit on
Original change's description:
> [URL] Preserve Blink's CSP behavior for non-special URLs
>
> This CL is similar to
> CSP implementation to ensure the behavior remains consistent
> regardless of non-special URL support.
>
> The following tests now pass:
>
> - CSPSourceTest.MatchingAsSelf
> - CSPSourceTest.SchemeIsEmpty
>
> Bug: 40063064
> Change-Id: I80d7e64a627ffc9dbb7616027467ea1c6616b983
> Reviewed-on:
> Reviewed-by: Antonio Sartori <antoniosartori@chromium.org>
> Commit-Queue: Hayato Ito <hayato@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1304889}
(cherry picked from commit 38c63f8386ec97bff35384f73fa574d7f088d504)
Bug: 40063064
Change-Id: I08672b26fd6f963db855024a07892b06339ef87e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on:
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Original-Commit-Position: refs/heads/main@{#1305479}
Reviewed-on:
Commit-Queue: Prudhvikumar Bommana <pbommana@google.com>
Owners-Override: Prudhvikumar Bommana <pbommana@google.com>
Cr-Commit-Position: refs/branch-heads/6497@{#4}
Cr-Branched-From: a55c0391d426501451f08bfb0c431d58190f7f5e-refs/heads/main@{#1305081}
M third_party/blink/renderer/core/frame/csp/DEPS
M third_party/blink/renderer/core/frame/csp/csp_source.cc
M third_party/blink/renderer/core/frame/csp/csp_source_test.cc
ap...@google.com <ap...@google.com> #94
Branch: main
commit eddea02d99e5caecf0ce0244cf394ccd6c7e1e87
Author: Hayato Ito <hayato@chromium.org>
Date: Tue May 28 00:55:19 2024
Reland "[URL] Make CSPSourceTest pass with non-special URL feature"
This is a reland of commit 7ab6175da13673b73e7d0dde4e0b589763528d46
No change from the reverted CL. The issue is probably in a different
CL. See
Original change's description:
> [URL] Make CSPSourceTest pass with non-special URL feature
>
> There are a few tests in CSPSourceTest, namely AllowScheme and
> CustomSchemeWithHost, that would break when we enable the
> StandardCompliandNonSpecialSchemeURLParser feature [^1][^2]:
>
> They fail because, with the feature enabled, url.host() now correctly
> returns the host part for non-special URLs. Previously, it always an
> empty string for non-special URLs.
>
> This CL updates `SourceAllowHost` (defined in csp_sources.cc) to
> preserve the current behavior of CSP when the feature is enabled.
>
> I and reviewers agreed that the current behavior is not desired, but
> decided to preserve the status-quo for now so that we can ship the
> feature without being affected by a change to CSP at the same time.
>
> [^1]:
>
> [^2]:
>
>
>
> Bug: 40063064
> Change-Id: I2bb4ea179efae2e6d2217a24c81eaec3ab71cdd9
> Reviewed-on:
> Commit-Queue: Hayato Ito <hayato@chromium.org>
> Reviewed-by: Antonio Sartori <antoniosartori@chromium.org>
> Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1304834}
Bug: 40063064
Change-Id: I2bbdefef6a3fe1c66b4eb34414e5e4f944058739
Reviewed-on:
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1306556}
M services/network/public/cpp/content_security_policy/csp_source.cc
M services/network/public/cpp/content_security_policy/csp_source_unittest.cc
ap...@google.com <ap...@google.com> #95
Branch: main
commit 8fea9859b3f7264905627ac6c7f4f4726795a3b7
Author: Hayato Ito <hayato@chromium.org>
Date: Tue May 28 01:25:48 2024
Reland "[URL] Preserve Blink's CSP behavior for non-special URLs"
This is a reland of commit 5de3a8d8986b27ec4278e4e6c949f909c8b2ae9b
The difference between the reverted CL and this CL is
The problem was that the url.Host() object doesn't outlive
HostForCSP() function.
Original change's description:
> [URL] Preserve Blink's CSP behavior for non-special URLs
>
> This CL is similar to
> CSP implementation to ensure the behavior remains consistent
> regardless of non-special URL support.
>
> The following tests now pass:
>
> - CSPSourceTest.MatchingAsSelf
> - CSPSourceTest.SchemeIsEmpty
>
> Bug: 40063064
> Change-Id: I80d7e64a627ffc9dbb7616027467ea1c6616b983
> Reviewed-on:
> Reviewed-by: Antonio Sartori <antoniosartori@chromium.org>
> Commit-Queue: Hayato Ito <hayato@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1304889}
Bug: 40063064
Change-Id: Ic6323eac8a609ae35d96deb562def502eeb103fc
Reviewed-on:
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1306562}
M third_party/blink/renderer/core/frame/csp/DEPS
M third_party/blink/renderer/core/frame/csp/csp_source.cc
M third_party/blink/renderer/core/frame/csp/csp_source_test.cc
ap...@google.com <ap...@google.com> #96
Branch: main
commit aa5588aad962c20521d97b45eb42de9aa29cf131
Author: Hayato Ito <hayato@chromium.org>
Date: Tue May 28 05:06:46 2024
[URL] Opt-out "drivefs://" scheme from non-special URL support
The following test is failing [^1][^2] in linux-chromeos-rel when we
enable the StandardCompliandNonSpecialSchemeURLParser feature [^3]:
- SystemNotificationManagerTest.Errors
It appears that the test uses "drivefs://" scheme URLs.
Usually, I would try to fix the failure somehow, however, chromeos
codebase presents a challenge for me, due to limitations in my
familiarity with ChromeOS development.
Therefore, as a temporary solution, let me tentatively opt-out
"drivefs://" scheme from non-special URL support, as I did it for
"android://" scheme [4]. That makes these failing tests pass regardless
of the feature state.
For a more permanent solution, code owners or domain experts familiar
with ChromeOS development might want to work on a real fix, if
necessary. If a proper fix is critical before we ship the feature, I'd
appreciate if you could file a bug and marking it blocking for bug
40063064 so we don't ship the feature until all critical issues are
addressed.
[^1]:
[^2]:
[^3]:
[^4]:
Bug: 40063064
Change-Id: Ifecd15b90b458f2abcd4b743c25db921125e2015
Reviewed-on:
Reviewed-by: Ben Reich <benreich@chromium.org>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1306594}
M url/url_constants.h
M url/url_util.cc
ap...@google.com <ap...@google.com> #97
Branch: main
commit 529781a69d141830ddaa23d86da2a4a64511a4de
Author: Hayato Ito <hayato@chromium.org>
Date: Wed May 29 04:13:25 2024
[URL] Opt-out "steam://" scheme from non-special URL support
The following test is failing [^1][^2] in linux-chromeos-rel when we
enable the StandardCompliandNonSpecialSchemeURLParser feature [^3]:
- GuestOsExternalProtocolHandlerBorealisTest.AllowedURL
It appears that the test uses "steam://" scheme URLs.
Usually, I would try to fix the failure somehow, however, chromeos
codebase presents a challenge for me, due to limitations in my
familiarity with ChromeOS development.
Therefore, as a temporary solution, let me tentatively opt-out
"steam://" scheme from non-special URL support, as I did it for
"android://" scheme [4]. That makes these failing tests pass regardless
of the feature state.
As reviewers suggested, this CL also adds "chromeos-steam://" scheme to
the opt-out list, which is being used in
chrome/browser/ash/borealis/borealis_install_url_handler.cc.
For a more permanent solution, code owners or domain experts familiar
with ChromeOS development might want to work on a real fix, if
necessary. If a proper fix is critical before we ship the feature, I'd
appreciate if you could file a bug and marking it blocking for bug
40063064 so we don't ship the feature until all critical issues are
addressed.
[^1]:
[^2]:
[^3]:
[^4]:
Bug: 40063064
Change-Id: Ib2f25a74793a28f98e17c68ad2dbefb01e392af3
Reviewed-on:
Commit-Queue: Hayato Ito <hayato@chromium.org>
Reviewed-by: David Munro <davidmunro@google.com>
Cr-Commit-Position: refs/heads/main@{#1307203}
M url/url_constants.h
M url/url_util.cc
ap...@google.com <ap...@google.com> #98
Branch: main
commit 6a37be10193553d0bd1f4b8dfb098de515e75d1f
Author: Hayato Ito <hayato@chromium.org>
Date: Wed May 29 07:16:11 2024
[URL] Make LookupProxyAuthCredentials pass with non-special URL feature
The following test is failing [^1][^2] in linux-chromeos-rel when we
enable the StandardCompliandNonSpecialSchemeURLParser feature [^3]:
- NetworkContextTest.LookupProxyAuthCredentials
Note that the test is surrounded by BUILDFLAG(IS_CHROMEOS_ASH).
The test currently uses a non-special URL, "foo://bar.test:1080", as a
proxy URL (`foo_proxy`) (added in [4]).
This CL removes the part which uses `foo_proxy` since that is so nonsensical, as a reviewer suggested.
[^1]:
[^2]:
[^3]:
[^4]:
Bug: 40063064
Change-Id: I5f90c7c6fd6b4c383f922769ddfcbd56a575bbae
Reviewed-on:
Reviewed-by: Adam Rice <ricea@chromium.org>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1307252}
M services/network/network_context_unittest.cc
ap...@google.com <ap...@google.com> #99
Branch: main
commit 4ba28542f310c5ecddcf27b0c56cfe291b886bf3
Author: Hayato Ito <hayato@chromium.org>
Date: Wed May 29 07:49:20 2024
[URL] Make GurlOsHandlerUtilsTest pass with non-special URL feature
The following test is failing [^1][^2] in linux-chromeos-rel when we
enable the StandardCompliandNonSpecialSchemeURLParser feature [^3]:
- GurlOsHandlerUtilsTest.SanitizeAshUrl
The test currently uses a non-special URL, "os://version".
When the feature is enabled, the host part in non-special URLs can be
correctly parsed. See the following URL parser tester for details:
hostname:
> whatwg-url : "version"
> Chrome: (empty string)
In preparation for enabling the feature, this CL makes the test pass,
regardless of whether the feature is enabled or not, by making the
test a parameterized test.
Though the main purpose of this CL is to make the test pass with the
feature enabled, I'd like to notify a code owner that we are changing
the behavior of non-special URLs via this CL's review. Since I'm not
familiar how `SanitizeAshUrl` should work for non-special URLs (e.g.
"os://version" URL here), it's recommended for a code owner or a domain
expert to review and potentially do an appropriate action in a follow-up
CL, if necessary.
Depending on the severity of a potential breakage, I'd appreciate if
you could file a bug and marking it as blocking for
don't ship the feature until all critical issues are addressed.
[^1]:
[^2]:
[^3]:
Bug: 40063064
Change-Id: Id3ea36cbc31a1ccc029b9cc7d496e8c2759c398d
Reviewed-on:
Commit-Queue: Hayato Ito <hayato@chromium.org>
Reviewed-by: Thomas Lukaszewicz <tluk@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1307259}
M chromeos/crosapi/cpp/gurl_os_handler_unittest.cc
ap...@google.com <ap...@google.com> #100
Branch: main
commit 207d428990ccbc9c313021fb3384cf30f94f60ac
Author: Hayato Ito <hayato@chromium.org>
Date: Fri May 31 02:56:31 2024
[URL] Clean up constants defined in url_constants.h
Clean up constants defined in url_constants.h.
- Add a "Scheme" suffix for consistency
- Remove unused u16 versions
Bug: 40063064
Change-Id: Ia8107a29673cd44f45a2384e488ba08e72210b32
Reviewed-on:
Commit-Queue: Hayato Ito <hayato@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1308434}
M url/url_constants.h
M url/url_util.cc
ap...@google.com <ap...@google.com> #101
Branch: main
commit a17acca956f74c3d01f8eae30d62166e5b8db91e
Author: Hayato Ito <hayato@chromium.org>
Date: Fri May 31 06:08:49 2024
[URL] Opt-out "materialized-view://" scheme from non-special URL support
The following test is failing [^1][^2] in linux-chromeos-rel when we
enable the StandardCompliandNonSpecialSchemeURLParser feature [^3]:
- FileManagerJsTest.DucksAllEntries
It appears that the test uses "materialized-view://" scheme URLs [^4].
This CL opts-out "materialized-view://", as I did it for "drivefs://"
in
For the record, the opt-out of "materialized-view://" seems to fix the
following test too:
- MaterializedViews/FilesAppBrowserTest.Test/mvScanner_MaterializedViews
[^1]:
[^2]:
[^3]:
[^4]:
Bug: 40063064
Change-Id: I82213d90189b536655b3acbb61ceea9d39073b72
Reviewed-on:
Reviewed-by: Luciano Pacheco <lucmult@chromium.org>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1308475}
M url/url_constants.h
M url/url_util.cc
ap...@google.com <ap...@google.com> #102
Branch: main
commit 76dac9729b1605f8b18a5d2421008d11e9169c6f
Author: Hayato Ito <hayato@chromium.org>
Date: Mon Jun 03 03:54:17 2024
[URL] Revert the opt-out of "chromium-x-callback://"
The previous CL,
"chromium-x-callback://" scheme from non-special URL support, however,
AppStartupParametersTest tests became failing again with the feature
enabled.
I investigated a reason. It appears that the tests would fail after
What we need was probably just
revert
I confirmed that AppStartupParametersTest tests don't fail with PS 4
[^1].
[^1]
Bug: 40063064
Change-Id: I8b91dd189decce7269c9c63973926aff839bb67a
Reviewed-on:
Reviewed-by: Mark Cogan <marq@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1309171}
M url/url_constants.h
M url/url_util.cc
ap...@google.com <ap...@google.com> #103
Branch: main
commit 69204a823751f59e5eccecb43ee37b748056c648
Author: Hayato Ito <hayato@chromium.org>
Date: Tue Jun 04 07:46:42 2024
[URL] Make ArcDocumentsProvider test pass with non-special URL feature
ArcDocumentsProviderUtilTest.BuildDocumentUrl is one of the tests
which would fail [^1][^2] when we enable the
StandardCompliandNonSpecialSchemeURLParser feature [^3]:
The test currently uses non-special URLs like:
"content://../document/.."
With the feature enabled, that will be:
"content://../"
See the following URL parser tester for details:
In preparation for enabling the feature, this CL removed the test, as
a reviewer recommended. The risk of a breakage would be low.
[^1]:
[^2]:
[^3]:
Bug: 40063064
Change-Id: I1cb1c238b8a1e3d4dd656da37c60e09327791465
Reviewed-on:
Commit-Queue: Hayato Ito <hayato@chromium.org>
Reviewed-by: Momoko Hattori <momohatt@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1309794}
M chrome/browser/ash/arc/fileapi/arc_documents_provider_util_unittest.cc
ap...@google.com <ap...@google.com> #104
Branch: main
commit 91ee6ec20704b5dd68e42cd60339154a9cd262c5
Author: Hayato Ito <hayato@chromium.org>
Date: Wed Jun 12 04:20:44 2024
[URL] Make testIsValidHomepage pass with non-special URL feature
The following test is failing [^1][^2] on android-arm64-rel when we
enable the StandardCompliandNonSpecialSchemeURLParser feature [^3]:
- PartnerBrowserCustomizationsUnitTest#testIsValidHomepage
The test case uses a non-special URL, "about://newtab":
```
Assert.assertFalse(
PartnerBrowserCustomizations.isValidHomepage(new GURL("about://newtab")));
```
When the feature is enabled, `url.host()` correctly returns "newtab"
for "about://newtab", causing the test case to fail.
It appears that this test case was introduced during the homepage code
GURL migration [^4].
Before the migration, `isValidHomePage` correctly returned true for
"about://newtab":
```
Assert.assertTrue(PartnerBrowserCustomizations.isValidHomepage("about://newtab"));
```
Given that, enabling the feature seems benign here.
We could introduce a parameterized test to ensure it passes regardless
of the feature state, However, it might be simpler to comment out the
test case with a TODO comment.
[^1]:
[^2]:
[^3]:
[^4]:
Bug: 40063064
Change-Id: Ibdb57beae8978ef64a0df01fae50b9f03e3b9ff7
Reviewed-on:
Reviewed-by: Wenyu Fu <wenyufu@chromium.org>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1313817}
M chrome/browser/partnercustomizations/junit/src/org/chromium/chrome/browser/partnercustomizations/PartnerBrowserCustomizationsUnitTest.java
ap...@google.com <ap...@google.com> #105
Branch: main
commit 88557a670844034c087e5fec704617f2343cf963
Author: Joel Hockey <joelhockey@chromium.org>
Date: Fri Jun 21 12:46:54 2024
Fix cros-apps URL parsing
The current URL parsing is not standards compliant. It parses
`cros-apps://install-app` to have host="", path="//install-app".
When StandardCompliantNonSpecialSchemeURLParsing is enabled, it will
parse as host="install-app", path="".
This changes the navigation throttle to accept either
`cros-apps://install-app`, or `cros-apps:install-app` when using either
style of parsing. That is, we accept the URL if any of:
host="install-app"
path="install-app"
path="//install-app"
Bug: 40063064
Bug:
Change-Id: Icfd4b37dbc5ae7bfa5245337cc43c0dd5f40807a
Reviewed-on:
Reviewed-by: Alan Cutter <alancutter@chromium.org>
Commit-Queue: Joel Hockey <joelhockey@chromium.org>
Reviewed-by: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1317891}
M chrome/browser/apps/app_service/app_install/app_install_navigation_throttle.cc
M chrome/browser/apps/app_service/app_install/app_install_navigation_throttle_browsertest.cc
M url/url_constants.h
M url/url_util.cc
ap...@google.com <ap...@google.com> #106
Branch: main
commit 575cccb441d643354cb48aae8c721ff754783e41
Author: Hayato Ito <hayato@chromium.org>
Date: Thu Jul 04 06:00:04 2024
Extend non-special scheme URL parsing virtual test suites
Extend non-special scheme URL parsing virtual test suites to give
more time for URL API callers to update their code.
See
Bug: 40063064,350534727
Change-Id: I74f4c0e1c2fbbcbd196c4841a7e81f60dbd6cf76
Reviewed-on:
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1323184}
M third_party/blink/web_tests/VirtualTestSuites
ap...@google.com <ap...@google.com> #107
Branch: main
commit 80caa81cdd3227d26ad04039f49de06e4d5d18fd
Author: Hayato Ito <hayato@chromium.org>
Date: Wed Aug 21 05:13:54 2024
Add WPT URL test cases for non-special schemes
Add WPT URL test cases for non-special schemes which Chrome incorrectly
parses even when Chrome supports non-special scheme URLs.
The context is "Intent to Ship: Support non-special scheme URLs" thread
[^1].
The CL add test cases for the following schemes:
Opt-out schemes [^2] (Chrome parses these scheme URLs incorrectly as
opaque URLs):
- android://
- drivefs://
- chromeos-steam://
- steam://
- materialized-view://
Registered schemes [^3] (Chrome parses these scheme URLs incorrectly as
special URLs with stripping port part):
- android-app:
- chrome-distiller:
- chrome-extension:
- chrome-native:
- chrome-resource:
- chrome-search:
- fuchsia-dir:
- isolated-app:
Regarding "Registered schemes", the CL uses a URL like
"chrome-native://x:0", which doesn't have a path part, as a test case.
If Chrome parses this URL incorrectly as a special URL, its string
representation (`url.href`) should be "chrome-native://x:0/" (a slash is
appended since special URLs can't have an empty path).
If Chrome parses this URL correctly as a non-special URL, its string
representation (`url.href`) should be "chrome-native://x:0" (non-special
URLs can have an empty path).
Note: In WPT test runner environments, Chrome may not register these
schemes [^3] because these schemes are registered at specific times in
runtime. This CL doesn't address the timing issue in Chrome, just
adding WPTs.
- [^1]
- [^2]
- [^3]
Bug: 40063064
Change-Id: I2eef2136496cbaf16b500c976956098998aa424f
Reviewed-on:
Reviewed-by: Domenic Denicola <domenic@chromium.org>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1344587}
M third_party/blink/web_tests/external/wpt/url/resources/urltestdata.json
M third_party/blink/web_tests/flag-specific/highdpi/external/wpt/url/a-element_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/linux/external/wpt/url/a-element-xhtml_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/linux/external/wpt/url/a-element_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/linux/external/wpt/url/url-constructor.any.worker_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/linux/external/wpt/url/url-constructor.any_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/a-element-xhtml_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/a-element_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-constructor.any.worker_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-constructor.any_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/mac/external/wpt/url/a-element_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/mac/external/wpt/url/url-constructor.any.worker_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/mac/external/wpt/url/url-constructor.any_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/win/external/wpt/url/a-element-xhtml_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/win/external/wpt/url/a-element_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/win/external/wpt/url/url-constructor.any.worker_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/win/external/wpt/url/url-constructor.any_exclude=(file_javascript_mailto)-expected.txt
ap...@google.com <ap...@google.com> #108
Branch: main
commit 28568c8eeedb68fed7215c665d1241b646803a0b
Author: Hayato Ito <hayato@chromium.org>
Date: Mon Aug 26 23:49:05 2024
[Ship] Support non-special scheme URLs
Support non-special scheme URLs, enabling the flag
`StandardCompliantNonSpecialSchemeURLParsing`.
See the Intent to Ship [^1] (which got 3 LGTMs) and the platform
status [^2] for more details.
Rebasing:
While enabling the flag, this CL also rebased web test expectations.
Despite the effort to minimize the size of this flag flip CL, this CL
still include a significant number of rebaselines due to the nature of
the update.
Each rebase was already carefully reviewed individually (details in
[^3]).
- WPT URL tests have been tracked in virtual tests. This CL simply
copies the virtual test result to the base.
- Other non-WPT or non-URL WPT tests were reviewed individually.
A tool, `blink_tool.py rebaseline-cl`, was used to automate the
rebasing process. However, a few tests still failed [^4] due to the
unexpected PNG files added by the tool. Thus, I removed the PNG files
using the following:
: git upstream-diff --name-only | grep 'png$' | xargs git restore -s origin/main
All tests are now passing, and the change is ready to be shipped.
- [^1] Intent to Ship:
- [^2] Platform status:
- [^3]
- [^4]
Bug: 40063064
Change-Id: I47b4882cc191adbd0db2d043fdad29bd2466faf3
Reviewed-on:
Commit-Queue: Hayato Ito <hayato@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1347064}
M third_party/blink/web_tests/external/wpt/fetch/data-urls/processing.any-expected.txt
M third_party/blink/web_tests/external/wpt/fetch/data-urls/processing.any.serviceworker-expected.txt
M third_party/blink/web_tests/external/wpt/fetch/data-urls/processing.any.sharedworker-expected.txt
M third_party/blink/web_tests/external/wpt/fetch/data-urls/processing.any.worker-expected.txt
M third_party/blink/web_tests/external/wpt/html/infrastructure/urls/resolving-urls/query-encoding/windows-1251_include=scheme-expected.txt
M third_party/blink/web_tests/external/wpt/html/infrastructure/urls/resolving-urls/query-encoding/windows-1252_include=scheme-expected.txt
D third_party/blink/web_tests/external/wpt/html/semantics/links/links-created-by-a-and-area-elements/non-special-url-getter-setter.window-expected.txt
D third_party/blink/web_tests/external/wpt/url/a-element-xhtml_include=javascript-expected.txt
D third_party/blink/web_tests/external/wpt/url/a-element-xhtml_include=mailto-expected.txt
M third_party/blink/web_tests/external/wpt/url/a-element_include=javascript-expected.txt
M third_party/blink/web_tests/external/wpt/url/a-element_include=mailto-expected.txt
D third_party/blink/web_tests/external/wpt/url/javascript-urls.window-expected.txt
D third_party/blink/web_tests/external/wpt/url/url-constructor.any.worker_include=javascript-expected.txt
D third_party/blink/web_tests/external/wpt/url/url-constructor.any.worker_include=mailto-expected.txt
D third_party/blink/web_tests/external/wpt/url/url-constructor.any_include=javascript-expected.txt
D third_party/blink/web_tests/external/wpt/url/url-constructor.any_include=mailto-expected.txt
M third_party/blink/web_tests/external/wpt/url/url-setters-a-area.window_include=file-expected.txt
D third_party/blink/web_tests/external/wpt/url/url-setters-a-area.window_include=javascript-expected.txt
M third_party/blink/web_tests/external/wpt/url/url-setters-stripping.any-expected.txt
M third_party/blink/web_tests/external/wpt/url/url-setters-stripping.any.worker-expected.txt
M third_party/blink/web_tests/external/wpt/url/url-setters.any.worker_include=file-expected.txt
D third_party/blink/web_tests/external/wpt/url/url-setters.any.worker_include=javascript-expected.txt
M third_party/blink/web_tests/external/wpt/url/url-setters.any_include=file-expected.txt
D third_party/blink/web_tests/external/wpt/url/url-setters.any_include=javascript-expected.txt
M third_party/blink/web_tests/fast/dom/HTMLAnchorElement/set-href-attribute-hash-expected.txt
D third_party/blink/web_tests/fast/dom/HTMLAnchorElement/set-href-attribute-hostname-expected.txt
M third_party/blink/web_tests/fast/dom/HTMLAnchorElement/set-href-attribute-port-expected.txt
D third_party/blink/web_tests/fast/domurl/url-hash-expected.txt
M third_party/blink/web_tests/fast/loader/url-parse-1-expected.txt
M third_party/blink/web_tests/fast/url/invalid-urls-utf8-expected.txt
M third_party/blink/web_tests/fast/url/mailto-expected.txt
D third_party/blink/web_tests/flag-specific/disable-site-isolation-trials/virtual/url-non-special/external/wpt/url/url-setters-a-area.window_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/flag-specific/highdpi/external/wpt/url/a-element_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/flag-specific/highdpi/external/wpt/url/a-element_include=javascript-expected.txt
M third_party/blink/web_tests/flag-specific/highdpi/external/wpt/url/a-element_include=mailto-expected.txt
M third_party/blink/web_tests/http/tests/security/base-url-data-expected.txt
D third_party/blink/web_tests/http/tests/security/base-url-javascript-invalid-expected.txt
M third_party/blink/web_tests/platform/linux/external/wpt/url/a-element-origin-expected.txt
M third_party/blink/web_tests/platform/linux/external/wpt/url/a-element-origin-xhtml-expected.txt
M third_party/blink/web_tests/platform/linux/external/wpt/url/a-element-xhtml_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/linux/external/wpt/url/a-element_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/linux/external/wpt/url/failure-expected.txt
M third_party/blink/web_tests/platform/linux/external/wpt/url/url-constructor.any.worker_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/linux/external/wpt/url/url-constructor.any_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/linux/external/wpt/url/url-origin.any-expected.txt
M third_party/blink/web_tests/platform/linux/external/wpt/url/url-origin.any.worker-expected.txt
M third_party/blink/web_tests/platform/linux/external/wpt/url/url-setters-a-area.window_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/linux/external/wpt/url/url-setters.any.worker_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/linux/external/wpt/url/url-setters.any_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/linux/fast/dom/HTMLAnchorElement/set-href-attribute-hostname-expected.txt
M third_party/blink/web_tests/platform/linux/fast/dom/HTMLAnchorElement/set-href-attribute-search-expected.txt
M third_party/blink/web_tests/platform/linux/fast/url/segments-expected.txt
D third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/fetch/data-urls/processing.any.serviceworker-expected.txt
D third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/fetch/data-urls/processing.any.sharedworker-expected.txt
D third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/html/infrastructure/urls/resolving-urls/query-encoding/windows-1251_include=scheme-expected.txt
D third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/html/infrastructure/urls/resolving-urls/query-encoding/windows-1252_include=scheme-expected.txt
D third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/html/semantics/links/links-created-by-a-and-area-elements/non-special-url-getter-setter.window-expected.txt
D third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/a-element-origin-expected.txt
D third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/a-element-origin-xhtml-expected.txt
D third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/a-element-xhtml_exclude=(file_javascript_mailto)-expected.txt
D third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/a-element-xhtml_include=javascript-expected.txt
D third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/a-element-xhtml_include=mailto-expected.txt
D third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/a-element_exclude=(file_javascript_mailto)-expected.txt
D third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/a-element_include=javascript-expected.txt
D third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/a-element_include=mailto-expected.txt
D third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/failure-expected.txt
D third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/javascript-urls.window-expected.txt
D third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-constructor.any.worker_exclude=(file_javascript_mailto)-expected.txt
D third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-constructor.any.worker_include=javascript-expected.txt
D third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-constructor.any.worker_include=mailto-expected.txt
D third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-constructor.any_exclude=(file_javascript_mailto)-expected.txt
D third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-constructor.any_include=javascript-expected.txt
D third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-constructor.any_include=mailto-expected.txt
D third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-origin.any-expected.txt
D third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-origin.any.worker-expected.txt
D third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-setters-a-area.window_exclude=(file_javascript_mailto)-expected.txt
D third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-setters-a-area.window_include=file-expected.txt
D third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-setters-a-area.window_include=javascript-expected.txt
D third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-setters-stripping.any-expected.txt
D third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-setters-stripping.any.worker-expected.txt
D third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-setters.any.worker_exclude=(file_javascript_mailto)-expected.txt
D third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-setters.any.worker_include=file-expected.txt
D third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-setters.any.worker_include=javascript-expected.txt
D third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-setters.any_exclude=(file_javascript_mailto)-expected.txt
D third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-setters.any_include=file-expected.txt
D third_party/blink/web_tests/platform/linux/virtual/url-non-special/external/wpt/url/url-setters.any_include=javascript-expected.txt
D third_party/blink/web_tests/platform/linux/virtual/url-non-special/fast/dom/HTMLAnchorElement/set-href-attribute-hash-expected.txt
D third_party/blink/web_tests/platform/linux/virtual/url-non-special/fast/dom/HTMLAnchorElement/set-href-attribute-port-expected.txt
D third_party/blink/web_tests/platform/linux/virtual/url-non-special/fast/dom/HTMLAnchorElement/set-href-attribute-search-expected.txt
D third_party/blink/web_tests/platform/linux/virtual/url-non-special/fast/domurl/url-hash-expected.txt
D third_party/blink/web_tests/platform/linux/virtual/url-non-special/fast/loader/url-parse-1-expected.txt
D third_party/blink/web_tests/platform/linux/virtual/url-non-special/fast/url/invalid-urls-utf8-expected.txt
D third_party/blink/web_tests/platform/linux/virtual/url-non-special/fast/url/mailto-expected.txt
D third_party/blink/web_tests/platform/linux/virtual/url-non-special/fast/url/segments-expected.txt
D third_party/blink/web_tests/platform/linux/virtual/url-non-special/http/tests/security/base-url-data-expected.txt
M third_party/blink/web_tests/platform/mac-mac13/virtual/keepalive-in-browser-migration/external/wpt/fetch/data-urls/processing.any.worker-expected.txt
M third_party/blink/web_tests/platform/mac-mac14-arm64/virtual/keepalive-in-browser-migration/external/wpt/fetch/data-urls/processing.any.worker-expected.txt
M third_party/blink/web_tests/platform/mac-mac14/virtual/keepalive-in-browser-migration/external/wpt/fetch/data-urls/processing.any.worker-expected.txt
M third_party/blink/web_tests/platform/mac/external/wpt/url/a-element-origin-expected.txt
M third_party/blink/web_tests/platform/mac/external/wpt/url/a-element-origin-xhtml-expected.txt
M third_party/blink/web_tests/platform/mac/external/wpt/url/a-element_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/mac/external/wpt/url/failure-expected.txt
M third_party/blink/web_tests/platform/mac/external/wpt/url/url-constructor.any.worker_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/mac/external/wpt/url/url-constructor.any_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/mac/external/wpt/url/url-origin.any-expected.txt
M third_party/blink/web_tests/platform/mac/external/wpt/url/url-origin.any.worker-expected.txt
M third_party/blink/web_tests/platform/mac/external/wpt/url/url-setters.any.worker_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/mac/external/wpt/url/url-setters.any_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/mac/fast/dom/HTMLAnchorElement/set-href-attribute-hostname-expected.txt
M third_party/blink/web_tests/platform/mac/fast/dom/HTMLAnchorElement/set-href-attribute-search-expected.txt
M third_party/blink/web_tests/platform/mac/fast/url/segments-expected.txt
M third_party/blink/web_tests/platform/win/external/wpt/url/a-element-origin-expected.txt
M third_party/blink/web_tests/platform/win/external/wpt/url/a-element-origin-xhtml-expected.txt
M third_party/blink/web_tests/platform/win/external/wpt/url/a-element-xhtml_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/win/external/wpt/url/a-element_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/win/external/wpt/url/failure-expected.txt
M third_party/blink/web_tests/platform/win/external/wpt/url/url-constructor.any.worker_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/win/external/wpt/url/url-constructor.any_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/win/external/wpt/url/url-origin.any-expected.txt
M third_party/blink/web_tests/platform/win/external/wpt/url/url-origin.any.worker-expected.txt
M third_party/blink/web_tests/platform/win/external/wpt/url/url-setters-a-area.window_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/win/external/wpt/url/url-setters.any.worker_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/win/external/wpt/url/url-setters.any_exclude=(file_javascript_mailto)-expected.txt
M third_party/blink/web_tests/platform/win/fast/dom/HTMLAnchorElement/set-href-attribute-hostname-expected.txt
M third_party/blink/web_tests/platform/win/fast/dom/HTMLAnchorElement/set-href-attribute-search-expected.txt
M third_party/blink/web_tests/platform/win/fast/url/segments-expected.txt
D third_party/blink/web_tests/virtual/url-non-special/http/tests/security/base-url-javascript-invalid-expected.txt
M url/url_features.cc
ap...@google.com <ap...@google.com> #109
Branch: main
commit 1f5494f405a7b0aaac8aa089c1c72086a107aa2b
Author: Hayato Ito <hayato@chromium.org>
Date: Tue Aug 27 05:09:04 2024
Mark processing.any.worker.html as failure
This is a follow-up of
LUCI Bisection has identified
of a test failure.
This is unexpected to me. The failure happens only in
virtual/keepalive-in-browser-migration test. I couldn't reproduce the
failure.
I'm working on fixing this. Meanwhile, let me suppress the failure
instead of reverting.
Bug: 40063064,362377843
Change-Id: I4991208bc3e723f27611242928ccc01847f8ba99
Reviewed-on:
Auto-Submit: Hayato Ito <hayato@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Commit-Queue: Adam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1347165}
M third_party/blink/web_tests/TestExpectations
ap...@google.com <ap...@google.com> #110
Branch: main
commit f7f364d0b2b1ecabcc0710c4163fdc59ff31cff1
Author: Hayato Ito <hayato@chromium.org>
Date: Tue Aug 27 09:39:06 2024
Add a warning comment to discourage adding a new scheme
Discourage adding a new scheme to the standard scheme list.
We probably no longer need that in most cases since non-special URLs are
correctly supported.
Bug: 40063064
Change-Id: I2e1ceda76569ead6035720ee6d36dd89e56f6254
Reviewed-on:
Commit-Queue: Hayato Ito <hayato@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1347234}
M chrome/common/chrome_content_client.cc
ap...@google.com <ap...@google.com> #111
Branch: main
commit 61f871feedc7f95c0e4862eb13ea8e0ae09040c1
Author: Hayato Ito <hayato@chromium.org>
Date: Thu Aug 29 10:25:45 2024
URL: Carry over has_opaque_path flag in ReplaceNonSpecialURL
Fix a regression reported in
ReplaceNonSpecialURL currently forgets to carry over the
has_opaque_path flag. Note that CanonicalizeNonSpecialURL already
does.
This leads to an issue where calling url.searchParam.set() twice for
non-special opaque path URLs triggers to call
DoCanonicalizeNonSpecialURL incorrectly instead of ReplacePathURL.
This, in turn, causes the reported bug of a prepended "/" (slash) in
the path.
Bug: 362674372, 40063064
Change-Id: Iabaf568f95b709fb6b1731f648dbaeebc7abf661
Reviewed-on:
Reviewed-by: Adam Rice <ricea@chromium.org>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1348535}
M third_party/blink/renderer/platform/weborigin/kurl_test.cc
M url/url_canon_non_special_url.cc
ap...@google.com <ap...@google.com> #112
Project: chromium/src
Branch: main
Author: Hayato Ito <
Link:
Fix a regression on non-special URL, like "git:\opaque\path"
Expand for full commit details
Fix a regression on non-special URL, like "git:\\opaque\\path"
Chrome M130 supports non-special URL, however, a regression is reported
at http://crbug.com/373928202.
The summary is:
Chrome <= 129:
| No | URL | valid url? | url.hostname | url.path |
|----+------------------+------------+--------------+----------------|
| 1 | TEST://PC/FOLDER | valid | "" | "//PC/FOLDER" |
| 2 | TEST://PC\FOLDER | valid | "" | "//PC\FOLDER" |
| 3 | TEST:\\PC\FOLDER | valid | "" | "\\PC\FOLDER" |
| 4 | TEST:\\PC | valid | "" | "\\PC" |
Chrome 130:
| No | URL | valid url? | url.hostname | url.path |
|----+------------------+------------+--------------+---------------|
| 1 | TEST://PC/FOLDER | valid | "pc" | "/FOLDEDR" |
| 2 | TEST://PC\FOLDER | invalid | - | - |
| 3 | TEST:\\PC\FOLDER | invalid | - | - |
| 4 | TEST:\\PC | valid | "pc" | "" |
URL Standard (expected behaviors)
| No | URL | valid url? | url.hostname | url.path |
|----+------------------+------------+--------------+---------------|
| 1 | TEST://PC/FOLDER | valid | "pc" | "/FOLDEDR" |
| 2 | TEST://PC\FOLDER | invalid | - | - |
| 3 | TEST:\\PC\FOLDER | valid | "" | "\\PC\FOLDER" |
| 4 | TEST:\\PC | valid | "" | "\\PC" |
The problems is URL No.3 or No4, where "\\" (two backslashes) follows
after "scheme:", for which Chrome M130 is not spec-compliant.
These URLs should be a valid opaque path URL, however, Chrome M130
treat them wrongly.
The reason:
The current (wrong) URL parser counts backslahses as well as slashes
after "scheme:". This behavior is the correct behavior for a special
URL, like "https:\\PC\\FOLDER", but NOT for non-special URLs, like
"TEST:\\PC\\FOLDER", unfortunately.
For your reference, the URL Standard says that at the following place:
https://url.spec.whatwg.org/#scheme-state
> 7. Otherwise, if url is special, set state to special authority
> slashes state.
> 8. Otherwise, if remaining starts with an U+002F (/), set state to
> path or authority state and increase pointer by 1.
> 9. Otherwise, set url’s path to the empty string and set state to
> opaque path state.
It's a bit cryptic, but if you read this part (and other parts too)
carefully, it says so. :(
Unfortunately, the current WPT doesn't cover these test cases, so we
didn't notice this regression.
This CL fixes a regression by implement that URL standard part, and
also add WPT tests to prevent a regression.
Bug: 40063064,373928202
Change-Id: Ia5ba5ff16426893c735775c62b7044842d16b46d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5939018
Reviewed-by: Adam Rice <ricea@chromium.org>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1370488}
Files:
- M
third_party/blink/web_tests/external/wpt/url/resources/urltestdata.json
- M
url/third_party/mozilla/url_parse.cc
- M
url/url_parse_internal.h
Hash: a2d10d8f8533f83d48c49f0d5603a33b6052d17e
Date: Fri Oct 18 10:56:16 2024
jy...@gmail.com <jy...@gmail.com> #113
ha...@chromium.org <ha...@chromium.org> #114
(Re
To developers,
If you encounter a regression, please refer to "For Web Developers" [1] and "Regression reports in Chrome M130 " [2] sections in
- [1]
https://docs.google.com/document/d/1LjxHl32fE4tCKugrK_PIso7mfXQVEeoD1wSnX2y0ZU8/edit?resourcekey=0-d1gP4X2sG7GPl9mlTeptIA&tab=t.0#heading=h.a67ulu2yrl9p - [2]
https://docs.google.com/document/d/1LjxHl32fE4tCKugrK_PIso7mfXQVEeoD1wSnX2y0ZU8/edit?resourcekey=0-d1gP4X2sG7GPl9mlTeptIA&tab=t.0#heading=h.q2fpvw1t56t8
Probably you can find a similar report there, and how to fix it.
ap...@google.com <ap...@google.com> #115
Project: chromium/src
Branch: refs/branch-heads/6778
Author: Hayato Ito <
Link:
Fix a regression on non-special URL, like "git:\opaque\path"
Expand for full commit details
Fix a regression on non-special URL, like "git:\\opaque\\path"
Chrome M130 supports non-special URL, however, a regression is reported
at http://crbug.com/373928202.
The summary is:
Chrome <= 129:
| No | URL | valid url? | url.hostname | url.path |
|----+------------------+------------+--------------+----------------|
| 1 | TEST://PC/FOLDER | valid | "" | "//PC/FOLDER" |
| 2 | TEST://PC\FOLDER | valid | "" | "//PC\FOLDER" |
| 3 | TEST:\\PC\FOLDER | valid | "" | "\\PC\FOLDER" |
| 4 | TEST:\\PC | valid | "" | "\\PC" |
Chrome 130:
| No | URL | valid url? | url.hostname | url.path |
|----+------------------+------------+--------------+---------------|
| 1 | TEST://PC/FOLDER | valid | "pc" | "/FOLDEDR" |
| 2 | TEST://PC\FOLDER | invalid | - | - |
| 3 | TEST:\\PC\FOLDER | invalid | - | - |
| 4 | TEST:\\PC | valid | "pc" | "" |
URL Standard (expected behaviors)
| No | URL | valid url? | url.hostname | url.path |
|----+------------------+------------+--------------+---------------|
| 1 | TEST://PC/FOLDER | valid | "pc" | "/FOLDEDR" |
| 2 | TEST://PC\FOLDER | invalid | - | - |
| 3 | TEST:\\PC\FOLDER | valid | "" | "\\PC\FOLDER" |
| 4 | TEST:\\PC | valid | "" | "\\PC" |
The problems is URL No.3 or No4, where "\\" (two backslashes) follows
after "scheme:", for which Chrome M130 is not spec-compliant.
These URLs should be a valid opaque path URL, however, Chrome M130
treat them wrongly.
The reason:
The current (wrong) URL parser counts backslahses as well as slashes
after "scheme:". This behavior is the correct behavior for a special
URL, like "https:\\PC\\FOLDER", but NOT for non-special URLs, like
"TEST:\\PC\\FOLDER", unfortunately.
For your reference, the URL Standard says that at the following place:
https://url.spec.whatwg.org/#scheme-state
> 7. Otherwise, if url is special, set state to special authority
> slashes state.
> 8. Otherwise, if remaining starts with an U+002F (/), set state to
> path or authority state and increase pointer by 1.
> 9. Otherwise, set url’s path to the empty string and set state to
> opaque path state.
It's a bit cryptic, but if you read this part (and other parts too)
carefully, it says so. :(
Unfortunately, the current WPT doesn't cover these test cases, so we
didn't notice this regression.
This CL fixes a regression by implement that URL standard part, and
also add WPT tests to prevent a regression.
(cherry picked from commit a2d10d8f8533f83d48c49f0d5603a33b6052d17e)
Bug: 40063064,373928202
Fixed: 374638498
Change-Id: Ia5ba5ff16426893c735775c62b7044842d16b46d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5939018
Reviewed-by: Adam Rice <ricea@chromium.org>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Original-Commit-Position: refs/heads/main@{#1370488}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5959684
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/branch-heads/6778@{#723}
Cr-Branched-From: b21671ca172dcfd1566d41a770b2808e7fa7cd88-refs/heads/main@{#1368529}
Files:
- M
third_party/blink/web_tests/external/wpt/url/resources/urltestdata.json
- M
url/third_party/mozilla/url_parse.cc
- M
url/url_parse_internal.h
Hash: a26690025b4e8ebfa6f953c4c09515938a431903
Date: Thu Oct 24 03:33:28 2024
ap...@google.com <ap...@google.com> #116
Project: chromium/src
Branch: main
Author: Hayato Ito <
Link:
Fixes incorrect URL updates for registered schemes (e.g. "steam:")
Expand for full commit details
Fixes incorrect URL updates for registered schemes (e.g. "steam:")
Updating url.pathname of non-special scheme URLs whose schemes are
internally registered as opaque non-special schemes (e.g "steam:") adds
a leading slash wrongly.
This issue was found by a gurl_fuzzer.
The CL fixes their behaviors as follows:
Before:
> const url = new URL("steam:a")
> url.pathname = "b"
> url.href
"steam:/b"
After:
> const url = new URL("steam:a")
> url.pathname = "b"
> url.href
"steam:b"
Every other normal non-special scheme URL, like "git:a", doesn't have
this issue.
Bug: 40063064,375660989
Change-Id: I3a8104f48acf956747e0efa0cd7d612fe26a26e7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5975076
Reviewed-by: Adam Rice <ricea@chromium.org>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1376010}
Files:
- M
url/gurl_unittest.cc
- M
url/url_util.cc
Hash: d79513ad76c07939824f29b1d693066104438cdf
Date: Thu Oct 31 01:08:40 2024
ha...@chromium.org <ha...@chromium.org> #117
I'm going to mark this as FIXED! There were no new bug reports for months.
I'm proud of what we accomplished with this ship, removing huge accumulated tech debt from over the decades.
The remaining cleanup work is being tracked by
do...@chromium.org <do...@chromium.org> #118
Huge congratulations on this massive, and massively impactful, project!
You might be able to find more bugs to close in
Description