Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Unified Diff: LayoutTests/http/tests/credentialmanager/localcredential-basics.html

Issue 464783003: Credential manager: Convert strings to URLs early. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/http/tests/credentialmanager/localcredential-basics.html
diff --git a/LayoutTests/http/tests/credentialmanager/localcredential-basics.html b/LayoutTests/http/tests/credentialmanager/localcredential-basics.html
index 38026638f32f69fef08fc2d5a8202213644c1c28..31675ab3c8447df2f800f06fc4c6f957411f13f2 100644
--- a/LayoutTests/http/tests/credentialmanager/localcredential-basics.html
+++ b/LayoutTests/http/tests/credentialmanager/localcredential-basics.html
@@ -19,4 +19,13 @@ test(function() {
assert_equals(credential.avatarURL, 'https://example.com/avatar.png');
assert_equals(credential.password, 'pencil');
}, 'Interfaces and attributes of LocalCredential');
+
+test(function() {
+ try {
+ var credential = new LocalCredential('id', 'name', '-', 'pencil');
+ assert_unreached("Creating a credential with an invalid URL should throw a SyntaxError.");
+ } catch (e) {
+ assert_equals(e.name, "SyntaxError");
+ }
+}, 'Invalid avatar URL throws.');
</script>

Powered by Google App Engine
This is Rietveld 408576698