Add invalid pattern exception when there is a dot between ] and hostname.

Add equivalent component test.

Bug: 823706
Change-Id: I4f4b549bde567ea70e25afae86704b45820b9acb
Reviewed-on: https://chromium-review.googlesource.com/c/1475189
Reviewed-by: Martin Šrámek <msramek@chromium.org>
Reviewed-by: Kamila Hasanbega <hkamila@google.com>
Reviewed-by: Balazs Engedy <engedy@chromium.org>
Commit-Queue: Pauline Anthonysamy <anthonysp@google.com>
Cr-Commit-Position: refs/heads/master@{#634763}
2 files changed