Skip to content

Commit

Permalink
Implement various checks on the Location setters
Browse files Browse the repository at this point in the history
Implement various checks on the Location setters

Set correct referrer url before for href location setter

Update wpt-metadata for failing tests

Try updating tests/wpt/metadata/url/failure.html.ini
  • Loading branch information
utsavoza committed Apr 24, 2020
1 parent 412bc1c commit b10de77
Show file tree
Hide file tree
Showing 9 changed files with 239 additions and 215 deletions.
254 changes: 202 additions & 52 deletions components/script/dom/location.rs

Large diffs are not rendered by default.

This file was deleted.

@@ -1,3 +1,4 @@
[005.html]
type: testharness
expected: ERROR
[Link with onclick navigation and href navigation ]
expected: FAIL

This file was deleted.

This file was deleted.

@@ -1,29 +1,5 @@
[location-protocol-setter-non-broken.html]
type: testharness
[Set data URL frame location.protocol to gopher]
expected: FAIL

[Set HTTP URL frame location.protocol to gopher]
expected: FAIL

[Set HTTP URL frame location.protocol to data]
expected: FAIL

[Set HTTP URL frame location.protocol to x]
expected: FAIL

[Set HTTP URL frame location.protocol to http+x]
expected: FAIL

[Set HTTP URL frame location.protocol to ftp]
expected: FAIL

[Set data URL frame location.protocol to x]
expected: FAIL

[Set data URL frame location.protocol to data]
expected: FAIL

[Set data URL frame location.protocol to ftp]
expected: FAIL

Expand Down
@@ -1,35 +1,5 @@
[location-protocol-setter.html]
type: testharness
[%00 (percent-encoded) is not a scheme]
expected: FAIL

[%01 (percent-encoded) is not a scheme]
expected: FAIL

[%0A (percent-encoded) is not a scheme]
expected: FAIL

[%20 (percent-encoded) is not a scheme]
expected: FAIL

[! (percent-encoded) is not a scheme]
expected: FAIL

[%7F (percent-encoded) is not a scheme]
expected: FAIL

[%C2%80 (percent-encoded) is not a scheme]
expected: FAIL

[%C3%BF (percent-encoded) is not a scheme]
expected: FAIL

[: (percent-encoded) is not a scheme]
expected: FAIL

[%E2%80%A0 (percent-encoded) is not a scheme]
expected: FAIL

[%00x (percent-encoded) is not a scheme]
expected: FAIL

Expand All @@ -42,21 +12,6 @@
[%20x (percent-encoded) is not a scheme]
expected: FAIL

[!x (percent-encoded) is not a scheme]
expected: FAIL

[%7Fx (percent-encoded) is not a scheme]
expected: FAIL

[%C2%80x (percent-encoded) is not a scheme]
expected: FAIL

[%C3%BFx (percent-encoded) is not a scheme]
expected: FAIL

[:x (percent-encoded) is not a scheme]
expected: FAIL

[%EF%BF%BD%EF%BF%BD%EF%BF%BDx (percent-encoded) is not a scheme]
expected: FAIL

Expand All @@ -72,24 +27,6 @@
[%20X (percent-encoded) is not a scheme]
expected: FAIL

[!X (percent-encoded) is not a scheme]
expected: FAIL

[%7FX (percent-encoded) is not a scheme]
expected: FAIL

[%C2%80X (percent-encoded) is not a scheme]
expected: FAIL

[%C3%BFX (percent-encoded) is not a scheme]
expected: FAIL

[:X (percent-encoded) is not a scheme]
expected: FAIL

[%E2%80%A0X (percent-encoded) is not a scheme]
expected: FAIL

[x%00 (percent-encoded) is not a scheme]
expected: FAIL

Expand All @@ -102,21 +39,6 @@
[x%20 (percent-encoded) is not a scheme]
expected: FAIL

[x! (percent-encoded) is not a scheme]
expected: FAIL

[x%7F (percent-encoded) is not a scheme]
expected: FAIL

[x%C2%80 (percent-encoded) is not a scheme]
expected: FAIL

[x%C3%BF (percent-encoded) is not a scheme]
expected: FAIL

[x%E2%80%A0 (percent-encoded) is not a scheme]
expected: FAIL

[X%00 (percent-encoded) is not a scheme]
expected: FAIL

Expand All @@ -129,21 +51,6 @@
[X%20 (percent-encoded) is not a scheme]
expected: FAIL

[X! (percent-encoded) is not a scheme]
expected: FAIL

[X%7F (percent-encoded) is not a scheme]
expected: FAIL

[X%C2%80 (percent-encoded) is not a scheme]
expected: FAIL

[X%C3%BF (percent-encoded) is not a scheme]
expected: FAIL

[X%E2%80%A0 (percent-encoded) is not a scheme]
expected: FAIL

[a%0A (percent-encoded) is not a scheme]
expected: FAIL

Expand All @@ -153,6 +60,3 @@
[Equivalent tests for data URL and srcdoc <iframe>s]
expected: FAIL

[%E2%80%A0x (percent-encoded) is not a scheme]
expected: FAIL

@@ -1,34 +1,19 @@
[no-browsing-context.window.html]
[Invoking `assign` with `/` on a `Location` object sans browsing context is a no-op]
expected: FAIL

[Invoking `replace` with `/` on a `Location` object sans browsing context is a no-op]
[Setting `protocol` to `http` of a `Location` object sans browsing context is a no-op]
expected: FAIL

[Setting `hash` to `test` of a `Location` object sans browsing context is a no-op]
expected: FAIL

[Setting `href` to `test test` of a `Location` object sans browsing context is a no-op]
expected: FAIL

[Invoking `replace` with `http://test:test/` on a `Location` object sans browsing context is a no-op]
expected: FAIL

[Invoking `assign` with `test test` on a `Location` object sans browsing context is a no-op]
expected: FAIL

[Getting `ancestorOrigins` of a `Location` object sans browsing context should be [\]]
expected: FAIL

[Invoking `assign` with `http://test:test/` on a `Location` object sans browsing context is a no-op]
expected: FAIL

[Setting `href` to `/` of a `Location` object sans browsing context is a no-op]
expected: FAIL

[Setting `href` to `http://test:test/` of a `Location` object sans browsing context is a no-op]
expected: FAIL

[Invoking `replace` with `test test` on a `Location` object sans browsing context is a no-op]
expected: FAIL

33 changes: 33 additions & 0 deletions tests/wpt/metadata/url/failure.html.ini
Expand Up @@ -129,6 +129,39 @@
[Location's href: sc://te@s:t@/ should throw]
expected: FAIL

[Location's href: http:/:@/www.example.com should throw]
expected: FAIL
[Location's href: http:@/www.example.com should throw]
expected: FAIL

[Location's href: http:/@/www.example.com should throw]
expected: FAIL
[Location's href: http:a:b@/www.example.com should throw]
expected: FAIL

[Location's href: http:/a:b@/www.example.com should throw]
expected: FAIL
[Location's href: http::@/www.example.com should throw]
expected: FAIL

[Location's href: http:@:www.example.com should throw]
expected: FAIL
[Location's href: http:/@:www.example.com should throw]
expected: FAIL

[Location's href: a should throw]
expected: FAIL
[Location's href: a/ should throw]
expected: FAIL

[Location's href: a// should throw]
expected: FAIL
[window.open(): sc://te@s:t@/ should throw]
expected: FAIL
Expand Down

0 comments on commit b10de77

Please sign in to comment.