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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-basics.html

Issue 2897083002: [credentialsmanager] Remove redundant tests (Closed)
Patch Set: Remove redundant assertions Created 3 years, 6 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>Credential Manager: PasswordCredential basics.</title> 2 <title>Credential Manager: PasswordCredential 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="resources/interfaces.js"></script>
6 <script> 5 <script>
7 test(function() { 6 test(function() {
8 var credential = new PasswordCredential({ 7 var credential = new PasswordCredential({
9 id: 'id', 8 id: 'id',
10 password: 'pencil', 9 password: 'pencil',
11 name: 'name', 10 name: 'name',
12 iconURL: 'https://example.com/icon.png' 11 iconURL: 'https://example.com/icon.png'
13 }); 12 });
14 13
15 verify_interface('PasswordCredential', credential, {
16 id: 'string',
17 name: 'string',
18 iconURL: 'string',
19 type: 'string'
20 });
21
22 assert_equals(credential.id, 'id'); 14 assert_equals(credential.id, 'id');
23 assert_equals(credential.name, 'name'); 15 assert_equals(credential.name, 'name');
24 assert_equals(credential.iconURL, 'https://example.com/icon.png'); 16 assert_equals(credential.iconURL, 'https://example.com/icon.png');
25 assert_equals(credential.type, 'password'); 17 assert_equals(credential.type, 'password');
26 assert_equals(credential.idName, 'username'); 18 assert_equals(credential.idName, 'username');
27 assert_equals(credential.passwordName, 'password'); 19 assert_equals(credential.passwordName, 'password');
28 assert_equals(credential.additionalData, null); 20 assert_equals(credential.additionalData, null);
29 assert_equals(credential.password, 'pencil'); 21 assert_equals(credential.password, 'pencil');
30 }, 'Interfaces and attributes of PasswordCredential'); 22 }, 'Interfaces and attributes of PasswordCredential');
31 23
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 + "<input type='text' name='thePassword' value='sekrit' autocomplete='cu rrent-password value1'>" 188 + "<input type='text' name='thePassword' value='sekrit' autocomplete='cu rrent-password value1'>"
197 + "<input type='text' name='theIcon' value='https://example.com/photo' a utocomplete='photo value2'>" 189 + "<input type='text' name='theIcon' value='https://example.com/photo' a utocomplete='photo value2'>"
198 + "<input type='text' name='theExtraField' value='extra'>" 190 + "<input type='text' name='theExtraField' value='extra'>"
199 + "<input type='text' name='theName' value='friendly name' autocomplete= 'name value3'>"; 191 + "<input type='text' name='theName' value='friendly name' autocomplete= 'name value3'>";
200 192
201 var credential = new PasswordCredential(f); 193 var credential = new PasswordCredential(f);
202 assert_true(credential.additionalData instanceof URLSearchParams); 194 assert_true(credential.additionalData instanceof URLSearchParams);
203 verify_form_credential(f, credential); 195 verify_form_credential(f, credential);
204 }, 'PasswordCredential creation from `HTMLFormElement` with multiple autocomplet e attributes'); 196 }, 'PasswordCredential creation from `HTMLFormElement` with multiple autocomplet e attributes');
205 </script> 197 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698