Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Add test for #10270
Browse files Browse the repository at this point in the history
Test Plan:
N/A
  • Loading branch information
diracdeltas committed Aug 15, 2017
1 parent df1cf72 commit 7c4d55b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions js/muonTest.entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ const runTests = () => {
href: 'https://brave.com:333/test?abc=123&def#fff'
}, 'urlParseComplex')

assertEqual(urlParse('http://brave.com%60x.code-fu.org/'),
Object.assign(defaultParsedUrl, {
host: 'brave.com%60x.code-fu.org',
hostname: 'brave.com%60x.code-fu.org',
href: 'http://brave.com%60x.code-fu.org/',
origin: 'http://brave.com%60x.code-fu.org/'
}), 'urlParseIssue10270')

assertEqual(urlUtil.getOrigin('http://www.brave.com/foo'), 'http://www.brave.com', 'getOriginSimple')
assertEqual(urlUtil.getOrigin('file:///aaa'), 'file:///', 'getOriginFile')
assertEqual(urlUtil.getOrigin('http://brave.com:333/foo'), 'http://brave.com:333', 'getOriginWithPort')
Expand Down
1 change: 1 addition & 0 deletions test/misc-components/muonTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ describe('muon tests', function () {
yield this.app.client
.waitForTextValue('#urlParseSimple', 'success')
.waitForTextValue('#urlParseComplex', 'success')
.waitForTextValue('#urlParseIssue10270', 'success')
})
it('urlUtil.getOrigin', function * () {
yield this.app.client
Expand Down

0 comments on commit 7c4d55b

Please sign in to comment.