- From: Dominique Hazael-Massieux via cvs-syncmail <cvsmail@w3.org>
- Date: Mon, 23 May 2011 21:18:20 +0000
- To: public-dap-commits@w3.org
Update of /sources/public/2009/dap/contacts/tests/test-cases In directory hutz:/tmp/cvs-serv963 Added Files: single_task_queue.html Log Message: test for pending op error --- NEW FILE: single_task_queue.html --- <!doctype html> <html> <head> <title>Contacts API - Single Task Queue</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> <div id="log"></div> <script> var t = async_test("Starting two find in a row triggers a pending operation error", {timeout: 15000}); navigator.contacts.find(["name.formatted"], success); navigator.contacts.find(["name.formatted"], success2, error); function success(contact) { setTimeout( function () { }, 5000); } function success2(contact) { t.step(function () { assert_unreached(); }); } function error(err) { t.step(function () { assert_equals(err.code, navigator.contacts.ContactError.PENDING_OPERATION_ERROR); }); t.done(); } </script> </body> </html>
Received on Monday, 23 May 2011 21:18:22 UTC