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

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

Added Files:
	find_with_array_composed_field.html 
Log Message:
test with case of search filters in array of composed values


--- NEW FILE: find_with_array_composed_field.html ---
<!doctype html>
<html>
 <head>
  <title>Contacts API - Find within an array of composed fields</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("country 'U.S.A.' properly returned", {timeout: 15000});
     var joeContact = {"id": null,
	"displayName": null,
        "name": null,
	"nickname": null,
	"phoneNumbers": null,     
	"emails": null,
	"addresses": [
           {"formatted": null, "streetAddress": null, "locality": null, "region": null, "postalCode": null, "country": "U.S.A."}
        ],
	"ims": null,
	"organizations": null,
	"revision": null, 
	"birthday": null,
	"gender": null,
	"note": null, 
	"photos": null,
        "categories": null, 
	"urls": null, 
	"timezone": null};

     navigator.contacts.find(["addresses.country"], 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 16:57:19 UTC