mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
46 lines
1.3 KiB
HTML
46 lines
1.3 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="/MochiKit/packed.js"></script>
|
|
<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>
|