New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃悰Check hostname for default domain #17911
Conversation
@@ -177,6 +179,43 @@ describe('Linker Manager', () => { | |||
}); | |||
}); | |||
|
|||
|
|||
it('should add linker with no defaultDomain and matching hostname', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with no defaultDomain
-> with default destinationDomains
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
|
||
return Promise.all(manager.allLinkerPromises_).then(() => { | ||
manager.handleAnchorMutation(a); | ||
return expect(a.href).to.not.equal('https://www.example.com'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
compare to the full URL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was trying to avoid testing the linker in the linker-manager, but I agree it is probably better. Done.
* check hostname * clean up rebase * tests
Before this change the linker was comparing against the full url instead of just the hostname.