Auto merge of #26410 - utsavoza:ugo/issue-26287/04-05-2020, r=ferjm

Update window.open() to return fallible result

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes partially fix #26287
- [x] There are tests for these changes
This commit is contained in:
bors-servo 2020-05-05 04:40:51 -04:00 committed by GitHub
commit 5e44327325
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 14 additions and 135 deletions

View file

@ -3,33 +3,12 @@
[Test URL parser failure consistency]
expected: FAIL
[window.open(): file://example:1/ should throw]
expected: FAIL
[window.open(): file://example:test/ should throw]
expected: FAIL
[window.open(): file://example%/ should throw]
expected: FAIL
[window.open(): file://[example\]/ should throw]
expected: FAIL
[window.open(): http://user:pass@/ should throw]
expected: FAIL
[window.open(): http://foo:-80/ should throw]
expected: FAIL
[XHR: http:/:@/www.example.com should throw]
expected: FAIL
[window.open(): http:/:@/www.example.com should throw]
expected: FAIL
[window.open(): http://user@/www.example.com should throw]
expected: FAIL
[XHR: http:@/www.example.com should throw]
expected: FAIL
@ -42,12 +21,6 @@
[window.open(): http:/@/www.example.com should throw]
expected: FAIL
[window.open(): http://@/www.example.com should throw]
expected: FAIL
[window.open(): https:@/www.example.com should throw]
expected: FAIL
[XHR: http:a:b@/www.example.com should throw]
expected: FAIL
@ -60,9 +33,6 @@
[window.open(): http:/a:b@/www.example.com should throw]
expected: FAIL
[window.open(): http://a:b@/www.example.com should throw]
expected: FAIL
[XHR: http::@/www.example.com should throw]
expected: FAIL
@ -81,27 +51,6 @@
[window.open(): http:/@:www.example.com should throw]
expected: FAIL
[window.open(): http://@:www.example.com should throw]
expected: FAIL
[window.open(): https://<2F> should throw]
expected: FAIL
[window.open(): https://%EF%BF%BD should throw]
expected: FAIL
[window.open(): https://x x:12 should throw]
expected: FAIL
[window.open(): http://[www.google.com\]/ should throw]
expected: FAIL
[window.open(): sc:/// should throw]
expected: FAIL
[window.open(): sc:// / should throw]
expected: FAIL
[URL's constructor's base argument: sc://@/ should throw]
expected: FAIL
@ -195,69 +144,6 @@
[window.open(): sc://:12/ should throw]
expected: FAIL
[window.open(): sc://[/ should throw]
expected: FAIL
[window.open(): sc://\\/ should throw]
expected: FAIL
[window.open(): sc://\]/ should throw]
expected: FAIL
[window.open(): sc://\x00/ should throw]
expected: FAIL
[window.open(): ftp://example.com%80/ should throw]
expected: FAIL
[window.open(): ftp://example.com%A0/ should throw]
expected: FAIL
[window.open(): https://example.com%80/ should throw]
expected: FAIL
[window.open(): https://example.com%A0/ should throw]
expected: FAIL
[window.open(): https://0x100000000/test should throw]
expected: FAIL
[window.open(): https://256.0.0.1/test should throw]
expected: FAIL
[window.open(): https://[0::0::0\] should throw]
expected: FAIL
[window.open(): https://[0:.0\] should throw]
expected: FAIL
[window.open(): https://[0:0:\] should throw]
expected: FAIL
[window.open(): https://[0:1:2:3:4:5:6:7.0.0.0.1\] should throw]
expected: FAIL
[window.open(): https://[0:1.00.0.0.0\] should throw]
expected: FAIL
[window.open(): https://[0:1.290.0.0.0\] should throw]
expected: FAIL
[window.open(): https://[0:1.23.23\] should throw]
expected: FAIL
[window.open(): http://? should throw]
expected: FAIL
[window.open(): http://# should throw]
expected: FAIL
[window.open(): non-special://[:80/ should throw]
expected: FAIL
[window.open(): http://[::127.0.0.0.1\] should throw]
expected: FAIL
[XHR: a should throw]
expected: FAIL
@ -276,6 +162,3 @@
[window.open(): a// should throw]
expected: FAIL
[window.open(): https://<2F> should throw]
expected: FAIL