gecko/toolkit/components/microformats/tests/test_Microformats_adr.html

45 lines
1.2 KiB
HTML

<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() {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
Components.utils.import("resource://gre/modules/Microformats.js");
ok(Microformats, "Check global access to Microformats");
};
function test_adr() {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
Components.utils.import("resource://gre/modules/Microformats.js");
var address;
address = new adr(document.getElementById("01-extended-address"));
is(address.toString(), "Park Bench", "01-extended-address");
}
</script>
</pre>
</body>
</html>