Changeset 206165 in webkit


Ignore:
Timestamp:
Sep 20, 2016 1:01:08 PM (8 years ago)
Author:
achristensen@apple.com
Message:

Non-special URLs should have an opaque origin
https://bugs.webkit.org/show_bug.cgi?id=162254

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

  • web-platform-tests/url/a-element-expected.txt:
  • web-platform-tests/url/a-element-xhtml-expected.txt:
  • web-platform-tests/url/url-constructor-expected.txt:

Source/WebCore:

Covered by newly passing web platform tests.

  • page/SecurityOrigin.cpp:

(WebCore::shouldTreatAsUniqueOrigin):
According to https://url.spec.whatwg.org/#origin all URLs with non-special protocols
should have a unique SecurityOrigin whose serialization is "null".

LayoutTests:

  • http/tests/security/postMessage/invalid-origin-throws-exception-expected.txt:
  • http/tests/security/postMessage/invalid-origin-throws-exception.html:
Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r206161 r206165  
     12016-09-20  Alex Christensen  <achristensen@webkit.org>
     2
     3        Non-special URLs should have an opaque origin
     4        https://bugs.webkit.org/show_bug.cgi?id=162254
     5
     6        Reviewed by Sam Weinig.
     7
     8        * http/tests/security/postMessage/invalid-origin-throws-exception-expected.txt:
     9        * http/tests/security/postMessage/invalid-origin-throws-exception.html:
     10
    1112016-09-20  Javier Fernandez  <jfernandez@igalia.com>
    212
  • trunk/LayoutTests/http/tests/security/postMessage/invalid-origin-throws-exception-expected.txt

    r203333 r206165  
    1 CONSOLE MESSAGE: Unable to post message to asdf://. Recipient has origin http://localhost:8000.
    2 
    31window.location.href = http://127.0.0.1:8000/security/postMessage/invalid-origin-throws-exception.html
    42waiting...
     
    75Encountered exception SyntaxError (DOM Exception 12): The string did not match the expected pattern. while posting message to '/tmp/foo'.
    86Encountered exception SyntaxError (DOM Exception 12): The string did not match the expected pattern. while posting message to '//localhost'.
    9 Posted message to 'asdf:' without any exceptions.
     7Encountered exception SyntaxError (DOM Exception 12): The string did not match the expected pattern. while posting message to 'asdf:'.
    108Encountered exception SyntaxError (DOM Exception 12): The string did not match the expected pattern. while posting message to 'http:'.
    119Received message: data="Received message: data="done" origin="http://127.0.0.1:8000"" origin="http://localhost:8000"
  • trunk/LayoutTests/http/tests/security/postMessage/invalid-origin-throws-exception.html

    r120174 r206165  
    3030    tryPostMessage("//localhost");
    3131
    32     // URLs without an origin should fail without generating any errors.
     32    // URLs without an origin should fail with a syntax error.
    3333    tryPostMessage("asdf:");
    3434    tryPostMessage("http:");
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r206146 r206165  
     12016-09-20  Alex Christensen  <achristensen@webkit.org>
     2
     3        Non-special URLs should have an opaque origin
     4        https://bugs.webkit.org/show_bug.cgi?id=162254
     5
     6        Reviewed by Sam Weinig.
     7
     8        * web-platform-tests/url/a-element-expected.txt:
     9        * web-platform-tests/url/a-element-xhtml-expected.txt:
     10        * web-platform-tests/url/url-constructor-expected.txt:
     11
    1122016-09-20  Jer Noble  <jer.noble@apple.com>
    213
  • trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-expected.txt

    r204948 r206165  
    88> against <http://example.org/foo/bar>
    99PASS Parsing: < foo.com  > against <http://example.org/foo/bar>
    10 FAIL Parsing: <a:        foo.com> against <http://example.org/foo/bar> assert_equals: origin expected "null" but got "a://"
     10PASS Parsing: <a:        foo.com> against <http://example.org/foo/bar>
    1111PASS Parsing: <http://f:21/ b ? d # e > against <http://example.org/foo/bar>
    1212PASS Parsing: <http://f:/c> against <http://example.org/foo/bar>
     
    4949PASS Parsing: <http:\\foo.com\> against <http://example.org/foo/bar>
    5050PASS Parsing: <http:\\a\b:c\d@foo.com\> against <http://example.org/foo/bar>
    51 FAIL Parsing: <foo:/> against <http://example.org/foo/bar> assert_equals: origin expected "null" but got "foo://"
    52 FAIL Parsing: <foo:/bar.com/> against <http://example.org/foo/bar> assert_equals: origin expected "null" but got "foo://"
    53 FAIL Parsing: <foo://///////> against <http://example.org/foo/bar> assert_equals: origin expected "null" but got "foo://"
    54 FAIL Parsing: <foo://///////bar.com/> against <http://example.org/foo/bar> assert_equals: origin expected "null" but got "foo://"
    55 FAIL Parsing: <foo:////://///> against <http://example.org/foo/bar> assert_equals: origin expected "null" but got "foo://"
    56 FAIL Parsing: <c:/foo> against <http://example.org/foo/bar> assert_equals: origin expected "null" but got "c://"
     51PASS Parsing: <foo:/> against <http://example.org/foo/bar>
     52PASS Parsing: <foo:/bar.com/> against <http://example.org/foo/bar>
     53FAIL Parsing: <foo://///////> against <http://example.org/foo/bar> assert_equals: pathname expected "///////" but got "/////////"
     54FAIL Parsing: <foo://///////bar.com/> against <http://example.org/foo/bar> assert_equals: pathname expected "///////bar.com/" but got "/////////bar.com/"
     55FAIL Parsing: <foo:////://///> against <http://example.org/foo/bar> assert_equals: pathname expected "//://///" but got "////://///"
     56PASS Parsing: <c:/foo> against <http://example.org/foo/bar>
    5757PASS Parsing: <//foo/bar> against <http://example.org/foo/bar>
    5858PASS Parsing: <http://foo/path;a??e#f#g> against <http://example.org/foo/bar>
     
    7070PASS Parsing: <ftp:/example.com/> against <http://example.org/foo/bar>
    7171PASS Parsing: <https:/example.com/> against <http://example.org/foo/bar>
    72 FAIL Parsing: <madeupscheme:/example.com/> against <http://example.org/foo/bar> assert_equals: origin expected "null" but got "madeupscheme://"
     72PASS Parsing: <madeupscheme:/example.com/> against <http://example.org/foo/bar>
    7373PASS Parsing: <file:/example.com/> against <http://example.org/foo/bar>
    74 FAIL Parsing: <ftps:/example.com/> against <http://example.org/foo/bar> assert_equals: origin expected "null" but got "ftps://"
     74PASS Parsing: <ftps:/example.com/> against <http://example.org/foo/bar>
    7575PASS Parsing: <gopher:/example.com/> against <http://example.org/foo/bar>
    7676PASS Parsing: <ws:/example.com/> against <http://example.org/foo/bar>
     
    7878PASS Parsing: <data:/example.com/> against <http://example.org/foo/bar>
    7979PASS Parsing: <javascript:/example.com/> against <http://example.org/foo/bar>
    80 FAIL Parsing: <mailto:/example.com/> against <http://example.org/foo/bar> assert_equals: origin expected "null" but got "mailto://"
     80PASS Parsing: <mailto:/example.com/> against <http://example.org/foo/bar>
    8181PASS Parsing: <http:example.com/> against <http://example.org/foo/bar>
    8282PASS Parsing: <ftp:example.com/> against <http://example.org/foo/bar>
    8383PASS Parsing: <https:example.com/> against <http://example.org/foo/bar>
    84 FAIL Parsing: <madeupscheme:example.com/> against <http://example.org/foo/bar> assert_equals: origin expected "null" but got "madeupscheme://"
    85 FAIL Parsing: <ftps:example.com/> against <http://example.org/foo/bar> assert_equals: origin expected "null" but got "ftps://"
     84PASS Parsing: <madeupscheme:example.com/> against <http://example.org/foo/bar>
     85PASS Parsing: <ftps:example.com/> against <http://example.org/foo/bar>
    8686PASS Parsing: <gopher:example.com/> against <http://example.org/foo/bar>
    8787PASS Parsing: <ws:example.com/> against <http://example.org/foo/bar>
     
    8989PASS Parsing: <data:example.com/> against <http://example.org/foo/bar>
    9090PASS Parsing: <javascript:example.com/> against <http://example.org/foo/bar>
    91 FAIL Parsing: <mailto:example.com/> against <http://example.org/foo/bar> assert_equals: origin expected "null" but got "mailto://"
     91PASS Parsing: <mailto:example.com/> against <http://example.org/foo/bar>
    9292PASS Parsing: </a/b/c> against <http://example.org/foo/bar>
    9393PASS Parsing: </a/ /c> against <http://example.org/foo/bar>
     
    9696FAIL Parsing: <#β> against <http://example.org/foo/bar> assert_equals: href expected "http://example.org/foo/bar#β" but got "http://example.org/foo/bar#%CE%B2"
    9797PASS Parsing: <data:text/html,test#test> against <http://example.org/foo/bar>
    98 FAIL Parsing: <tel:1234567890> against <http://example.org/foo/bar> assert_equals: origin expected "null" but got "tel://"
     98PASS Parsing: <tel:1234567890> against <http://example.org/foo/bar>
    9999FAIL Parsing: <file:c:\foo\bar.html> against <file:///tmp/mock/path> assert_equals: href expected "file:///c:/foo/bar.html" but got "file:///tmp/mock/c:/foo/bar.html"
    100100FAIL Parsing: <  File:c|////foo\bar.html> against <file:///tmp/mock/path> assert_equals: href expected "file:///c:////foo/bar.html" but got "file:///tmp/mock/c|////foo/bar.html"
     
    165165PASS Parsing: <http://foo:80/> against <about:blank>
    166166PASS Parsing: <http://foo:81/> against <about:blank>
    167 FAIL Parsing: <httpa://foo:80/> against <about:blank> assert_equals: origin expected "null" but got "httpa://foo:80"
     167PASS Parsing: <httpa://foo:80/> against <about:blank>
    168168PASS Parsing: <http://foo:-80/> against <about:blank>
    169169PASS Parsing: <https://foo:443/> against <about:blank>
     
    184184PASS Parsing: <ftp:/example.com/> against <about:blank>
    185185PASS Parsing: <https:/example.com/> against <about:blank>
    186 FAIL Parsing: <madeupscheme:/example.com/> against <about:blank> assert_equals: origin expected "null" but got "madeupscheme://"
     186PASS Parsing: <madeupscheme:/example.com/> against <about:blank>
    187187PASS Parsing: <file:/example.com/> against <about:blank>
    188 FAIL Parsing: <ftps:/example.com/> against <about:blank> assert_equals: origin expected "null" but got "ftps://"
     188PASS Parsing: <ftps:/example.com/> against <about:blank>
    189189PASS Parsing: <gopher:/example.com/> against <about:blank>
    190190PASS Parsing: <ws:/example.com/> against <about:blank>
     
    192192PASS Parsing: <data:/example.com/> against <about:blank>
    193193PASS Parsing: <javascript:/example.com/> against <about:blank>
    194 FAIL Parsing: <mailto:/example.com/> against <about:blank> assert_equals: origin expected "null" but got "mailto://"
     194PASS Parsing: <mailto:/example.com/> against <about:blank>
    195195PASS Parsing: <http:example.com/> against <about:blank>
    196196PASS Parsing: <ftp:example.com/> against <about:blank>
    197197PASS Parsing: <https:example.com/> against <about:blank>
    198 FAIL Parsing: <madeupscheme:example.com/> against <about:blank> assert_equals: origin expected "null" but got "madeupscheme://"
    199 FAIL Parsing: <ftps:example.com/> against <about:blank> assert_equals: origin expected "null" but got "ftps://"
     198PASS Parsing: <madeupscheme:example.com/> against <about:blank>
     199PASS Parsing: <ftps:example.com/> against <about:blank>
    200200PASS Parsing: <gopher:example.com/> against <about:blank>
    201201PASS Parsing: <ws:example.com/> against <about:blank>
     
    203203PASS Parsing: <data:example.com/> against <about:blank>
    204204PASS Parsing: <javascript:example.com/> against <about:blank>
    205 FAIL Parsing: <mailto:example.com/> against <about:blank> assert_equals: origin expected "null" but got "mailto://"
     205PASS Parsing: <mailto:example.com/> against <about:blank>
    206206PASS Parsing: <http:@www.example.com> against <about:blank>
    207207PASS Parsing: <http:/@www.example.com> against <about:blank>
     
    274274PASS Parsing: <http://[google.com]> against <http://other.com/>
    275275FAIL Parsing: <http://foo:💩@example.com/bar> against <http://other.com/> assert_equals: href expected "http://foo:%F0%9F%92%A9@example.com/bar" but got "http://foo:💩@example.com/bar"
    276 FAIL Parsing: <#> against <test:test> assert_equals: origin expected "null" but got "test://"
    277 FAIL Parsing: <#x> against <mailto:x@x.com> assert_equals: origin expected "null" but got "mailto://"
     276PASS Parsing: <#> against <test:test>
     277PASS Parsing: <#x> against <mailto:x@x.com>
    278278PASS Parsing: <#x> against <data:,>
    279279PASS Parsing: <#x> against <about:blank>
    280 FAIL Parsing: <#> against <test:test?test> assert_equals: origin expected "null" but got "test://"
     280PASS Parsing: <#> against <test:test?test>
    281281FAIL Parsing: <https://@test@test@example:800/> against <http://doesnotmatter/> assert_equals: href expected "https://%40test%40test@example:800/" but got "https://@test@test@example:800/"
    282282FAIL Parsing: <https://@@@example> against <http://doesnotmatter/> assert_equals: href expected "https://%40%40@example/" but got "https://@@@example"
     
    287287PASS Parsing: <i> against <sc:sd>
    288288PASS Parsing: <i> against <sc:sd/sd>
    289 FAIL Parsing: <i> against <sc:/pa/pa> assert_equals: origin expected "null" but got "sc://"
    290 FAIL Parsing: <i> against <sc://ho/pa> assert_equals: origin expected "null" but got "sc://ho"
    291 FAIL Parsing: <i> against <sc:///pa/pa> assert_equals: origin expected "null" but got "sc://"
     289PASS Parsing: <i> against <sc:/pa/pa>
     290PASS Parsing: <i> against <sc://ho/pa>
     291FAIL Parsing: <i> against <sc:///pa/pa> assert_equals: pathname expected "/pa/i" but got "///pa/i"
    292292PASS Parsing: <../i> against <sc:sd>
    293293PASS Parsing: <../i> against <sc:sd/sd>
    294 FAIL Parsing: <../i> against <sc:/pa/pa> assert_equals: origin expected "null" but got "sc://"
    295 FAIL Parsing: <../i> against <sc://ho/pa> assert_equals: origin expected "null" but got "sc://ho"
    296 FAIL Parsing: <../i> against <sc:///pa/pa> assert_equals: origin expected "null" but got "sc://"
     294PASS Parsing: <../i> against <sc:/pa/pa>
     295PASS Parsing: <../i> against <sc://ho/pa>
     296FAIL Parsing: <../i> against <sc:///pa/pa> assert_equals: pathname expected "/i" but got "///i"
    297297PASS Parsing: </i> against <sc:sd>
    298298PASS Parsing: </i> against <sc:sd/sd>
    299 FAIL Parsing: </i> against <sc:/pa/pa> assert_equals: origin expected "null" but got "sc://"
    300 FAIL Parsing: </i> against <sc://ho/pa> assert_equals: origin expected "null" but got "sc://ho"
     299PASS Parsing: </i> against <sc:/pa/pa>
     300PASS Parsing: </i> against <sc://ho/pa>
    301301FAIL Parsing: </i> against <sc:///pa/pa> assert_equals: href expected "sc:///i" but got "sc:/i"
    302302PASS Parsing: <?i> against <sc:sd>
    303303PASS Parsing: <?i> against <sc:sd/sd>
    304 FAIL Parsing: <?i> against <sc:/pa/pa> assert_equals: origin expected "null" but got "sc://"
    305 FAIL Parsing: <?i> against <sc://ho/pa> assert_equals: origin expected "null" but got "sc://ho"
    306 FAIL Parsing: <?i> against <sc:///pa/pa> assert_equals: origin expected "null" but got "sc://"
    307 FAIL Parsing: <#i> against <sc:sd> assert_equals: origin expected "null" but got "sc://"
    308 FAIL Parsing: <#i> against <sc:sd/sd> assert_equals: origin expected "null" but got "sc://"
    309 FAIL Parsing: <#i> against <sc:/pa/pa> assert_equals: origin expected "null" but got "sc://"
    310 FAIL Parsing: <#i> against <sc://ho/pa> assert_equals: origin expected "null" but got "sc://ho"
    311 FAIL Parsing: <#i> against <sc:///pa/pa> assert_equals: origin expected "null" but got "sc://"
     304PASS Parsing: <?i> against <sc:/pa/pa>
     305PASS Parsing: <?i> against <sc://ho/pa>
     306FAIL Parsing: <?i> against <sc:///pa/pa> assert_equals: pathname expected "/pa/pa" but got "///pa/pa"
     307PASS Parsing: <#i> against <sc:sd>
     308PASS Parsing: <#i> against <sc:sd/sd>
     309PASS Parsing: <#i> against <sc:/pa/pa>
     310PASS Parsing: <#i> against <sc://ho/pa>
     311FAIL Parsing: <#i> against <sc:///pa/pa> assert_equals: pathname expected "/pa/pa" but got "///pa/pa"
    312312PASS Parsing: <about:/../> against <about:blank>
    313313PASS Parsing: <data:/../> against <about:blank>
    314314PASS Parsing: <javascript:/../> against <about:blank>
    315 FAIL Parsing: <mailto:/../> against <about:blank> assert_equals: origin expected "null" but got "mailto://"
    316 FAIL Parsing: <sc://ñ.test/> against <about:blank> assert_equals: origin expected "null" but got "sc://xn--ida.test"
     315PASS Parsing: <mailto:/../> against <about:blank>
     316PASS Parsing: <sc://ñ.test/> against <about:blank>
    317317FAIL Parsing: <sc:\../> against <about:blank> assert_equals: href expected "sc:\\../" but got "sc:/"
    318 FAIL Parsing: <sc::a@example.net> against <about:blank> assert_equals: origin expected "null" but got "sc://"
     318PASS Parsing: <sc::a@example.net> against <about:blank>
    319319PASS Parsing: <http://127.0.0.1:10100/relative_import.html> against <about:blank>
    320320PASS Parsing: <http://facebook.com/?foo=%7B%22abc%22> against <about:blank>
     
    337337PASS Parsing: <http:> against <http://example.org/foo/bar>
    338338FAIL Parsing: <http:> against <https://example.org/foo/bar> assert_unreached: Expected URL to fail parsing Reached unreachable code
    339 FAIL Parsing: <sc:> against <https://example.org/foo/bar> assert_equals: origin expected "null" but got "sc://"
     339PASS Parsing: <sc:> against <https://example.org/foo/bar>
    340340
  • trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-xhtml-expected.txt

    r204948 r206165  
    88> against <http://example.org/foo/bar>
    99PASS Parsing: < foo.com  > against <http://example.org/foo/bar>
    10 FAIL Parsing: <a:        foo.com> against <http://example.org/foo/bar> assert_equals: origin expected "null" but got "a://"
     10PASS Parsing: <a:        foo.com> against <http://example.org/foo/bar>
    1111PASS Parsing: <http://f:21/ b ? d # e > against <http://example.org/foo/bar>
    1212PASS Parsing: <http://f:/c> against <http://example.org/foo/bar>
     
    4949PASS Parsing: <http:\\foo.com\> against <http://example.org/foo/bar>
    5050PASS Parsing: <http:\\a\b:c\d@foo.com\> against <http://example.org/foo/bar>
    51 FAIL Parsing: <foo:/> against <http://example.org/foo/bar> assert_equals: origin expected "null" but got "foo://"
    52 FAIL Parsing: <foo:/bar.com/> against <http://example.org/foo/bar> assert_equals: origin expected "null" but got "foo://"
    53 FAIL Parsing: <foo://///////> against <http://example.org/foo/bar> assert_equals: origin expected "null" but got "foo://"
    54 FAIL Parsing: <foo://///////bar.com/> against <http://example.org/foo/bar> assert_equals: origin expected "null" but got "foo://"
    55 FAIL Parsing: <foo:////://///> against <http://example.org/foo/bar> assert_equals: origin expected "null" but got "foo://"
    56 FAIL Parsing: <c:/foo> against <http://example.org/foo/bar> assert_equals: origin expected "null" but got "c://"
     51PASS Parsing: <foo:/> against <http://example.org/foo/bar>
     52PASS Parsing: <foo:/bar.com/> against <http://example.org/foo/bar>
     53FAIL Parsing: <foo://///////> against <http://example.org/foo/bar> assert_equals: pathname expected "///////" but got "/////////"
     54FAIL Parsing: <foo://///////bar.com/> against <http://example.org/foo/bar> assert_equals: pathname expected "///////bar.com/" but got "/////////bar.com/"
     55FAIL Parsing: <foo:////://///> against <http://example.org/foo/bar> assert_equals: pathname expected "//://///" but got "////://///"
     56PASS Parsing: <c:/foo> against <http://example.org/foo/bar>
    5757PASS Parsing: <//foo/bar> against <http://example.org/foo/bar>
    5858PASS Parsing: <http://foo/path;a??e#f#g> against <http://example.org/foo/bar>
     
    7070PASS Parsing: <ftp:/example.com/> against <http://example.org/foo/bar>
    7171PASS Parsing: <https:/example.com/> against <http://example.org/foo/bar>
    72 FAIL Parsing: <madeupscheme:/example.com/> against <http://example.org/foo/bar> assert_equals: origin expected "null" but got "madeupscheme://"
     72PASS Parsing: <madeupscheme:/example.com/> against <http://example.org/foo/bar>
    7373PASS Parsing: <file:/example.com/> against <http://example.org/foo/bar>
    74 FAIL Parsing: <ftps:/example.com/> against <http://example.org/foo/bar> assert_equals: origin expected "null" but got "ftps://"
     74PASS Parsing: <ftps:/example.com/> against <http://example.org/foo/bar>
    7575PASS Parsing: <gopher:/example.com/> against <http://example.org/foo/bar>
    7676PASS Parsing: <ws:/example.com/> against <http://example.org/foo/bar>
     
    7878PASS Parsing: <data:/example.com/> against <http://example.org/foo/bar>
    7979PASS Parsing: <javascript:/example.com/> against <http://example.org/foo/bar>
    80 FAIL Parsing: <mailto:/example.com/> against <http://example.org/foo/bar> assert_equals: origin expected "null" but got "mailto://"
     80PASS Parsing: <mailto:/example.com/> against <http://example.org/foo/bar>
    8181PASS Parsing: <http:example.com/> against <http://example.org/foo/bar>
    8282PASS Parsing: <ftp:example.com/> against <http://example.org/foo/bar>
    8383PASS Parsing: <https:example.com/> against <http://example.org/foo/bar>
    84 FAIL Parsing: <madeupscheme:example.com/> against <http://example.org/foo/bar> assert_equals: origin expected "null" but got "madeupscheme://"
    85 FAIL Parsing: <ftps:example.com/> against <http://example.org/foo/bar> assert_equals: origin expected "null" but got "ftps://"
     84PASS Parsing: <madeupscheme:example.com/> against <http://example.org/foo/bar>
     85PASS Parsing: <ftps:example.com/> against <http://example.org/foo/bar>
    8686PASS Parsing: <gopher:example.com/> against <http://example.org/foo/bar>
    8787PASS Parsing: <ws:example.com/> against <http://example.org/foo/bar>
     
    8989PASS Parsing: <data:example.com/> against <http://example.org/foo/bar>
    9090PASS Parsing: <javascript:example.com/> against <http://example.org/foo/bar>
    91 FAIL Parsing: <mailto:example.com/> against <http://example.org/foo/bar> assert_equals: origin expected "null" but got "mailto://"
     91PASS Parsing: <mailto:example.com/> against <http://example.org/foo/bar>
    9292PASS Parsing: </a/b/c> against <http://example.org/foo/bar>
    9393PASS Parsing: </a/ /c> against <http://example.org/foo/bar>
     
    9696FAIL Parsing: <#β> against <http://example.org/foo/bar> assert_equals: href expected "http://example.org/foo/bar#β" but got "http://example.org/foo/bar#%CE%B2"
    9797PASS Parsing: <data:text/html,test#test> against <http://example.org/foo/bar>
    98 FAIL Parsing: <tel:1234567890> against <http://example.org/foo/bar> assert_equals: origin expected "null" but got "tel://"
     98PASS Parsing: <tel:1234567890> against <http://example.org/foo/bar>
    9999FAIL Parsing: <file:c:\foo\bar.html> against <file:///tmp/mock/path> assert_equals: href expected "file:///c:/foo/bar.html" but got "file:///tmp/mock/c:/foo/bar.html"
    100100FAIL Parsing: <  File:c|////foo\bar.html> against <file:///tmp/mock/path> assert_equals: href expected "file:///c:////foo/bar.html" but got "file:///tmp/mock/c|////foo/bar.html"
     
    165165PASS Parsing: <http://foo:80/> against <about:blank>
    166166PASS Parsing: <http://foo:81/> against <about:blank>
    167 FAIL Parsing: <httpa://foo:80/> against <about:blank> assert_equals: origin expected "null" but got "httpa://foo:80"
     167PASS Parsing: <httpa://foo:80/> against <about:blank>
    168168PASS Parsing: <http://foo:-80/> against <about:blank>
    169169PASS Parsing: <https://foo:443/> against <about:blank>
     
    184184PASS Parsing: <ftp:/example.com/> against <about:blank>
    185185PASS Parsing: <https:/example.com/> against <about:blank>
    186 FAIL Parsing: <madeupscheme:/example.com/> against <about:blank> assert_equals: origin expected "null" but got "madeupscheme://"
     186PASS Parsing: <madeupscheme:/example.com/> against <about:blank>
    187187PASS Parsing: <file:/example.com/> against <about:blank>
    188 FAIL Parsing: <ftps:/example.com/> against <about:blank> assert_equals: origin expected "null" but got "ftps://"
     188PASS Parsing: <ftps:/example.com/> against <about:blank>
    189189PASS Parsing: <gopher:/example.com/> against <about:blank>
    190190PASS Parsing: <ws:/example.com/> against <about:blank>
     
    192192PASS Parsing: <data:/example.com/> against <about:blank>
    193193PASS Parsing: <javascript:/example.com/> against <about:blank>
    194 FAIL Parsing: <mailto:/example.com/> against <about:blank> assert_equals: origin expected "null" but got "mailto://"
     194PASS Parsing: <mailto:/example.com/> against <about:blank>
    195195PASS Parsing: <http:example.com/> against <about:blank>
    196196PASS Parsing: <ftp:example.com/> against <about:blank>
    197197PASS Parsing: <https:example.com/> against <about:blank>
    198 FAIL Parsing: <madeupscheme:example.com/> against <about:blank> assert_equals: origin expected "null" but got "madeupscheme://"
    199 FAIL Parsing: <ftps:example.com/> against <about:blank> assert_equals: origin expected "null" but got "ftps://"
     198PASS Parsing: <madeupscheme:example.com/> against <about:blank>
     199PASS Parsing: <ftps:example.com/> against <about:blank>
    200200PASS Parsing: <gopher:example.com/> against <about:blank>
    201201PASS Parsing: <ws:example.com/> against <about:blank>
     
    203203PASS Parsing: <data:example.com/> against <about:blank>
    204204PASS Parsing: <javascript:example.com/> against <about:blank>
    205 FAIL Parsing: <mailto:example.com/> against <about:blank> assert_equals: origin expected "null" but got "mailto://"
     205PASS Parsing: <mailto:example.com/> against <about:blank>
    206206PASS Parsing: <http:@www.example.com> against <about:blank>
    207207PASS Parsing: <http:/@www.example.com> against <about:blank>
     
    274274PASS Parsing: <http://[google.com]> against <http://other.com/>
    275275FAIL Parsing: <http://foo:💩@example.com/bar> against <http://other.com/> assert_equals: href expected "http://foo:%F0%9F%92%A9@example.com/bar" but got "http://foo:💩@example.com/bar"
    276 FAIL Parsing: <#> against <test:test> assert_equals: origin expected "null" but got "test://"
    277 FAIL Parsing: <#x> against <mailto:x@x.com> assert_equals: origin expected "null" but got "mailto://"
     276PASS Parsing: <#> against <test:test>
     277PASS Parsing: <#x> against <mailto:x@x.com>
    278278PASS Parsing: <#x> against <data:,>
    279279PASS Parsing: <#x> against <about:blank>
    280 FAIL Parsing: <#> against <test:test?test> assert_equals: origin expected "null" but got "test://"
     280PASS Parsing: <#> against <test:test?test>
    281281FAIL Parsing: <https://@test@test@example:800/> against <http://doesnotmatter/> assert_equals: href expected "https://%40test%40test@example:800/" but got "https://@test@test@example:800/"
    282282FAIL Parsing: <https://@@@example> against <http://doesnotmatter/> assert_equals: href expected "https://%40%40@example/" but got "https://@@@example"
     
    287287PASS Parsing: <i> against <sc:sd>
    288288PASS Parsing: <i> against <sc:sd/sd>
    289 FAIL Parsing: <i> against <sc:/pa/pa> assert_equals: origin expected "null" but got "sc://"
    290 FAIL Parsing: <i> against <sc://ho/pa> assert_equals: origin expected "null" but got "sc://ho"
    291 FAIL Parsing: <i> against <sc:///pa/pa> assert_equals: origin expected "null" but got "sc://"
     289PASS Parsing: <i> against <sc:/pa/pa>
     290PASS Parsing: <i> against <sc://ho/pa>
     291FAIL Parsing: <i> against <sc:///pa/pa> assert_equals: pathname expected "/pa/i" but got "///pa/i"
    292292PASS Parsing: <../i> against <sc:sd>
    293293PASS Parsing: <../i> against <sc:sd/sd>
    294 FAIL Parsing: <../i> against <sc:/pa/pa> assert_equals: origin expected "null" but got "sc://"
    295 FAIL Parsing: <../i> against <sc://ho/pa> assert_equals: origin expected "null" but got "sc://ho"
    296 FAIL Parsing: <../i> against <sc:///pa/pa> assert_equals: origin expected "null" but got "sc://"
     294PASS Parsing: <../i> against <sc:/pa/pa>
     295PASS Parsing: <../i> against <sc://ho/pa>
     296FAIL Parsing: <../i> against <sc:///pa/pa> assert_equals: pathname expected "/i" but got "///i"
    297297PASS Parsing: </i> against <sc:sd>
    298298PASS Parsing: </i> against <sc:sd/sd>
    299 FAIL Parsing: </i> against <sc:/pa/pa> assert_equals: origin expected "null" but got "sc://"
    300 FAIL Parsing: </i> against <sc://ho/pa> assert_equals: origin expected "null" but got "sc://ho"
     299PASS Parsing: </i> against <sc:/pa/pa>
     300PASS Parsing: </i> against <sc://ho/pa>
    301301FAIL Parsing: </i> against <sc:///pa/pa> assert_equals: href expected "sc:///i" but got "sc:/i"
    302302PASS Parsing: <?i> against <sc:sd>
    303303PASS Parsing: <?i> against <sc:sd/sd>
    304 FAIL Parsing: <?i> against <sc:/pa/pa> assert_equals: origin expected "null" but got "sc://"
    305 FAIL Parsing: <?i> against <sc://ho/pa> assert_equals: origin expected "null" but got "sc://ho"
    306 FAIL Parsing: <?i> against <sc:///pa/pa> assert_equals: origin expected "null" but got "sc://"
    307 FAIL Parsing: <#i> against <sc:sd> assert_equals: origin expected "null" but got "sc://"
    308 FAIL Parsing: <#i> against <sc:sd/sd> assert_equals: origin expected "null" but got "sc://"
    309 FAIL Parsing: <#i> against <sc:/pa/pa> assert_equals: origin expected "null" but got "sc://"
    310 FAIL Parsing: <#i> against <sc://ho/pa> assert_equals: origin expected "null" but got "sc://ho"
    311 FAIL Parsing: <#i> against <sc:///pa/pa> assert_equals: origin expected "null" but got "sc://"
     304PASS Parsing: <?i> against <sc:/pa/pa>
     305PASS Parsing: <?i> against <sc://ho/pa>
     306FAIL Parsing: <?i> against <sc:///pa/pa> assert_equals: pathname expected "/pa/pa" but got "///pa/pa"
     307PASS Parsing: <#i> against <sc:sd>
     308PASS Parsing: <#i> against <sc:sd/sd>
     309PASS Parsing: <#i> against <sc:/pa/pa>
     310PASS Parsing: <#i> against <sc://ho/pa>
     311FAIL Parsing: <#i> against <sc:///pa/pa> assert_equals: pathname expected "/pa/pa" but got "///pa/pa"
    312312PASS Parsing: <about:/../> against <about:blank>
    313313PASS Parsing: <data:/../> against <about:blank>
    314314PASS Parsing: <javascript:/../> against <about:blank>
    315 FAIL Parsing: <mailto:/../> against <about:blank> assert_equals: origin expected "null" but got "mailto://"
    316 FAIL Parsing: <sc://ñ.test/> against <about:blank> assert_equals: origin expected "null" but got "sc://xn--ida.test"
     315PASS Parsing: <mailto:/../> against <about:blank>
     316PASS Parsing: <sc://ñ.test/> against <about:blank>
    317317FAIL Parsing: <sc:\../> against <about:blank> assert_equals: href expected "sc:\\../" but got "sc:/"
    318 FAIL Parsing: <sc::a@example.net> against <about:blank> assert_equals: origin expected "null" but got "sc://"
     318PASS Parsing: <sc::a@example.net> against <about:blank>
    319319PASS Parsing: <http://127.0.0.1:10100/relative_import.html> against <about:blank>
    320320PASS Parsing: <http://facebook.com/?foo=%7B%22abc%22> against <about:blank>
     
    337337PASS Parsing: <http:> against <http://example.org/foo/bar>
    338338FAIL Parsing: <http:> against <https://example.org/foo/bar> assert_unreached: Expected URL to fail parsing Reached unreachable code
    339 FAIL Parsing: <sc:> against <https://example.org/foo/bar> assert_equals: origin expected "null" but got "sc://"
     339PASS Parsing: <sc:> against <https://example.org/foo/bar>
    340340
  • trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-constructor-expected.txt

    r205893 r206165  
    1212> against <http://example.org/foo/bar>
    1313PASS Parsing: < foo.com  > against <http://example.org/foo/bar>
    14 FAIL Parsing: <a:        foo.com> against <http://example.org/foo/bar> assert_equals: origin expected "null" but got "a://"
     14PASS Parsing: <a:        foo.com> against <http://example.org/foo/bar>
    1515PASS Parsing: <http://f:21/ b ? d # e > against <http://example.org/foo/bar>
    1616PASS Parsing: <http://f:/c> against <http://example.org/foo/bar>
     
    5454PASS Parsing: <http:\\foo.com\> against <http://example.org/foo/bar>
    5555PASS Parsing: <http:\\a\b:c\d@foo.com\> against <http://example.org/foo/bar>
    56 FAIL Parsing: <foo:/> against <http://example.org/foo/bar> assert_equals: origin expected "null" but got "foo://"
    57 FAIL Parsing: <foo:/bar.com/> against <http://example.org/foo/bar> assert_equals: origin expected "null" but got "foo://"
    58 FAIL Parsing: <foo://///////> against <http://example.org/foo/bar> assert_equals: origin expected "null" but got "foo://"
    59 FAIL Parsing: <foo://///////bar.com/> against <http://example.org/foo/bar> assert_equals: origin expected "null" but got "foo://"
    60 FAIL Parsing: <foo:////://///> against <http://example.org/foo/bar> assert_equals: origin expected "null" but got "foo://"
    61 FAIL Parsing: <c:/foo> against <http://example.org/foo/bar> assert_equals: origin expected "null" but got "c://"
     56PASS Parsing: <foo:/> against <http://example.org/foo/bar>
     57PASS Parsing: <foo:/bar.com/> against <http://example.org/foo/bar>
     58FAIL Parsing: <foo://///////> against <http://example.org/foo/bar> assert_equals: pathname expected "///////" but got "/////////"
     59FAIL Parsing: <foo://///////bar.com/> against <http://example.org/foo/bar> assert_equals: pathname expected "///////bar.com/" but got "/////////bar.com/"
     60FAIL Parsing: <foo:////://///> against <http://example.org/foo/bar> assert_equals: pathname expected "//://///" but got "////://///"
     61PASS Parsing: <c:/foo> against <http://example.org/foo/bar>
    6262PASS Parsing: <//foo/bar> against <http://example.org/foo/bar>
    6363PASS Parsing: <http://foo/path;a??e#f#g> against <http://example.org/foo/bar>
     
    7575PASS Parsing: <ftp:/example.com/> against <http://example.org/foo/bar>
    7676PASS Parsing: <https:/example.com/> against <http://example.org/foo/bar>
    77 FAIL Parsing: <madeupscheme:/example.com/> against <http://example.org/foo/bar> assert_equals: origin expected "null" but got "madeupscheme://"
     77PASS Parsing: <madeupscheme:/example.com/> against <http://example.org/foo/bar>
    7878PASS Parsing: <file:/example.com/> against <http://example.org/foo/bar>
    79 FAIL Parsing: <ftps:/example.com/> against <http://example.org/foo/bar> assert_equals: origin expected "null" but got "ftps://"
     79PASS Parsing: <ftps:/example.com/> against <http://example.org/foo/bar>
    8080PASS Parsing: <gopher:/example.com/> against <http://example.org/foo/bar>
    8181PASS Parsing: <ws:/example.com/> against <http://example.org/foo/bar>
     
    8383PASS Parsing: <data:/example.com/> against <http://example.org/foo/bar>
    8484PASS Parsing: <javascript:/example.com/> against <http://example.org/foo/bar>
    85 FAIL Parsing: <mailto:/example.com/> against <http://example.org/foo/bar> assert_equals: origin expected "null" but got "mailto://"
     85PASS Parsing: <mailto:/example.com/> against <http://example.org/foo/bar>
    8686PASS Parsing: <http:example.com/> against <http://example.org/foo/bar>
    8787PASS Parsing: <ftp:example.com/> against <http://example.org/foo/bar>
    8888PASS Parsing: <https:example.com/> against <http://example.org/foo/bar>
    89 FAIL Parsing: <madeupscheme:example.com/> against <http://example.org/foo/bar> assert_equals: origin expected "null" but got "madeupscheme://"
    90 FAIL Parsing: <ftps:example.com/> against <http://example.org/foo/bar> assert_equals: origin expected "null" but got "ftps://"
     89PASS Parsing: <madeupscheme:example.com/> against <http://example.org/foo/bar>
     90PASS Parsing: <ftps:example.com/> against <http://example.org/foo/bar>
    9191PASS Parsing: <gopher:example.com/> against <http://example.org/foo/bar>
    9292PASS Parsing: <ws:example.com/> against <http://example.org/foo/bar>
     
    9494PASS Parsing: <data:example.com/> against <http://example.org/foo/bar>
    9595PASS Parsing: <javascript:example.com/> against <http://example.org/foo/bar>
    96 FAIL Parsing: <mailto:example.com/> against <http://example.org/foo/bar> assert_equals: origin expected "null" but got "mailto://"
     96PASS Parsing: <mailto:example.com/> against <http://example.org/foo/bar>
    9797PASS Parsing: </a/b/c> against <http://example.org/foo/bar>
    9898PASS Parsing: </a/ /c> against <http://example.org/foo/bar>
     
    101101FAIL Parsing: <#β> against <http://example.org/foo/bar> assert_equals: href expected "http://example.org/foo/bar#β" but got "http://example.org/foo/bar#%CE%B2"
    102102PASS Parsing: <data:text/html,test#test> against <http://example.org/foo/bar>
    103 FAIL Parsing: <tel:1234567890> against <http://example.org/foo/bar> assert_equals: origin expected "null" but got "tel://"
     103PASS Parsing: <tel:1234567890> against <http://example.org/foo/bar>
    104104FAIL Parsing: <file:c:\foo\bar.html> against <file:///tmp/mock/path> assert_equals: href expected "file:///c:/foo/bar.html" but got "file:///tmp/mock/c:/foo/bar.html"
    105105FAIL Parsing: <  File:c|////foo\bar.html> against <file:///tmp/mock/path> assert_equals: href expected "file:///c:////foo/bar.html" but got "file:///tmp/mock/c|////foo/bar.html"
     
    170170PASS Parsing: <http://foo:80/> against <about:blank>
    171171PASS Parsing: <http://foo:81/> against <about:blank>
    172 FAIL Parsing: <httpa://foo:80/> against <about:blank> assert_equals: origin expected "null" but got "httpa://foo:80"
     172PASS Parsing: <httpa://foo:80/> against <about:blank>
    173173PASS Parsing: <http://foo:-80/> against <about:blank>
    174174PASS Parsing: <https://foo:443/> against <about:blank>
     
    189189PASS Parsing: <ftp:/example.com/> against <about:blank>
    190190PASS Parsing: <https:/example.com/> against <about:blank>
    191 FAIL Parsing: <madeupscheme:/example.com/> against <about:blank> assert_equals: origin expected "null" but got "madeupscheme://"
     191PASS Parsing: <madeupscheme:/example.com/> against <about:blank>
    192192PASS Parsing: <file:/example.com/> against <about:blank>
    193 FAIL Parsing: <ftps:/example.com/> against <about:blank> assert_equals: origin expected "null" but got "ftps://"
     193PASS Parsing: <ftps:/example.com/> against <about:blank>
    194194PASS Parsing: <gopher:/example.com/> against <about:blank>
    195195PASS Parsing: <ws:/example.com/> against <about:blank>
     
    197197PASS Parsing: <data:/example.com/> against <about:blank>
    198198PASS Parsing: <javascript:/example.com/> against <about:blank>
    199 FAIL Parsing: <mailto:/example.com/> against <about:blank> assert_equals: origin expected "null" but got "mailto://"
     199PASS Parsing: <mailto:/example.com/> against <about:blank>
    200200PASS Parsing: <http:example.com/> against <about:blank>
    201201PASS Parsing: <ftp:example.com/> against <about:blank>
    202202PASS Parsing: <https:example.com/> against <about:blank>
    203 FAIL Parsing: <madeupscheme:example.com/> against <about:blank> assert_equals: origin expected "null" but got "madeupscheme://"
    204 FAIL Parsing: <ftps:example.com/> against <about:blank> assert_equals: origin expected "null" but got "ftps://"
     203PASS Parsing: <madeupscheme:example.com/> against <about:blank>
     204PASS Parsing: <ftps:example.com/> against <about:blank>
    205205PASS Parsing: <gopher:example.com/> against <about:blank>
    206206PASS Parsing: <ws:example.com/> against <about:blank>
     
    208208PASS Parsing: <data:example.com/> against <about:blank>
    209209PASS Parsing: <javascript:example.com/> against <about:blank>
    210 FAIL Parsing: <mailto:example.com/> against <about:blank> assert_equals: origin expected "null" but got "mailto://"
     210PASS Parsing: <mailto:example.com/> against <about:blank>
    211211PASS Parsing: <http:@www.example.com> against <about:blank>
    212212PASS Parsing: <http:/@www.example.com> against <about:blank>
     
    291291PASS Parsing: <http://[google.com]> against <http://other.com/>
    292292FAIL Parsing: <http://foo:💩@example.com/bar> against <http://other.com/> Type error
    293 FAIL Parsing: <#> against <test:test> assert_equals: origin expected "null" but got "test://"
    294 FAIL Parsing: <#x> against <mailto:x@x.com> assert_equals: origin expected "null" but got "mailto://"
     293PASS Parsing: <#> against <test:test>
     294PASS Parsing: <#x> against <mailto:x@x.com>
    295295PASS Parsing: <#x> against <data:,>
    296296PASS Parsing: <#x> against <about:blank>
    297 FAIL Parsing: <#> against <test:test?test> assert_equals: origin expected "null" but got "test://"
     297PASS Parsing: <#> against <test:test?test>
    298298FAIL Parsing: <https://@test@test@example:800/> against <http://doesnotmatter/> Type error
    299299FAIL Parsing: <https://@@@example> against <http://doesnotmatter/> Type error
     
    304304PASS Parsing: <i> against <sc:sd>
    305305PASS Parsing: <i> against <sc:sd/sd>
    306 FAIL Parsing: <i> against <sc:/pa/pa> assert_equals: origin expected "null" but got "sc://"
    307 FAIL Parsing: <i> against <sc://ho/pa> assert_equals: origin expected "null" but got "sc://ho"
    308 FAIL Parsing: <i> against <sc:///pa/pa> assert_equals: origin expected "null" but got "sc://"
     306PASS Parsing: <i> against <sc:/pa/pa>
     307PASS Parsing: <i> against <sc://ho/pa>
     308FAIL Parsing: <i> against <sc:///pa/pa> assert_equals: pathname expected "/pa/i" but got "///pa/i"
    309309PASS Parsing: <../i> against <sc:sd>
    310310PASS Parsing: <../i> against <sc:sd/sd>
    311 FAIL Parsing: <../i> against <sc:/pa/pa> assert_equals: origin expected "null" but got "sc://"
    312 FAIL Parsing: <../i> against <sc://ho/pa> assert_equals: origin expected "null" but got "sc://ho"
    313 FAIL Parsing: <../i> against <sc:///pa/pa> assert_equals: origin expected "null" but got "sc://"
     311PASS Parsing: <../i> against <sc:/pa/pa>
     312PASS Parsing: <../i> against <sc://ho/pa>
     313FAIL Parsing: <../i> against <sc:///pa/pa> assert_equals: pathname expected "/i" but got "///i"
    314314PASS Parsing: </i> against <sc:sd>
    315315PASS Parsing: </i> against <sc:sd/sd>
    316 FAIL Parsing: </i> against <sc:/pa/pa> assert_equals: origin expected "null" but got "sc://"
    317 FAIL Parsing: </i> against <sc://ho/pa> assert_equals: origin expected "null" but got "sc://ho"
     316PASS Parsing: </i> against <sc:/pa/pa>
     317PASS Parsing: </i> against <sc://ho/pa>
    318318FAIL Parsing: </i> against <sc:///pa/pa> assert_equals: href expected "sc:///i" but got "sc:/i"
    319319PASS Parsing: <?i> against <sc:sd>
    320320PASS Parsing: <?i> against <sc:sd/sd>
    321 FAIL Parsing: <?i> against <sc:/pa/pa> assert_equals: origin expected "null" but got "sc://"
    322 FAIL Parsing: <?i> against <sc://ho/pa> assert_equals: origin expected "null" but got "sc://ho"
    323 FAIL Parsing: <?i> against <sc:///pa/pa> assert_equals: origin expected "null" but got "sc://"
    324 FAIL Parsing: <#i> against <sc:sd> assert_equals: origin expected "null" but got "sc://"
    325 FAIL Parsing: <#i> against <sc:sd/sd> assert_equals: origin expected "null" but got "sc://"
    326 FAIL Parsing: <#i> against <sc:/pa/pa> assert_equals: origin expected "null" but got "sc://"
    327 FAIL Parsing: <#i> against <sc://ho/pa> assert_equals: origin expected "null" but got "sc://ho"
    328 FAIL Parsing: <#i> against <sc:///pa/pa> assert_equals: origin expected "null" but got "sc://"
     321PASS Parsing: <?i> against <sc:/pa/pa>
     322PASS Parsing: <?i> against <sc://ho/pa>
     323FAIL Parsing: <?i> against <sc:///pa/pa> assert_equals: pathname expected "/pa/pa" but got "///pa/pa"
     324PASS Parsing: <#i> against <sc:sd>
     325PASS Parsing: <#i> against <sc:sd/sd>
     326PASS Parsing: <#i> against <sc:/pa/pa>
     327PASS Parsing: <#i> against <sc://ho/pa>
     328FAIL Parsing: <#i> against <sc:///pa/pa> assert_equals: pathname expected "/pa/pa" but got "///pa/pa"
    329329PASS Parsing: <about:/../> against <about:blank>
    330330PASS Parsing: <data:/../> against <about:blank>
    331331PASS Parsing: <javascript:/../> against <about:blank>
    332 FAIL Parsing: <mailto:/../> against <about:blank> assert_equals: origin expected "null" but got "mailto://"
    333 FAIL Parsing: <sc://ñ.test/> against <about:blank> assert_equals: origin expected "null" but got "sc://xn--ida.test"
     332PASS Parsing: <mailto:/../> against <about:blank>
     333PASS Parsing: <sc://ñ.test/> against <about:blank>
    334334FAIL Parsing: <sc:\../> against <about:blank> assert_equals: href expected "sc:\\../" but got "sc:/"
    335 FAIL Parsing: <sc::a@example.net> against <about:blank> assert_equals: origin expected "null" but got "sc://"
     335PASS Parsing: <sc::a@example.net> against <about:blank>
    336336PASS Parsing: <http://127.0.0.1:10100/relative_import.html> against <about:blank>
    337337PASS Parsing: <http://facebook.com/?foo=%7B%22abc%22> against <about:blank>
     
    355355FAIL Parsing: <http:> against <https://example.org/foo/bar> assert_throws: function "function () {
    356356          bURL(expected.input, expected.bas..." did not throw
    357 FAIL Parsing: <sc:> against <https://example.org/foo/bar> assert_equals: origin expected "null" but got "sc://"
     357PASS Parsing: <sc:> against <https://example.org/foo/bar>
    358358
  • trunk/Source/WebCore/ChangeLog

    r206163 r206165  
     12016-09-20  Alex Christensen  <achristensen@webkit.org>
     2
     3        Non-special URLs should have an opaque origin
     4        https://bugs.webkit.org/show_bug.cgi?id=162254
     5
     6        Reviewed by Sam Weinig.
     7
     8        Covered by newly passing web platform tests.
     9
     10        * page/SecurityOrigin.cpp:
     11        (WebCore::shouldTreatAsUniqueOrigin):
     12        According to https://url.spec.whatwg.org/#origin all URLs with non-special protocols
     13        should have a unique SecurityOrigin whose serialization is "null".
     14
    1152016-09-20  Christopher Reid  <Christopher.Reid@am.sony.com>
    216
  • trunk/Source/WebCore/page/SecurityOrigin.cpp

    r205405 r206165  
    5959    if (url.protocolIsBlob())
    6060        return true;
    61     UNUSED_PARAM(url);
    6261    return false;
    6362}
     
    10099
    101100    // This is the common case.
    102     return false;
     101    return !innerURL.protocolIsInHTTPFamily()
     102        && !innerURL.protocolIs("file")
     103        && !innerURL.protocolIs("ftp")
     104        && !innerURL.protocolIs("gopher")
     105        && !innerURL.protocolIs("ws")
     106        && !innerURL.protocolIs("wss");
    103107}
    104108
Note: See TracChangeset for help on using the changeset viewer.