toolkit/components/microformats/tests/test_Microformats_adr.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 <html>
michael@0 2 <head>
michael@0 3 <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
michael@0 4 <title>Testing Microformats.js (adr)</title>
michael@0 5 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
michael@0 6 <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
michael@0 7 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"></link>
michael@0 8 </head>
michael@0 9 <body>
michael@0 10 <div id="content" style="display: none">
michael@0 11 <div class="adr" id="01-extended-address">
michael@0 12 <span class="extended-address">Park Bench</span>
michael@0 13 </div>
michael@0 14 </div>
michael@0 15 <pre id="test">
michael@0 16 <script class="testbody" type="text/javascript">
michael@0 17
michael@0 18 test_Microformats();
michael@0 19 test_adr();
michael@0 20
michael@0 21 function test_Microformats() {
michael@0 22 var Microformats = SpecialPowers.Cu.import("resource://gre/modules/Microformats.js").Microformats;
michael@0 23
michael@0 24 ok(Microformats, "Check global access to Microformats");
michael@0 25 };
michael@0 26
michael@0 27 function test_adr() {
michael@0 28 var adr = SpecialPowers.Cu.import("resource://gre/modules/Microformats.js").adr;
michael@0 29
michael@0 30 var address;
michael@0 31
michael@0 32 address = new adr(document.getElementById("01-extended-address"));
michael@0 33
michael@0 34 is(address.toString(), "Park Bench", "01-extended-address");
michael@0 35 }
michael@0 36
michael@0 37 </script>
michael@0 38 </pre>
michael@0 39 </body>
michael@0 40 </html>

mercurial