mirror of
https://github.com/servo/servo.git
synced 2025-08-12 08:55:32 +01:00
Create a parser for URLPatterns (#36382)
This change implements the pattern parser, completing the "parsing pipeline" for URL patterns. Testing: Primarily `urlpattern/urlpattern-hasregexpgroups.any.js`, some other subtests start to pass too. --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
parent
2b63e60e8f
commit
8f1c23692e
4 changed files with 449 additions and 243 deletions
|
@ -446,9 +446,6 @@
|
|||
[Pattern: ["http://🚲.com/"\] Inputs: ["http://🚲.com/"\]]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"hostname":"\\ud83d \\udeb2"}\] Inputs: undefined]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"pathname":"\\ud83d \\udeb2"}\] Inputs: [\]]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -470,9 +467,6 @@
|
|||
[Pattern: [{"protocol":"http","port":"80 "}\] Inputs: [{"protocol":"http","port":"80"}\]]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"protocol":"http","port":"100000"}\] Inputs: [{"protocol":"http","port":"100000"}\]]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"port":"80"}\] Inputs: [{"protocol":"http","port":"80"}\]]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -557,9 +551,6 @@
|
|||
[Pattern: [{"protocol":"data","pathname":":number([0-9\]+)"}\] Inputs: ["data:8675309"\]]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"pathname":"/(\\\\m)"}\] Inputs: undefined]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"pathname":"/foo!"}\] Inputs: [{"pathname":"/foo!"}\]]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -740,33 +731,18 @@
|
|||
[Pattern: [{"hostname":"[\\\\:\\\\:AB\\\\::num\]"}\] Inputs: [{"hostname":"[::ab:1\]"}\]]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"hostname":"[\\\\:\\\\:xY\\\\::num\]"}\] Inputs: undefined]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"hostname":"{[\\\\:\\\\:ab\\\\::num\]}"}\] Inputs: [{"hostname":"[::ab:1\]"}\]]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"hostname":"{[\\\\:\\\\:fé\\\\::num\]}"}\] Inputs: undefined]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"hostname":"{[\\\\:\\\\::num\\\\:1\]}"}\] Inputs: [{"hostname":"[::ab:1\]"}\]]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"hostname":"{[\\\\:\\\\::num\\\\:fé\]}"}\] Inputs: undefined]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"hostname":"[*\\\\:1\]"}\] Inputs: [{"hostname":"[::ab:1\]"}\]]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"hostname":"*\\\\:1\]"}\] Inputs: undefined]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: ["data\\\\:text/javascript,let x = 100/:tens?5;"\] Inputs: ["data:text/javascript,let x = 100/5;"\]]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"pathname":"/:id/:id"}\] Inputs: undefined]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"pathname":":name*"}\] Inputs: [{"pathname":"foobar"}\]]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -785,48 +761,15 @@
|
|||
[Pattern: [{"protocol":":name"}\] Inputs: [{"protocol":"foobar"}\]]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"hostname":"bad hostname"}\] Inputs: undefined]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"hostname":"bad#hostname"}\] Inputs: [{"hostname":"bad"}\]]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"hostname":"bad%hostname"}\] Inputs: undefined]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"hostname":"bad/hostname"}\] Inputs: [{"hostname":"bad"}\]]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"hostname":"bad\\\\:hostname"}\] Inputs: undefined]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"hostname":"bad<hostname"}\] Inputs: undefined]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"hostname":"bad>hostname"}\] Inputs: undefined]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"hostname":"bad?hostname"}\] Inputs: undefined]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"hostname":"bad@hostname"}\] Inputs: undefined]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"hostname":"bad[hostname"}\] Inputs: undefined]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"hostname":"bad\]hostname"}\] Inputs: undefined]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"hostname":"bad\\\\\\\\hostname"}\] Inputs: [{"hostname":"badhostname"}\]]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"hostname":"bad^hostname"}\] Inputs: undefined]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"hostname":"bad|hostname"}\] Inputs: undefined]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"hostname":"bad\\nhostname"}\] Inputs: [{"hostname":"badhostname"}\]]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -1438,9 +1381,6 @@
|
|||
[Pattern: ["http://🚲.com/"\] Inputs: ["http://🚲.com/"\]]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"hostname":"\\ud83d \\udeb2"}\] Inputs: undefined]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"pathname":"\\ud83d \\udeb2"}\] Inputs: [\]]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -1462,9 +1402,6 @@
|
|||
[Pattern: [{"protocol":"http","port":"80 "}\] Inputs: [{"protocol":"http","port":"80"}\]]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"protocol":"http","port":"100000"}\] Inputs: [{"protocol":"http","port":"100000"}\]]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"port":"80"}\] Inputs: [{"protocol":"http","port":"80"}\]]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -1549,9 +1486,6 @@
|
|||
[Pattern: [{"protocol":"data","pathname":":number([0-9\]+)"}\] Inputs: ["data:8675309"\]]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"pathname":"/(\\\\m)"}\] Inputs: undefined]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"pathname":"/foo!"}\] Inputs: [{"pathname":"/foo!"}\]]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -1732,33 +1666,18 @@
|
|||
[Pattern: [{"hostname":"[\\\\:\\\\:AB\\\\::num\]"}\] Inputs: [{"hostname":"[::ab:1\]"}\]]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"hostname":"[\\\\:\\\\:xY\\\\::num\]"}\] Inputs: undefined]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"hostname":"{[\\\\:\\\\:ab\\\\::num\]}"}\] Inputs: [{"hostname":"[::ab:1\]"}\]]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"hostname":"{[\\\\:\\\\:fé\\\\::num\]}"}\] Inputs: undefined]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"hostname":"{[\\\\:\\\\::num\\\\:1\]}"}\] Inputs: [{"hostname":"[::ab:1\]"}\]]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"hostname":"{[\\\\:\\\\::num\\\\:fé\]}"}\] Inputs: undefined]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"hostname":"[*\\\\:1\]"}\] Inputs: [{"hostname":"[::ab:1\]"}\]]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"hostname":"*\\\\:1\]"}\] Inputs: undefined]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: ["data\\\\:text/javascript,let x = 100/:tens?5;"\] Inputs: ["data:text/javascript,let x = 100/5;"\]]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"pathname":"/:id/:id"}\] Inputs: undefined]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"pathname":":name*"}\] Inputs: [{"pathname":"foobar"}\]]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -1777,48 +1696,15 @@
|
|||
[Pattern: [{"protocol":":name"}\] Inputs: [{"protocol":"foobar"}\]]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"hostname":"bad hostname"}\] Inputs: undefined]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"hostname":"bad#hostname"}\] Inputs: [{"hostname":"bad"}\]]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"hostname":"bad%hostname"}\] Inputs: undefined]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"hostname":"bad/hostname"}\] Inputs: [{"hostname":"bad"}\]]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"hostname":"bad\\\\:hostname"}\] Inputs: undefined]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"hostname":"bad<hostname"}\] Inputs: undefined]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"hostname":"bad>hostname"}\] Inputs: undefined]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"hostname":"bad?hostname"}\] Inputs: undefined]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"hostname":"bad@hostname"}\] Inputs: undefined]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"hostname":"bad[hostname"}\] Inputs: undefined]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"hostname":"bad\]hostname"}\] Inputs: undefined]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"hostname":"bad\\\\\\\\hostname"}\] Inputs: [{"hostname":"badhostname"}\]]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"hostname":"bad^hostname"}\] Inputs: undefined]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"hostname":"bad|hostname"}\] Inputs: undefined]
|
||||
expected: FAIL
|
||||
|
||||
[Pattern: [{"hostname":"bad\\nhostname"}\] Inputs: [{"hostname":"badhostname"}\]]
|
||||
expected: FAIL
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue