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

Side by Side 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: Feedback. 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>Credential Manager: LocalCredential basics.</title> 2 <title>Credential Manager: LocalCredential basics.</title>
3 <script src="../resources/testharness.js"></script> 3 <script src="../resources/testharness.js"></script>
4 <script src="../resources/testharnessreport.js"></script> 4 <script src="../resources/testharnessreport.js"></script>
5 <script src="/serviceworker/resources/interfaces.js"></script> 5 <script src="/serviceworker/resources/interfaces.js"></script>
6 <script> 6 <script>
7 test(function() { 7 test(function() {
8 var credential = new LocalCredential('id', 'name', 'https://example.com/avat ar.png', 'pencil'); 8 var credential = new LocalCredential('id', 'name', 'https://example.com/avat ar.png', 'pencil');
9 9
10 verifyInterface('LocalCredential', credential, { 10 verifyInterface('LocalCredential', credential, {
11 id: 'string', 11 id: 'string',
12 name: 'string', 12 name: 'string',
13 avatarURL: 'string', 13 avatarURL: 'string',
14 password: 'string' 14 password: 'string'
15 }); 15 });
16 16
17 assert_equals(credential.id, 'id'); 17 assert_equals(credential.id, 'id');
18 assert_equals(credential.name, 'name'); 18 assert_equals(credential.name, 'name');
19 assert_equals(credential.avatarURL, 'https://example.com/avatar.png'); 19 assert_equals(credential.avatarURL, 'https://example.com/avatar.png');
20 assert_equals(credential.password, 'pencil'); 20 assert_equals(credential.password, 'pencil');
21 }, 'Interfaces and attributes of LocalCredential'); 21 }, 'Interfaces and attributes of LocalCredential');
22
23 test(function() {
24 assert_throws(new SyntaxError(), function () {
25 var credential = new LocalCredential('id', 'name', '-', 'pencil');
26 });
27 }, 'Construct a LocalCredential with an invalid avatar URL.');
22 </script> 28 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698