W3C home > Mailing lists > Public > public-dap-commits@w3.org > May 2011

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

From: Dominique Hazael-Massieux via cvs-syncmail <cvsmail@w3.org>
Date: Mon, 23 May 2011 15:11:42 +0000
To: public-dap-commits@w3.org
Message-Id: <E1QOWnG-0003Gd-Mr@lionel-hutz.w3.org>
Update of /sources/public/2009/dap/contacts/tests/test-cases
In directory hutz:/tmp/cvs-serv12545

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

--- NEW FILE: find_one_result.html ---
<!doctype html>
  <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>
   <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>
     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_contact_same_as(contacts[0], joeContact);
Received on Monday, 23 May 2011 15:11:44 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:52:29 UTC