Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
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> |