toolkit/components/microformats/tests/test_Microformats_adr.html
author Dave Townsend <dtownsend@oxymoronical.com>
Wed, 03 Feb 2016 17:27:36 -0800
changeset 283275 cb217f7271c24838782ff4f772af29a7ba9f53e8
parent 145463 45446ab0c72656eaa3afd505db47d94a686fa301
permissions -rw-r--r--
Bug 1245649: Turn on no-extra-semi. r=markh

<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>