зеркало из https://github.com/mozilla/gecko-dev.git
41 строка
1.1 KiB
HTML
41 строка
1.1 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() {
|
|
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>
|