Bug 213046

Summary: Improve url-setters.html WPT test
Product: WebKit Reporter: Rob Buis <rbuis>
Component: New BugsAssignee: Rob Buis <rbuis>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, changseok, darin, esprehn+autocc, ews-watchlist, gyuyoung.kim, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Rob Buis 2020-06-10 13:21:08 PDT
Improve url-setters.html WPT test by testing for failure that can occur
when setting host or hostname [1].

[1] https://url.spec.whatwg.org/#host-state
Comment 1 Rob Buis 2020-06-10 13:22:52 PDT
Created attachment 401575 [details]
Patch
Comment 2 Darin Adler 2020-06-10 14:53:01 PDT
Comment on attachment 401575 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=401575&action=review

> Source/WebCore/html/URLDecomposition.cpp:128
> +    if (fullURL.isValid())
> +        setFullURL(fullURL);

Can we put this check inside the setFullURL function? Does something fail if we do that?
Comment 3 Rob Buis 2020-06-11 00:20:40 PDT
Created attachment 401625 [details]
Patch
Comment 4 Rob Buis 2020-06-11 01:55:04 PDT
Created attachment 401628 [details]
Patch
Comment 5 EWS 2020-06-11 02:41:38 PDT
Committed r262900: <https://trac.webkit.org/changeset/262900>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 401628 [details].
Comment 6 Radar WebKit Bug Importer 2020-06-11 02:42:19 PDT
<rdar://problem/64247583>
Comment 7 Rob Buis 2020-06-11 05:45:53 PDT
Comment on attachment 401575 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=401575&action=review

>> Source/WebCore/html/URLDecomposition.cpp:128
>> +        setFullURL(fullURL);
> 
> Can we put this check inside the setFullURL function? Does something fail if we do that?

I tried, but it breaks one test. I propose we add these checks as needed.