OLD | NEW |
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="/serviceworker/resources/interfaces.js"></script> | 5 <script src="resources/interfaces.js"></script> |
6 <script> | 6 <script> |
7 test(function() { | 7 test(function() { |
8 var credential = new PasswordCredential({ | 8 var credential = new PasswordCredential({ |
9 id: 'id', | 9 id: 'id', |
10 password: 'pencil', | 10 password: 'pencil', |
11 name: 'name', | 11 name: 'name', |
12 iconURL: 'https://example.com/icon.png' | 12 iconURL: 'https://example.com/icon.png' |
13 }); | 13 }); |
14 | 14 |
15 verify_interface('PasswordCredential', credential, { | 15 verify_interface('PasswordCredential', credential, { |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 + "<input type='text' name='thePassword' value='sekrit' autocomplete='cu
rrent-password value1'>" | 189 + "<input type='text' name='thePassword' value='sekrit' autocomplete='cu
rrent-password value1'>" |
190 + "<input type='text' name='theIcon' value='https://example.com/photo' a
utocomplete='photo value2'>" | 190 + "<input type='text' name='theIcon' value='https://example.com/photo' a
utocomplete='photo value2'>" |
191 + "<input type='text' name='theExtraField' value='extra'>" | 191 + "<input type='text' name='theExtraField' value='extra'>" |
192 + "<input type='text' name='theName' value='friendly name' autocomplete=
'name value3'>"; | 192 + "<input type='text' name='theName' value='friendly name' autocomplete=
'name value3'>"; |
193 | 193 |
194 var credential = new PasswordCredential(f); | 194 var credential = new PasswordCredential(f); |
195 assert_true(credential.additionalData instanceof URLSearchParams); | 195 assert_true(credential.additionalData instanceof URLSearchParams); |
196 verify_form_credential(f, credential); | 196 verify_form_credential(f, credential); |
197 }, 'PasswordCredential creation from `HTMLFormElement` with multiple autocomplet
e attributes'); | 197 }, 'PasswordCredential creation from `HTMLFormElement` with multiple autocomplet
e attributes'); |
198 </script> | 198 </script> |
OLD | NEW |