| |
| == Running test suite: URLUtilities |
| -- Running test case: parseURL |
| |
| Test Invalid: a |
| PASS: Should not be a complete URL |
| PASS: URL constructor thinks this is invalid |
| |
| Test Invalid: /http://example.com |
| PASS: Should not be a complete URL |
| PASS: URL constructor thinks this is invalid |
| |
| Test Valid: http://example.com |
| PASS: scheme should be: 'http' |
| PASS: userinfo should be: 'null' |
| PASS: host should be: 'example.com' |
| PASS: port should be: 'null' |
| PASS: path should be: 'null' |
| PASS: queryString should be: 'null' |
| PASS: fragment should be: 'null' |
| PASS: lastPathComponent should be: 'null' |
| |
| Test Valid: http://example.com/ |
| PASS: scheme should be: 'http' |
| PASS: userinfo should be: 'null' |
| PASS: host should be: 'example.com' |
| PASS: port should be: 'null' |
| PASS: path should be: '/' |
| PASS: queryString should be: 'null' |
| PASS: fragment should be: 'null' |
| PASS: lastPathComponent should be: 'null' |
| |
| Test Valid: http://example.com:80/ |
| PASS: scheme should be: 'http' |
| PASS: userinfo should be: 'null' |
| PASS: host should be: 'example.com' |
| PASS: port should be: '80' |
| PASS: path should be: '/' |
| PASS: queryString should be: 'null' |
| PASS: fragment should be: 'null' |
| PASS: lastPathComponent should be: 'null' |
| |
| Test Valid: http://example.com/path/to/page.html |
| PASS: scheme should be: 'http' |
| PASS: userinfo should be: 'null' |
| PASS: host should be: 'example.com' |
| PASS: port should be: 'null' |
| PASS: path should be: '/path/to/page.html' |
| PASS: queryString should be: 'null' |
| PASS: fragment should be: 'null' |
| PASS: lastPathComponent should be: 'page.html' |
| |
| Test Valid: http://example.com/path/to/page.html? |
| PASS: scheme should be: 'http' |
| PASS: userinfo should be: 'null' |
| PASS: host should be: 'example.com' |
| PASS: port should be: 'null' |
| PASS: path should be: '/path/to/page.html' |
| PASS: queryString should be: '' |
| PASS: fragment should be: 'null' |
| PASS: lastPathComponent should be: 'page.html' |
| |
| Test Valid: http://example.com/path/to/page.html?a=1 |
| PASS: scheme should be: 'http' |
| PASS: userinfo should be: 'null' |
| PASS: host should be: 'example.com' |
| PASS: port should be: 'null' |
| PASS: path should be: '/path/to/page.html' |
| PASS: queryString should be: 'a=1' |
| PASS: fragment should be: 'null' |
| PASS: lastPathComponent should be: 'page.html' |
| |
| Test Valid: http://example.com/path/to/page.html?a=1&b=2 |
| PASS: scheme should be: 'http' |
| PASS: userinfo should be: 'null' |
| PASS: host should be: 'example.com' |
| PASS: port should be: 'null' |
| PASS: path should be: '/path/to/page.html' |
| PASS: queryString should be: 'a=1&b=2' |
| PASS: fragment should be: 'null' |
| PASS: lastPathComponent should be: 'page.html' |
| |
| Test Valid: http://example.com/path/to/page.html?a=1&b=2#test |
| PASS: scheme should be: 'http' |
| PASS: userinfo should be: 'null' |
| PASS: host should be: 'example.com' |
| PASS: port should be: 'null' |
| PASS: path should be: '/path/to/page.html' |
| PASS: queryString should be: 'a=1&b=2' |
| PASS: fragment should be: 'test' |
| PASS: lastPathComponent should be: 'page.html' |
| |
| Test Valid: http://example.com:123/path/to/page.html?a=1&b=2#test |
| PASS: scheme should be: 'http' |
| PASS: userinfo should be: 'null' |
| PASS: host should be: 'example.com' |
| PASS: port should be: '123' |
| PASS: path should be: '/path/to/page.html' |
| PASS: queryString should be: 'a=1&b=2' |
| PASS: fragment should be: 'test' |
| PASS: lastPathComponent should be: 'page.html' |
| |
| Test Valid: http://example.com/path/to/page.html#test |
| PASS: scheme should be: 'http' |
| PASS: userinfo should be: 'null' |
| PASS: host should be: 'example.com' |
| PASS: port should be: 'null' |
| PASS: path should be: '/path/to/page.html' |
| PASS: queryString should be: 'null' |
| PASS: fragment should be: 'test' |
| PASS: lastPathComponent should be: 'page.html' |
| |
| Test Valid: http://example.com#alpha/beta |
| PASS: scheme should be: 'http' |
| PASS: userinfo should be: 'null' |
| PASS: host should be: 'example.com' |
| PASS: port should be: 'null' |
| PASS: path should be: 'null' |
| PASS: queryString should be: 'null' |
| PASS: fragment should be: 'alpha/beta' |
| PASS: lastPathComponent should be: 'null' |
| |
| Test Valid: app-specific://example.com |
| PASS: scheme should be: 'app-specific' |
| PASS: userinfo should be: 'null' |
| PASS: host should be: 'example.com' |
| PASS: port should be: 'null' |
| PASS: path should be: 'null' |
| PASS: queryString should be: 'null' |
| PASS: fragment should be: 'null' |
| PASS: lastPathComponent should be: 'null' |
| |
| Test Valid: http://example |
| PASS: scheme should be: 'http' |
| PASS: userinfo should be: 'null' |
| PASS: host should be: 'example' |
| PASS: port should be: 'null' |
| PASS: path should be: 'null' |
| PASS: queryString should be: 'null' |
| PASS: fragment should be: 'null' |
| PASS: lastPathComponent should be: 'null' |
| |
| Test Valid: http://my.example.com |
| PASS: scheme should be: 'http' |
| PASS: userinfo should be: 'null' |
| PASS: host should be: 'my.example.com' |
| PASS: port should be: 'null' |
| PASS: path should be: 'null' |
| PASS: queryString should be: 'null' |
| PASS: fragment should be: 'null' |
| PASS: lastPathComponent should be: 'null' |
| |
| Test Valid: data:text/plain,test |
| PASS: scheme should be: 'data' |
| PASS: userinfo should be: 'null' |
| PASS: host should be: 'null' |
| PASS: port should be: 'null' |
| PASS: path should be: 'null' |
| PASS: queryString should be: 'null' |
| PASS: fragment should be: 'null' |
| PASS: lastPathComponent should be: 'null' |
| |
| -- Known issues <https://webkit.org/b/165155> |
| |
| Test Invalid: http:// |
| FAIL: Should not be a complete URL |
| Expected: truthy |
| Actual: false |
| PASS: URL constructor thinks this is invalid |
| |
| Test Invalid: http://example.com:999999999 |
| FAIL: Should not be a complete URL |
| Expected: truthy |
| Actual: false |
| PASS: URL constructor thinks this is invalid |
| |
| Test Valid: http:example.com/ |
| FAIL: scheme should be: 'http' |
| Expected: "http" |
| Actual: null |
| PASS: userinfo should be: 'null' |
| FAIL: host should be: 'example.com' |
| Expected: "example.com" |
| Actual: null |
| PASS: port should be: 'null' |
| FAIL: path should be: '/' |
| Expected: "/" |
| Actual: null |
| PASS: queryString should be: 'null' |
| PASS: fragment should be: 'null' |
| PASS: lastPathComponent should be: 'null' |
| |
| Test Valid: http:/example.com/ |
| FAIL: scheme should be: 'http' |
| Expected: "http" |
| Actual: null |
| PASS: userinfo should be: 'null' |
| FAIL: host should be: 'example.com' |
| Expected: "example.com" |
| Actual: null |
| PASS: port should be: 'null' |
| FAIL: path should be: '/' |
| Expected: "/" |
| Actual: null |
| PASS: queryString should be: 'null' |
| PASS: fragment should be: 'null' |
| PASS: lastPathComponent should be: 'null' |
| |
| Test Valid: http://user:pass@example.com/ |
| PASS: scheme should be: 'http' |
| PASS: userinfo should be: 'user:pass' |
| PASS: host should be: 'example.com' |
| PASS: port should be: 'null' |
| PASS: path should be: '/' |
| PASS: queryString should be: 'null' |
| PASS: fragment should be: 'null' |
| PASS: lastPathComponent should be: 'null' |
| |
| Test Valid: http://user@pass:example.com/ |
| FAIL: scheme should be: 'http' |
| Expected: "http" |
| Actual: null |
| PASS: userinfo should be: 'null' |
| FAIL: host should be: 'example.com' |
| Expected: "example.com" |
| Actual: null |
| PASS: port should be: 'null' |
| FAIL: path should be: '/' |
| Expected: "/" |
| Actual: null |
| PASS: queryString should be: 'null' |
| PASS: fragment should be: 'null' |
| PASS: lastPathComponent should be: 'null' |
| |
| Test Valid: http://example.com?key=alpha/beta |
| PASS: scheme should be: 'http' |
| PASS: userinfo should be: 'null' |
| FAIL: host should be: 'example.com' |
| Expected: "example.com" |
| Actual: "example.com?key=alpha" |
| PASS: port should be: 'null' |
| FAIL: path should be: 'null' |
| Expected: null |
| Actual: "/beta" |
| FAIL: queryString should be: 'key=alpha/beta' |
| Expected: "key=alpha/beta" |
| Actual: null |
| PASS: fragment should be: 'null' |
| FAIL: lastPathComponent should be: 'null' |
| Expected: null |
| Actual: "beta" |
| |
| -- Running test case: parseDataURL |
| |
| Test Invalid: https://webkit.org |
| PASS: Should not be a data URL |
| |
| Test Invalid: data: |
| PASS: Should not be a data URL |
| |
| Test Invalid: data:text/plain;test |
| PASS: Should not be a data URL |
| |
| Test Invalid: data:text/plain;base64;test |
| PASS: Should not be a data URL |
| |
| Test Valid: data:, |
| PASS: scheme should always be 'data' |
| PASS: mimeType should be: 'text/plain' |
| PASS: charset should be: 'US-ASCII' |
| PASS: base64 should be: 'false' |
| PASS: data should be: '' |
| PASS: Resolved content should be: '' |
| |
| Test Valid: data:,test |
| PASS: scheme should always be 'data' |
| PASS: mimeType should be: 'text/plain' |
| PASS: charset should be: 'US-ASCII' |
| PASS: base64 should be: 'false' |
| PASS: data should be: 'test' |
| PASS: Resolved content should be: 'test' |
| |
| Test Valid: data:text/plain,test |
| PASS: scheme should always be 'data' |
| PASS: mimeType should be: 'text/plain' |
| PASS: charset should be: 'US-ASCII' |
| PASS: base64 should be: 'false' |
| PASS: data should be: 'test' |
| PASS: Resolved content should be: 'test' |
| |
| Test Valid: data:text/plain;charset=TEST,test |
| PASS: scheme should always be 'data' |
| PASS: mimeType should be: 'text/plain' |
| PASS: charset should be: 'TEST' |
| PASS: base64 should be: 'false' |
| PASS: data should be: 'test' |
| PASS: Resolved content should be: 'test' |
| |
| Test Valid: data:application/json,{"name":"test","list":[1,2,3]} |
| PASS: scheme should always be 'data' |
| PASS: mimeType should be: 'application/json' |
| PASS: charset should be: 'US-ASCII' |
| PASS: base64 should be: 'false' |
| PASS: data should be: '{"name":"test","list":[1,2,3]}' |
| PASS: Resolved content should be: '{"name":"test","list":[1,2,3]}' |
| |
| Test Valid: data:application/json,%7B%22name%22%3A%22test%22%2C%22list%22%3A%5B1%2C2%2C3%5D%7D |
| PASS: scheme should always be 'data' |
| PASS: mimeType should be: 'application/json' |
| PASS: charset should be: 'US-ASCII' |
| PASS: base64 should be: 'false' |
| PASS: data should be: '{"name":"test","list":[1,2,3]}' |
| PASS: Resolved content should be: '{"name":"test","list":[1,2,3]}' |
| |
| Test Valid: data:application/json;base64,eyJuYW1lIjoidGVzdCIsImxpc3QiOlsxLDIsM119 |
| PASS: scheme should always be 'data' |
| PASS: mimeType should be: 'application/json' |
| PASS: charset should be: 'US-ASCII' |
| PASS: base64 should be: 'true' |
| PASS: data should be: 'eyJuYW1lIjoidGVzdCIsImxpc3QiOlsxLDIsM119' |
| PASS: Resolved content should be: '{"name":"test","list":[1,2,3]}' |
| |
| Test Valid: data:application/json;charset=utf-8;base64,eyJuYW1lIjoidGVzdCIsImxpc3QiOlsxLDIsM119 |
| PASS: scheme should always be 'data' |
| PASS: mimeType should be: 'application/json' |
| PASS: charset should be: 'utf-8' |
| PASS: base64 should be: 'true' |
| PASS: data should be: 'eyJuYW1lIjoidGVzdCIsImxpc3QiOlsxLDIsM119' |
| PASS: Resolved content should be: '{"name":"test","list":[1,2,3]}' |
| |
| Test Valid: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg== |
| PASS: scheme should always be 'data' |
| PASS: mimeType should be: 'image/png' |
| PASS: charset should be: 'US-ASCII' |
| PASS: base64 should be: 'true' |
| PASS: data should be: 'iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==' |
| |
| -- Running test case: WI.h2Authority |
| PASS: HTTP/2 :authority of 'http://example.com' should be 'example.com'. |
| PASS: HTTP/2 :authority of 'https://example.com' should be 'example.com'. |
| PASS: HTTP/2 :authority of 'ftp://example.com' should be 'example.com'. |
| PASS: HTTP/2 :authority of 'http://example.com/foo' should be 'example.com'. |
| PASS: HTTP/2 :authority of 'https://example.com/foo' should be 'example.com'. |
| PASS: HTTP/2 :authority of 'ftp://example.com/foo' should be 'example.com'. |
| PASS: HTTP/2 :authority of 'http://example.com:123' should be 'example.com:123'. |
| PASS: HTTP/2 :authority of 'https://example.com:123' should be 'example.com:123'. |
| PASS: HTTP/2 :authority of 'ftp://example.com:123' should be 'example.com:123'. |
| PASS: HTTP/2 :authority of 'ftp://user:pass@example.com/foo' should be 'user:pass@example.com'. |
| PASS: HTTP/2 :authority of 'http://user:pass@example.com/foo' should be 'example.com'. |
| PASS: HTTP/2 :authority of 'https://user:pass@example.com/foo' should be 'example.com'. |
| PASS: HTTP/2 :authority of 'ftp://user:pass@example.com:123/foo' should be 'user:pass@example.com:123'. |
| PASS: HTTP/2 :authority of 'http://user:pass@example.com:123/foo' should be 'example.com:123'. |
| PASS: HTTP/2 :authority of 'https://user:pass@example.com:123/foo' should be 'example.com:123'. |
| |
| -- Running test case: WI.h2Path |
| PASS: HTTP/2 :path of 'http://example.com' should be '/'. |
| PASS: HTTP/2 :path of 'https://example.com' should be '/'. |
| PASS: HTTP/2 :path of 'ftp://example.com' should be ''. |
| PASS: HTTP/2 :path of 'http://example.com/foo' should be '/foo'. |
| PASS: HTTP/2 :path of 'https://example.com/foo' should be '/foo'. |
| PASS: HTTP/2 :path of 'ftp://example.com/foo' should be '/foo'. |
| PASS: HTTP/2 :path of 'http://example.com/foo#hash' should be '/foo'. |
| PASS: HTTP/2 :path of 'https://example.com/foo#hash' should be '/foo'. |
| PASS: HTTP/2 :path of 'ftp://example.com/foo#hash' should be '/foo'. |
| PASS: HTTP/2 :path of 'http://example.com/foo/bar.js' should be '/foo/bar.js'. |
| PASS: HTTP/2 :path of 'https://example.com/foo/bar.js' should be '/foo/bar.js'. |
| PASS: HTTP/2 :path of 'ftp://example.com/foo/bar.js' should be '/foo/bar.js'. |
| PASS: HTTP/2 :path of 'http://example.com/foo/bar.js#hash' should be '/foo/bar.js'. |
| PASS: HTTP/2 :path of 'https://example.com/foo/bar.js#hash' should be '/foo/bar.js'. |
| PASS: HTTP/2 :path of 'ftp://example.com/foo/bar.js#hash' should be '/foo/bar.js'. |
| PASS: HTTP/2 :path of 'http://example.com/?t=1' should be '/?t=1'. |
| PASS: HTTP/2 :path of 'https://example.com/?t=1' should be '/?t=1'. |
| PASS: HTTP/2 :path of 'ftp://example.com/?t=1' should be '/?t=1'. |
| PASS: HTTP/2 :path of 'http://example.com/foo/bar.js?t=1' should be '/foo/bar.js?t=1'. |
| PASS: HTTP/2 :path of 'https://example.com/foo/bar.js?t=1' should be '/foo/bar.js?t=1'. |
| PASS: HTTP/2 :path of 'ftp://example.com/foo/bar.js?t=1' should be '/foo/bar.js?t=1'. |
| PASS: HTTP/2 :path of 'http://example.com/foo/bar.js?t=1#hash' should be '/foo/bar.js?t=1'. |
| PASS: HTTP/2 :path of 'https://example.com/foo/bar.js?t=1#hash' should be '/foo/bar.js?t=1'. |
| PASS: HTTP/2 :path of 'ftp://example.com/foo/bar.js?t=1#hash' should be '/foo/bar.js?t=1'. |
| |