forked from mirrors/gecko-dev
Automatic update from web-platform-tests URLPattern: Implement compareComponent() method. This CL adds a prototype URLPattern.compareComponent() to provide a natural ordering to URLPattern pattern strings. This was based on feedback from routing framework authors and there is some discussion in: https://github.com/WICG/urlpattern/issues/61 The general algorithm is to compare the component patterns Part by Part. The PartType, Modifier, and text contents are compared for each Part, but group names are not considered. The end result is a mostly lexicographical ordering based on fixed text. Matching groups and modifiers are ordered such that more restrictive patterns are greater. Bug: 1232795 Change-Id: I8474cd7d7689e657c9c74c552ad630cdcdd86c95 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3052630 Commit-Queue: Ben Kelly <wanderview@chromium.org> Reviewed-by: Jeremy Roman <jbroman@chromium.org> Cr-Commit-Position: refs/heads/master@{#906025} -- wpt-commits: 2f4642d50f5c868a281cf3f20c8c7122e1f6b89a wpt-pr: 29791
2 lines
84 B
JavaScript
2 lines
84 B
JavaScript
// META: global=window,worker
|
|
// META: script=resources/urlpattern-compare-tests.js
|