toolkit/components/microformats/tests/test_Microformats_adr.html
author Phil Ringnalda <philringnalda@gmail.com>
Sat, 13 Sep 2014 09:59:06 -0700
changeset 205205 d070787de8f7b56e32bf5800b30f143c4d02d474
parent 145463 45446ab0c72656eaa3afd505db47d94a686fa301
child 283275 cb217f7271c24838782ff4f772af29a7ba9f53e8
permissions -rw-r--r--
Merge b-i to m-c

<html>
<head>
  <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
  <title>Testing Microformats.js (adr)</title>
  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
  <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"></link>
</head>
<body>
<div id="content" style="display: none">
  <div class="adr" id="01-extended-address">
    <span class="extended-address">Park Bench</span>
  </div>
</div>
<pre id="test">
<script class="testbody" type="text/javascript">

test_Microformats();
test_adr();

function test_Microformats() {
  var Microformats = SpecialPowers.Cu.import("resource://gre/modules/Microformats.js").Microformats;

  ok(Microformats, "Check global access to Microformats");
};

function test_adr() {
  var adr = SpecialPowers.Cu.import("resource://gre/modules/Microformats.js").adr;

  var address;

  address = new adr(document.getElementById("01-extended-address"));

  is(address.toString(), "Park Bench", "01-extended-address");
}

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