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

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

Issue 2897083002: [credentialsmanager] Remove redundant tests (Closed)
Patch Set: Update expectations files Created 3 years, 7 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: third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-basics.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-basics.html b/third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-basics.html
index ed5ba181c7b899c2c5a5b85bd34083d2df4622b3..678a18f56c0bab61114221510956ede41e3f8ba3 100644
--- a/third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-basics.html
+++ b/third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-basics.html
@@ -2,8 +2,48 @@
<title>Credential Manager: PasswordCredential basics.</title>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
-<script src="resources/interfaces.js"></script>
+<script src="/w3c/resources/WebIDLParser.js"></script>
+<script src="/w3c/resources/idlharness.js"></script>
+<script type="text/plain" id="tested">
+[Exposed=Window, SecureContext]
+interface Credential {
+ readonly attribute USVString id;
+ readonly attribute DOMString type;
+};
+
+dictionary CredentialData {
+ required USVString id;
+};
+
+[NoInterfaceObject, SecureContext]
+interface CredentialUserData {
+ readonly attribute USVString name;
+ readonly attribute USVString iconURL;
+};
+
+dictionary PasswordCredentialData : CredentialData {
+ USVString name;
+ USVString iconURL;
+ required USVString password;
+};
+
+[Constructor(HTMLFormElement form),
+ Constructor(PasswordCredentialData data),
+ Exposed=Window,
+ SecureContext]
+interface PasswordCredential : Credential {
+ readonly attribute USVString password;
+};
+PasswordCredential implements CredentialUserData;
+</script>
<script>
+var idl_array = new IdlArray();
+idl_array.add_idls(document.querySelector('#tested').textContent);
+idl_array.add_objects({
+ PasswordCredential: ['new PasswordCredential({ id: "id", password: "pencil" })']
+});
+idl_array.test();
Mike West 2017/05/29 12:10:38 Likewise.
mike3 2017/05/29 17:41:12 Done.
+
test(function() {
var credential = new PasswordCredential({
id: 'id',
@@ -12,13 +52,6 @@ test(function() {
iconURL: 'https://example.com/icon.png'
});
- verify_interface('PasswordCredential', credential, {
- id: 'string',
- name: 'string',
- iconURL: 'string',
- type: 'string'
- });
-
assert_equals(credential.id, 'id');
assert_equals(credential.name, 'name');
assert_equals(credential.iconURL, 'https://example.com/icon.png');

Powered by Google App Engine
This is Rietveld 408576698