2009/dap/contacts/tests/test-cases find_one_result.html,NONE,1.1

Update of /sources/public/2009/dap/contacts/tests/test-cases
In directory hutz:/tmp/cvs-serv12545

Added Files:
	find_one_result.html 
Log Message:
test case that compare one result with one expected


--- NEW FILE: find_one_result.html ---
<!doctype html>
<html>
 <head>
  <title>Contacts API - Compare one result with expected result</title>
  <script src="../impl.js"></script>
  <script src="http://w3c-test.org/html/tests/resources/testharness.js"></script>
  <script src="http://w3c-test.org/html/tests/resources/testharnessreport.js"></script>
  <script src="common.js"></script>
 </head>
 <body>
   <p>This test assumes that the <a href="joe.vcf">contacts data for Joe Lambda</a> have been loaded in the underlying addressbook.</p>
   <p>Please select Joe Lambda when prompted.</p>
   <div id="log"></div>
   <script>
     var t = async_test("Joe Lambda properly returned", {timeout: 15000});
     var joeContact = {"id": "whatever",
	"displayName": "Joe Lambda",
	"name": { "familyName": "Lambda",
		  "formatted": "Joe Lambda",
		  "givenName": "Joe",
		  "honoricPrefix": null,
		  "honoricSuffix": null,
		  "middleName": null},
	"nickname": "Joe",
	"phoneNumbers": null,     
	"emails": null,
	"addresses": null, 
	"ims": null,
	"organizations": null,
	"revision": null, 
	"birthday": null,
	"gender": null,
	"note": null, 
	"photos": null,
        "categories": null, 
	"urls": null, 
	"timezone": null};

     navigator.contacts.find(["id", "displayName", "name", "nickname"], function (contacts) {
         t.step(function () {
           assert_is_contact(contacts[0]);
           assert_contact_same_as(contacts[0], joeContact);
           t.done();
         });
     });
  </script>
 </body>
</html>

Received on Monday, 23 May 2011 15:11:44 UTC