dom/contacts/tests/test_contacts_events.html
author Peter Van der Beken <peterv@propagandism.org>
Fri, 24 Aug 2012 09:32:26 -0700
changeset 109357 dc3f29a730b10ace9129d2605c7a40822ee8121f
parent 101993 5a0a22492be2c5526c71ddefcf66942e7e82a058
child 117138 501dd2c7deea778eb89301940102cb1b30b48f01
permissions -rw-r--r--
Bug 753517 part 5. Enable the list IC for new DOM bindings too. r=bz.

<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=764667
-->
<head>
  <title>Test for Bug 678695</title>
  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=764667">Mozilla Bug 764667</a>
<p id="display"></p>
<div id="content" style="display: none">
  
</div>
<pre id="test">
<script type="application/javascript">

/** Test for Bug 764667 **/

var e = new MozContactChangeEvent("contactchanged", {contactID: "123", reason: "create"});
ok(e, "Should have contactsChange event!");
is(e.contactID, "123", "ID should be 123.");
is(e.reason, "create", "Reason should be create.");

e = new MozContactChangeEvent("contactchanged", {contactID: "test", reason: "test"});
is(e.contactID, "test", "Name should be 'test'.");
is(e.reason, "test", "Name should be 'test'.");

e = new MozContactChangeEvent("contactchanged", {contactID: "a", reason: ""});
is(e.contactID, "a", "Name should be a.");
is(e.reason, "", "Value should be empty");


</script>
</pre>
</body>
</html>