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

1185 lines
63 KiB
HTML

<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>Testing Microformats.js (hCard)</title>
<script type="text/javascript" src="/MochiKit/MochiKit.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">
From http://microformats.org/tests/hcard/
<div class="vcard" id="01-tantek-basic">
<a class="url fn" href="http://tantek.com/">Tantek Çelik</a>
<div class="org">Technorati</div>
</div>
<div class="vcard" id="02-multiple-class-names-on-vcard.1"><span class="fn n"><span class="given-name">Ryan</span> <span class="family-name">King</span></span></div>
<p><span class="attendee vcard" id="02-multiple-class-names-on-vcard.2"><span class="fn n"><span class="given-name">Ryan</span> <span class="family-name">King</span></span></span></p>
<address class="vcard author" id="02-multiple-class-names-on-vcard.3"><span class="fn n"><span class="given-name">Ryan</span> <span class="family-name">King</span></span></address>
<ul><li class="reviewer vcard first" id="02-multiple-class-names-on-vcard.4"><span class="fn n"><span class="given-name">Ryan</span> <span class="family-name">King</span></span></li></ul>
<p class="vcard" id="03-implied-n.1">
<span class="fn">Ryan King</span>
</p>
<p class="vcard" id="03-implied-n.2">
<abbr class="fn" title="Ryan King">me</abbr>
</p>
<p class="vcard" id="03-implied-n.3">
<img src="/me.jpg" title="Brian Suda" alt="Ryan King" class="fn" />
</p>
<p class="vcard" id="03-implied-n.4">
<a class="fn" href="http://suda.co.uk/">Brian Suda</a>
</p>
<p class="vcard" id="03-implied-n.5">
<span class="fn">King, Ryan</span>
</p>
<p class="vcard" id="03-implied-n.6">
<span class="fn">King, R</span>
</p>
<p class="vcard" id="03-implied-n.7">
<span class="fn">King R</span>
</p>
<p class="vcard" id="03-implied-n.8">
<span class="fn">King R.</span>
</p>
<p class="vcard" id="03-implied-n.9">
<span class="fn">Jesse James Garrett</span>
</p>
<p class="vcard" id="03-implied-n.10">
<span class="fn">Thomas Vander Wal</span>
</p>
<p class="vcard" id="04-ignore-unknowns">
<span class="ignore-me">Some text that shouldn't be in the vCard.</span>
<span class="fn n">
<span class="given-name">Ryan</span> <span class="family-name">King</span>
</span>
</p>
<p class="ignore-me-too">Some more text that shouldn't be in the vCard.</p>
<p class="vcard" id="05-mailto-1">
<!-- fn should be the text node (with implied-n-optimization) and 'email' should be the href, sans scheme -->
<a class="fn email" href="mailto:ryan@technorati.com">Ryan King</a>
</p>
<p class="vcard" id="06-mailto-2">
<!-- ignore the parameters on the addr-spec -->
<a class="fn email" href="mailto:brian@example.com?subject=foo">Brian Suda</a>
</p>
<p class="vcard" id="07-relative-url">
<span class="fn n"><span class="given-name">John</span> <span class="family-name">Doe</span></span>
<a class="url" href="/home/blah">my website</a>
</p>
Tests 8/9/10 involve base tags and must each be self contained
<p class="vcard" id="11-multiple-urls">
<span class="fn n">
<span class="given-name">John</span> <span class="family-name">Doe</span></span>
<a class="url" href="http://example.com/foo">my website</a>
<a class="url" href="http://example.com/bar">my other website</a>
</p>
<p class="vcard" id="12-img-src-url">
<span class="fn n"><span class="given-name">John</span> <span class="family-name">Doe</span></span>
<!-- take the @src, ignore the @type -->
<img class="url" src="http://localhost:8888/tests/browser/microformats/test/picture.png" type="image/png" />
</p>
<p class="vcard" id="13-photo-logo">
<span class="fn n"><span class="given-name">John</span> <span class="family-name">Doe</span></span>
<!-- take the @src, ignore the @type -->
<img class="photo logo" src="http://localhost:8888/tests/browser/microformats/test/picture.png" type="image/png" />
</p>
<p class="vcard" id="14-img-src-data-url">
<span class="fn n"><span class="given-name">John</span> <span class="family-name">Doe</span></span>
<img class="photo logo" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAMAAAAp4XiDAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAASUExURf///8z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QABBmSxMjBj5EpcWgACCMoFOYYSpZyHQHgMIMACt2hmoVEikCQAAAABJRU5ErkJggg=="/>
</p>
<p class="vcard" id="15-honorific-additional-single">
<span class="fn n">
<span class="honorific-prefix">Mr.</span>
<span class="given-name">John</span>
<span class="additional-name">Maurice</span>
<span class="family-name">Doe</span>,
<span class="honorific-suffix">Ph.D.</span>
</span>
</p>
<p class="vcard" id="16-honorific-additional-multiple">
<span class="fn n">
<span class="honorific-prefix">Mr.</span>
<span class="honorific-prefix">Dr.</span>
<span class="given-name">John</span>
<span class="additional-name">Maurice</span>
<span class="additional-name">Benjamin</span>
<span class="family-name">Doe</span>
<span class="honorific-suffix">Ph.D.</span>,
<span class="honorific-suffix">J.D.</span>
</span>
</p>
<p class="vcard" id="17-email-not-uri">
<span class="fn">John Doe</span>
<span class="email">john@example.com</span>
</p>
<p class="vcard" id="18-object-data-http-uri">
<span class="fn">John Doe</span>
<object class="url photo logo" data="http://localhost:8888/tests/browser/microformats/test/picture.png" type="image/png"></object>
</p>
<p class="vcard" id="19-object-data-data-uri">
<span class="fn">John Doe</span>
<object class="photo logo" data="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAMAAAAp4XiDAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAASUExURf///8zMzJmZmWZmZjMzMwAAAPOPemkAAAM1SURBVHjaYmBgYGBkYQUBFkYWFiCPCchixQAMCCZAACF0MAMVM4K4TFh0IGsBCCAkOxhYmBnAAKaHhZkZmxaAAGJgYIbpYGBihGgBWsTMzMwE4jIhaWGAYoAAYmCECDExYAcwGxkg5oNIgABigDqLARdgZmGB2wICrKwAAcSA3xKgIxlZ0PwCEEAMBCxhgHoWSQtAADFAAxgfYEJ1GEAAQbQw4tUCsocBYQVAADEgu4uRkREeUCwszEwwLhOKLQABhNDCBA4aSDgwwhIAJKqYUPwCEEAMUK/AUwnc9aywJMCI7DAgAAggBohZ8JTBhGIJzCoWZL8ABBCYidAB8RUjWppkYUG2BSCAGMDqEMZiswUtXgACiAHsFYixTMywGGLGpgUWYgABxAA2mQkWCMyMqFoYmdD8ACQAAogBHJHMrCxg1cyIiICmCkYWDFsAAgiihYmZCewFFpR0BfI3LLch+QUggBiQ0iQjEyMDmh54qCBlUIAAYsCRJsElADQvgWKTlRGeKwECiAF3XgGmMEYQYADZzcoA9z5AAMG9RQCAtEC9DxBADFiyFyMjVi0wABBAWLQwQdIiuhYGWJIACCBg+KKUJ9BoBRdS2LQALQMIIGDQIEmwAO1kYcVWHCDZAhBAqFqYmOAxj2YNtAwDAYAAYmDEiBYWzHKKkRERYiwAAYSphZEZwxZGZiZQVEJTJkAAMTCyokc7M5oORlC5wcoEjxeAAAJqQXU0UB6W5WFmABMtEzMi1wEEEFAbE0YyAUuzMMEsYQalMkQSBQggUDmNPU3C9IA4LCxI+QUggEBiKOU8yExgqccCL3chnkPKlQABhGo6ejHBDKmdUHMlQAAhhQvQaGZGkBIkjcAMywLmI+VKgABCSowsTJhZkhlWXiBpAQggYBqBZl9GVOdBcz0LZqEEEEAMqLULMBLg1THWog9IAwQQA0qiZcRW5aPbAhBADCg1El4tMAAQQAxoiZYZXnTh1AIQQAzo2QlYpDDjcBgrxGEAAcSAJTthswmiBUwDBBC2GpkZJTaRvQ+mAQKIAUuuxdZWQvILQABBmSxMjBj5EpcWgACCMoFOYYSpZyHQHgMIMACt2hmoVEikCQAAAABJRU5ErkJggg==" />
</p>
<p class="vcard" id="20-image-alt">
<!-- only testing 'fn' here, but you should be able to parse any text value out of the img@alt -->
<!-- also note, the fn should only be used to infer n, when there's no explicit n in the hcard -->
<img class="fn photo logo" src="http://localhost:8888/tests/browser/microformats/test/picture.png" alt="John Doe" />
</p>
<div class="vcard" id="21-tel">
<p class="fn">John Doe</p>v
<p class="tel">+1.415.555.1231</p>
<p class="tel">
<span class="type">home</span>
<span class="value">+1 415 555 1232</span>
</p>
<div class="tel">
types:
<ul>
<li class="type">msg</li>
<li class="type">home</li>
<li class="type">work</li>
<li class="type">pref</li>
<li class="type">voice</li>
<li class="type">fax</li>
<li class="type">cell</li>
<li class="type">video</li>
<li class="type">pager</li>
<li class="type">bbs</li>
<li class="type">car</li>
<li class="type">isdn</li>
<li class="type">pcs</li>
<li class="type">invalid</li>
</ul>
<span class="value">+1</span>
<span class="value">415</span>
<span class="value">555</span>
<span class="value">1233</span>
</div>
<p class="tel">
<abbr class="type" title="home">H</abbr>
<span class="value">+1 415 555 1234</span>
</p>
<a class="tel" href="tel:+1.415.555.1235">call me</a>
<object class="tel" data="tel:+1.415.555.1236">call me</object>
<area class="tel" href="tel:+1.415.555.1237">call me</area>
<a class="tel" href="fax:+1.415.555.1238">call me</a>
<object class="tel" data="fax:+1.415.555.1239">call me</object>
<area class="tel" href="fax:+1.415.555.1240">call me</area>
<a class="tel" href="modem:+1.415.555.1241">call me</a>
<object class="tel" data="modem:+1.415.555.1242">call me</object>
<area class="tel" href="modem:+1.415.555.1243">call me</area>
</div>
<div class="vcard" id="21-tel.2">
<span class="fn">John Doe</span>
<span class="tel"><span class="type">Home</span> +1.415.555.1212</span>
</div>
<div class="vcard" id="21-tel.3">
<span class="fn">John Doe</span>
<span class="tel"><span class="type">Home</span><span class="type"> Pref</span> +1.415.555.1212</span>
</div>
<!-- TODO: add test for 'extended' -->
<div class="vcard" id="22-adr">
<p class="fn">John Doe</p>
<p class="adr">
<span class="street-address">1231 Main St.</span>
<span class="locality">Beverly Hills</span>
<span class="region">California</span>
<span class="country-name">United States of America</span>
<span class="postal-code">90210</span>
</p>
<!-- multiple street-addresses, should produce a comma-seperated list -->
<p class="adr">
<span class="post-office-box">PO Box 1234</span>
<span class="street-address">1232 Main St.</span>
<span class="street-address">Suite 100</span>
<span class="locality">Beverly Hills</span>
<span class="region">California</span>
<span class="country-name">United States of America</span>
<span class="postal-code">90210</span>
</p>
<!-- one type subproperty -->
<p class="adr">
<span class="type">home</span>
<span class="street-address">1233 Main St.</span>
<span class="locality">Beverly Hills</span>
<span class="region">California</span>
<span class="country-name">United States of America</span>
<span class="postal-code">90210</span>
</p>
<!-- many type subproperties, each with their own class name -->
<div class="adr">
<ul>
<li class="type">dom</li>
<li class="type">intl</li>
<li class="type">postal</li>
<li class="type">parcel</li>
<li class="type">home</li>
<li class="type">work</li>
<li class="type">pref</li>
</ul>
<span class="street-address">1234 Main St.</span>
<span class="locality">Beverly Hills</span>
<span class="region">California</span>
<span class="country-name">United States of America</span>
<span class="postal-code">90210</span>
</div>
</div>
<p class="vcard" id="23-abbr-title-everything">
<!-- perhaps the most annoying test ever -->
<abbr class="fn" title="John Doe">foo</abbr>
<span class="n">
<abbr class="honorific-prefix" title="Mister">Mr.</abbr>
<abbr class="given-name" title="Jonathan">John</abbr>
<abbr class="additional-name" title="John">J</abbr>
<abbr class="family-name" title="Doe-Smith">Doe</abbr>
<abbr class="honorific-suffix" title="Medical Doctor">M.D</abbr>
</span>
<abbr class="nickname" title="JJ">jj</abbr>
<abbr class="bday" title="2006-04-04">April 4, 2006</abbr>
<span class="adr">
<abbr class="post-office-box" title="Box 1234">B. 1234</abbr>
<abbr class="extended-address" title="Suite 100">Ste. 100</abbr>
<abbr class="street-address" title="123 Fake Street">123 Fake St.</abbr>
<abbr class="locality" title="San Francisco">San Fran</abbr>
<abbr class="region" title="California">CA</abbr>
<abbr class="postal-code" title="12345-6789">12345</abbr>
<abbr class="country-name" title="United States of America">USA</abbr>
<abbr class="type" title="work">workplace</abbr>
</span>
<abbr class="tel" title="415.555.1234">1234</abbr>
<abbr class="tel-type-value" title="work">workplace</abbr>
<!-- mailer -->
<abbr class="tz" title="-0700">Pacific Time</abbr>
<span class="geo">
<abbr class="latitude" title="37.77">Northern</abbr>
<abbr class="longitude" title="-122.41">California</abbr>
</span>
<abbr class="title" title="President">pres.</abbr> and
<abbr class="role" title="Chief">cat wrangler</abbr>
<!-- <span class="agent"></span> -->
<span class="org">
<abbr class="organization-name" title="Intellicorp">foo</abbr>
<abbr class="organization-unit" title="Intelligence">bar</abbr>
</span>
<!-- <abbr class="category" title=""></abbr> -->
<abbr class="note" title="this is a note">this is not a note</abbr>
<!-- <abbr class="rev" title=""></abbr> (revision datetime) -->
<!-- <abbr class="sort-string" title=""></abbr> -->
<abbr class="uid" title="abcdefghijklmnopqrstuvwxyz">alpha</abbr>
<abbr class="class" title="public">pub</abbr>
<!-- <abbr class="key" title=""></abbr> -->
</p>
There is no 24
<p class="vcard" id="25-geo-abbr">
<abbr class="geo" title="30.267991;-97.739568"><span class="fn org">Paradise</span></abbr>
</p>
<!-- This test is to make sure that parsers look at ancestors, not just children.-->
<div class="vcard" id="26-ancestors">
<!-- perhaps the second most annoying test ever -->
<div>
<span class="fn"><span>John</span> <span>Doe</span></span>
<span class="n">
<span>
<span class="honorific-prefix"><strong>Mister</strong></span>
<span class="given-name"><i>Jonathan</i></span>
<span class="additional-name"><b>John</b></span>
<span class="family-name"><em>Doe-Smith</em></span>
<span class="honorific-suffix">Medical Doctor</span>
</span>
</span>
<span class="nickname"><span>JJ</span></span>
<span class="bday">2006-04-04</span>
<span class="adr">
<span>
<span class="post-office-box"><samp>Box 1234</samp></span>
<span class="extended-address"><dfn>Suite 100</dfn></span>
<span class="street-address"><span>123 Fake Street</span></span>
<span class="locality"><em>San Francisco</em></span>
<span class="region"><strong>California</strong></span>
<span class="postal-code"><abbr>12345-6789</abbr></span>
<span class="country-name"><acronym>United States of America</acronym></span>
<span class="type"><span>work</span></span>
</span>
</span>
<span class="tel"><span>415</span>.<span>555</span>.<span>1234</span></span>
<span class="tel-type-value">work</span>
<!-- @TODO mailer? -->
<span class="tz"><span>-0700</span></span>
<span class="geo">
<span>
<span class="latitude"><code>37.77</code></span>
<span class="longitude"><tt>-122.41</tt></span>
</span>
</span>
<span class="title"><strong>President</strong></span> and
<span class="role"><em>Chief</em></span>
<span class="agent vcard">
<span class="fn">Bob Smith</span>
<span class="title">Executive Assistant</span>
</span>
<!-- <span class="agent</span> @TODO -->
<span class="org">
<span class="organization-name"><strong>Intellicorp</strong></span>
<span class="organization-unit"><em>Intelligence</em></span>
</span>
<!-- @TODO <span class="category"></span> -->
<span class="note"><cite>this is a note</cite></span>
<!-- @TODO <span class="rev"></span> (revision datetime) -->
<!-- @TODO <span class="sort-string"></span> -->
<span class="uid"><kbd>abcdefghijklmnopqrstuvwxyz</kbd></span>
<span class="class"><samp>public</samp></span>
<!-- @TODO <span class="key"></span> -->
</div>
</div>
<p class="vcard" id="27-bday-date">
<span class="fn">john doe</span>,
<abbr class="bday" title="2000-01-01">January 1st, 2000</abbr>
</p>
<p class="vcard" id="28-bday-datetime">
<span class="fn">john doe</span>,
<abbr class="bday" title="2000-01-01T00:00:00">January 1st, 2000 at midnight</abbr>
</p>
<p class="vcard" id="29-bday-datetime-timezone">
<span class="fn">john doe</span>,
<abbr class="bday" title="2000-01-01T00:00:00-0800">January 1st, 2000 at midnight on the north american west coast</abbr>
</p>
<div class="vcard" id="30-fn-org.1">
<div class="fn org">W3C</div>
</div>
<div class="vcard" id="30-fn-org.2">
<div class="fn">Dan Connolly</div>
<div class="org">W3C</div>
</div>
<div class="vcard" id="30-fn-org.3">
<img class="fn" src="http://localhost:8888/tests/browser/microformats/test/picture.png" alt="W3C" />
<div class="org">W3C</div>
</div>
<div class="vcard" id="30-fn-org.4">
<img class="fn org" src="http://localhost:8888/tests/browser/microformats/test/picture.png"
alt="World Wide Web Consortium" />
</div>
<div class="vcard" id="30-fn-org.5">
<object data="http://localhost:8888/tests/browser/microformats/test/w3c_home">
<abbr class="fn org" title="World Wide Web Consortium">W3C</abbr>
</object>
</div>
<p id="email1"><a href="mailto:correct@example.com" class="email">my email</a></p>
<p id="email2"><a href="mailto:incorrect@example.com" class="email">my email</a></p>
<div class="vcard" id="31-include.1">
<a class="url fn" href="http://suda.co.uk/">Brian Suda</a>
<object data="#email1" class="include" type="text/html"/>
<object data="#email2" type="text/html"/>
</div>
<div class="vcard" id="31-include.2">
<a class="url fn" href="http://suda.co.uk/">Brian Suda</a>
<a href="#email1" class="include"></a>
<a href="#email2"/>
</div>
<div class="vcard" id="31-include.3">
<a class="url fn" href="http://suda.co.uk/">Brian Suda</a>
<a href="#email1" class="include"/>
<a href="#email2"/>
</div>
<div class="vcard" id="31-include.4">
<a class="url fn" href="http://suda.co.uk/">Brian Suda</a>
<a href="#email" class="include"/>
</div>
<table>
<tr>
<th id="org" ><a class="url org" href="http://example.org/">example.org</a></th>
</tr>
<tr>
<td class="vcard" id="32-header.1" headers="org"><span class="fn">Brian Suda</span></td>
</tr>
<tr>
<td class="vcard" id="32-header.2" headers="org"><span class="fn">John Doe</span></td>
</tr>
</table>
<div class="vcard" id="33-area.1">
<map id="mailto-test-1">
<area class="fn email" href="mailto:joe@example.com" alt="Joe Public"/>
<area class="url" href="http://example.com/" alt="my website!" />
</map>
</div>
<div class="vcard" id="33-area.2">
<map id="mailto-test-2">
<area class="fn email" href="mailto:joe@example.com" alt="Joe Public"/>
<area class="url" href="http://example.com/" alt="my website!" />
<area class="org" href="http://example.com/" alt="Joe Public" />
</map>
</div>
<div class="vcard" id="33-area.3">
<map id="mailto-test-3">
<area class="fn email" href="mailto:joe@example.com" alt="Joe Public"/>
<area class="url" href="http://example.com/" alt="my website!" />
</map>
<img class="org" src="http://localhost:8888/tests/browser/microformats/test/picture.png" alt="Joe Public" />
</div>
<div class="vcard" id="33-area.4">
<map id="mailto-test-4">
<area class="fn email" href="mailto:joe@example.com" alt="Joe Public"/>
<area class="url" href="http://example.com/" alt="my website!" />
</map>
<div class="org">Joe Public</div>
</div>
<div class="vcard" id="33-area.5">
<map id="mailto-test-5">
<area class="fn email" href="mailto:joe@example.com" alt="Joe Public"/>
<area class="url" href="http://example.com/" alt="my website!" />
</map>
<abbr class="org" title="Joe Public">Joe</abbr>
</div>
<div class="vcard" id="34-notes">
<a class="fn email" href="mailto:joe@example.com">Joe Public</a>
<span class="note">Note 1</span>
<span class="foorbar">Note 2</span>
<span class="note foorbar">Note 3</span>
<span class="note foorbar">Note 4 with a ; and a , to be escaped<!-- this <strong>should</strong> be ignored--></span>
</div>
<div class="vcard" id="35-include-pattern.1">
<span class="fn n" id="j">
<span class="given-name">James</span> <span class="family-name">Levine</span>
</span>
</div>
<div class="vcard" id="35-include-pattern.2">
<object data="#j" class="include" type="text/html"></object>
<span class="org">SimplyHired</span>
<span class="title">Microformat Brainstormer</span>
</div>
<div class="vcard" id="35-include-pattern.3">
<span class="fn n" id="j2">
<span class="given-name">James</span> <span class="family-name">Levine</span>
</span>
<span class="org">SimplyHired</span>
<span class="title">Microformat Brainstormer</span>
</div>
<p class="vcard" id="36-categories.1">
<span class="fn">john doe</span>,
<abbr class="category" title="C1">C1a</abbr>
<a class="category" href="http://example.com" title="C2">C2a</a>
<a class="category" href="http://example.com/C3" rel="tag" title="C3a">C3b</a>
<img class="category" src="http://localhost:8888/tests/browser/microformats/test/picture.png" alt="C4"/>
<a class="category" href="http://example.com/C5/" rel="tag" title="C5a">C5b</a>
<a class="category" href="http://example.com/C6?tag=false" rel="tag" title="C6a">C6b</a>
<a class="category" href="http://example.com/C7#anchor" rel="tag" title="C7a">C7b</a>
<a class="category" href="http://example.com/C8?tag=trailing-slash/" rel="tag" title="C8a">C8b</a>
<a class="category" href="http://example.com/C9/?tag=trailing-slash/" rel="tag" title="C9a">C9b</a>
</p>
<div class="vcard" id="36-categories.2">
<span class="fn n">
<span class="given-name">Joe</span> <span class="family-name">User</span>
</span>
<span class="category">User</span>
<a class="category" rel="tag" href="http://example.com/luser">a big luser!</a>
</div>
<p class="vcard" id="37-singleton">
<span class="fn n"><span class="given-name">john</span> <span class="family-name"><span class="sort-string">d</span>oe</span> 1</span>
<span class="fn n"><span class="given-name"><span class="sort-string">j</span>ohn</span> <span class="family-name">doe</span> 2</span>
<abbr class="bday" title="20060707">today</abbr>
<abbr class="bday" title="20060708">tomorrow</abbr>
<abbr class="geo" title="123.45;67.89">Here</abbr>
<abbr class="geo" title="98.765;43.21">There</abbr>
<abbr class="rev" title="20060707">today</abbr>
<abbr class="rev" title="20060708">tomorrow</abbr>
<abbr class="uid" title="unique-id-1">id-1</abbr>
<abbr class="uid" title="unique-id-2">id-2</abbr>
<span class="tz">+0600</span>
<span class="tz">+0800</span>
<span class="class">public</span>
<span class="class">private</span>
</p>
<div class="vcard" id="38-uid.1">
<span class="fn">Ryan King</span>
<a class="url uid" href="http://theryanking.com/contact/">My other hCard</a>
</div>
<div class="vcard" id="38-uid.2">
<span class="fn">Ryan King</span>
<object class="url uid" data="http://localhost:8888/tests/browser/microformats/test/contact/">My other hCard</object>
</div>
<div class="vcard" id="38-uid.3">
<span class="fn">Ryan King</span>
<img class="url uid" src="http://localhost:8888/tests/browser/microformats/test/contact/" alt="my other hcard" />
</div>
<div class="vcard" id="38-uid.4">
<span class="fn">Ryan King</span>
<map id="foo"><area class="url uid" href="http://theryanking.com/contact/" alt="my other hcard" /></map>
</div>
<div class="vcard" id="39-noteHTML">
<a class="fn">Joe Public</a>
<span class="note"><b>Note</b></span>
</div>
<div class="vcard" id="email-type">
<span class="fn">John Doe</span>
<span class="email">
<span class="type">internet</span>
<a href="mailto:notthis@example.com">john@example.com</a>
</span>
</div>
</div>
<pre id="test">
<script class="testbody" type="text/javascript">
test_Microformats();
test_hCard();
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_hCard() {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
Components.utils.import("resource://gre/modules/Microformats.js");
var hcard;
hcard = new hCard(document.getElementById("01-tantek-basic"));
is(hcard.fn, "Tantek Çelik", "01-tantek-basic - fn");
is(hcard.url, "http://tantek.com/", "01-tantek-basic - url");
is(hcard.n["given-name"][0], "Tantek", "01-tantek-basic - given-name");
is(hcard.n["family-name"][0], "Çelik", "01-tantek-basic - family-name");
is(hcard.org[0]["organization-name"], "Technorati", "01-tantek-basic - organization-name");
hcard = new hCard(document.getElementById("02-multiple-class-names-on-vcard.1"));
is(hcard.fn, "Ryan King", "02-multiple-class-names-on-vcard.1 - fn");
is(hcard.n["given-name"][0], "Ryan", "02-multiple-class-names-on-vcard.1 - given-name");
is(hcard.n["family-name"][0], "King", "02-multiple-class-names-on-vcard.1 - family-name");
hcard = new hCard(document.getElementById("02-multiple-class-names-on-vcard.2"));
is(hcard.fn, "Ryan King", "02-multiple-class-names-on-vcard.2 - fn");
is(hcard.n["given-name"][0], "Ryan", "02-multiple-class-names-on-vcard.2 - given-name");
is(hcard.n["family-name"][0], "King", "02-multiple-class-names-on-vcard.2 - family-name");
hcard = new hCard(document.getElementById("02-multiple-class-names-on-vcard.3"));
is(hcard.fn, "Ryan King", "02-multiple-class-names-on-vcard.3 - fn");
is(hcard.n["given-name"][0], "Ryan", "02-multiple-class-names-on-vcard.3 - given-name");
is(hcard.n["family-name"][0], "King", "02-multiple-class-names-on-vcard.3 - family-name");
hcard = new hCard(document.getElementById("03-implied-n.1"));
is(hcard.fn, "Ryan King", "03-implied-n.1 - fn");
is(hcard.n["given-name"][0], "Ryan", "03-implied-n.1 - given-name");
is(hcard.n["family-name"][0], "King", "03-implied-n.1 - family-name");
hcard = new hCard(document.getElementById("03-implied-n.2"));
is(hcard.fn, "Ryan King", "03-implied-n.2 - fn");
is(hcard.n["given-name"][0], "Ryan", "03-implied-n.2 - given-name");
is(hcard.n["family-name"][0], "King", "03-implied-n.2 - family-name");
hcard = new hCard(document.getElementById("03-implied-n.3"));
is(hcard.fn, "Ryan King", "03-implied-n.3 - fn");
is(hcard.n["given-name"][0], "Ryan", "03-implied-n.3 - given-name");
is(hcard.n["family-name"][0], "King", "03-implied-n.3 - family-name");
hcard = new hCard(document.getElementById("03-implied-n.4"));
is(hcard.fn, "Brian Suda", "03-implied-n.4 - fn");
is(hcard.n["given-name"][0], "Brian", "03-implied-n.4 - given-name");
is(hcard.n["family-name"][0], "Suda", "03-implied-n.4 - family-name");
hcard = new hCard(document.getElementById("03-implied-n.5"));
is(hcard.fn, "King, Ryan", "03-implied-n.5 - fn");
is(hcard.n["given-name"][0], "Ryan", "03-implied-n.5 - given-name");
is(hcard.n["family-name"][0], "King", "03-implied-n.5 - family-name");
hcard = new hCard(document.getElementById("03-implied-n.6"));
is(hcard.fn, "King, R", "03-implied-n.6 - fn");
is(hcard.n["given-name"][0], "R", "03-implied-n.6 - given-name");
is(hcard.n["family-name"][0], "King", "03-implied-n.6 - family-name");
hcard = new hCard(document.getElementById("03-implied-n.7"));
is(hcard.fn, "King R", "03-implied-n.7 - fn");
is(hcard.n["given-name"][0], "R", "03-implied-n.7 - given-name");
is(hcard.n["family-name"][0], "King", "03-implied-n.7 - family-name");
hcard = new hCard(document.getElementById("03-implied-n.8"));
is(hcard.fn, "King R.", "03-implied-n.8 - fn");
is(hcard.n["given-name"][0], "R.", "03-implied-n.8 - given-name");
is(hcard.n["family-name"][0], "King", "03-implied-n.8 - family-name");
hcard = new hCard(document.getElementById("03-implied-n.9"));
is(hcard.fn, "Jesse James Garrett", "03-implied-n.9 - fn");
ok(hcard.n === undefined, "03-implied-n.9 -n");
hcard = new hCard(document.getElementById("03-implied-n.10"));
is(hcard.fn, "Thomas Vander Wal", "03-implied-n.10 - fn");
ok(hcard.n === undefined, "03-implied-n.10 -n");
hcard = new hCard(document.getElementById("04-ignore-unknowns"));
is(hcard.fn, "Ryan King", "04-ignore-unknowns - fn");
is(hcard.n["given-name"][0], "Ryan", "04-ignore-unknowns - given-name");
is(hcard.n["family-name"][0], "King", "04-ignore-unknowns - family-name");
hcard = new hCard(document.getElementById("05-mailto-1"));
is(hcard.fn, "Ryan King", "05-mailto-1 - fn");
is(hcard.n["given-name"][0], "Ryan", "05-mailto-1 - given-name");
is(hcard.n["family-name"][0], "King", "05-mailto-1 - family-name");
is(hcard.email[0].value, "ryan@technorati.com", "05-mailto-1 - email");
hcard = new hCard(document.getElementById("06-mailto-2"));
is(hcard.fn, "Brian Suda", "06-mailto-2 - fn");
is(hcard.n["given-name"][0], "Brian", "06-mailto-2 - given-name");
is(hcard.n["family-name"][0], "Suda", "06-mailto-2 - family-name");
is(hcard.email[0].value, "brian@example.com", "06-mailto-2 - email");
hcard = new hCard(document.getElementById("07-relative-url"));
is(hcard.fn, "John Doe", "07-relative-url - fn");
is(hcard.n["given-name"][0], "John", "07-relative-url - given-name");
is(hcard.n["family-name"][0], "Doe", "07-relative-url - family-name");
// is(hcard.url[0], "http://microformats.org/home/blah", "07-relative-url - url");
is(hcard.url, "http://localhost:8888/home/blah", "07-relative-url - url");
hcard = new hCard(document.getElementById("11-multiple-urls"));
is(hcard.fn, "John Doe", "11-multiple-urls - fn");
is(hcard.n["given-name"][0], "John", "11-multiple-urls - given-name");
is(hcard.n["family-name"][0], "Doe", "11-multiple-urls - family-name");
is(hcard.url[0], "http://example.com/foo", "11-multiple-urls - url");
is(hcard.url[1], "http://example.com/bar", "11-multiple-urls - url");
hcard = new hCard(document.getElementById("12-img-src-url"));
is(hcard.fn, "John Doe", "12-img-src-url - fn");
is(hcard.n["given-name"][0], "John", "12-img-src-url - given-name");
is(hcard.n["family-name"][0], "Doe", "12-img-src-url - family-name");
is(hcard.url[0], "http://localhost:8888/tests/browser/microformats/test/picture.png", "12-img-src-url - url");
hcard = new hCard(document.getElementById("13-photo-logo"));
is(hcard.fn, "John Doe", "13-photo-logo - fn");
is(hcard.n["given-name"][0], "John", "13-photo-logo - given-name");
is(hcard.n["family-name"][0], "Doe", "13-photo-logo - family-name");
is(hcard.logo, "http://localhost:8888/tests/browser/microformats/test/picture.png", "13-photo-logo - logo");
is(hcard.photo, "http://localhost:8888/tests/browser/microformats/test/picture.png", "13-photo-logo - photo");
hcard = new hCard(document.getElementById("14-img-src-data-url"));
is(hcard.fn, "John Doe", "14-img-src-data-url - fn");
is(hcard.n["given-name"][0], "John", "14-img-src-data-url - given-name");
is(hcard.n["family-name"][0], "Doe", "14-img-src-data-url - family-name");
is(hcard.logo, "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAMAAAAp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6W5WFmABMtEzMi1wEEEFAbE0YyAUuzMMEsYQalMkQSBQggUDmNPU3C9IA4LCxI+QUggEBiKOU8yExgqccCL3chnkPKlQABhGo6ejHBDKmdUHMlQAAhhQvQaGZGkBIkjcAMywLmI+VKgABCSowsTJhZkhlWXiBpAQggYBqBZl9GVOdBcz0LZqEEEEAMqLULMBLg1THWog9IAwQQA0qiZcRW5aPbAhBADCg1El4tMAAQQAxoiZYZXnTh1AIQQAzo2QlYpDDjcBgrxGEAAcSAJTthswmiBUwDBBC2GpkZJTaRvQ+mAQKIAUuuxdZWQvILQABBmSxMjBj5EpcWgACCMoFOYYSpZyHQHgMIMACt2hmoVEikCQAAAABJRU5ErkJggg==", "14-img-src-data-url - photo");
hcard = new hCard(document.getElementById("15-honorific-additional-single"));
is(hcard.fn, "Mr. John Maurice Doe, Ph.D.", "15-honorific-additional-single - fn");
is(hcard.n["given-name"][0], "John", "15-honorific-additional-single - given-name");
is(hcard.n["family-name"][0], "Doe", "15-honorific-additional-single - family-name");
is(hcard.n["honorific-prefix"], "Mr.", "15-honorific-additional-single - honorific-prefix");
is(hcard.n["additional-name"], "Maurice", "15-honorific-additional-single - additional-name");
is(hcard.n["honorific-suffix"], "Ph.D.", "15-honorific-additional-single - honorific-suffix");
hcard = new hCard(document.getElementById("16-honorific-additional-multiple"));
is(hcard.fn, "Mr. Dr. John Maurice Benjamin Doe Ph.D., J.D.", "16-honorific-additional-multiple - fn");
is(hcard.n["given-name"][0], "John", "16-honorific-additional-multiple - given-name");
is(hcard.n["family-name"][0], "Doe", "16-honorific-additional-multiple - family-name");
is(hcard.n["honorific-prefix"][0], "Mr.", "16-honorific-additional-multiple - honorific-prefix");
is(hcard.n["honorific-prefix"][1], "Dr.", "16-honorific-additional-multiple - honorific-prefix");
is(hcard.n["additional-name"][0], "Maurice", "16-honorific-additional-multiple - additional-name");
is(hcard.n["additional-name"][1], "Benjamin", "16-honorific-additional-multiple - additional-name");
is(hcard.n["honorific-suffix"][0], "Ph.D.", "16-honorific-additional-multiple - honorific-suffix");
is(hcard.n["honorific-suffix"][1], "J.D.", "16-honorific-additional-multiple - honorific-suffix");
hcard = new hCard(document.getElementById("17-email-not-uri"));
is(hcard.fn, "John Doe", "17-email-not-uri - fn");
is(hcard.n["given-name"][0], "John", "17-email-not-uri - given-name");
is(hcard.n["family-name"][0], "Doe", "17-email-not-uri - family-name");
is(hcard.email[0].value, "john@example.com", "17-email-not-uri - email");
hcard = new hCard(document.getElementById("18-object-data-http-uri"));
is(hcard.fn, "John Doe", "18-object-data-http-uri - fn");
is(hcard.n["given-name"][0], "John", "18-object-data-http-uri - given-name");
is(hcard.n["family-name"][0], "Doe", "18-object-data-http-uri - family-name");
is(hcard.logo, "http://localhost:8888/tests/browser/microformats/test/picture.png", "18-object-data-http-uri - logo");
is(hcard.photo, "http://localhost:8888/tests/browser/microformats/test/picture.png", "18-object-data-http-uri - photo");
is(hcard.url, "http://localhost:8888/tests/browser/microformats/test/picture.png", "18-object-data-http-uri - url");
hcard = new hCard(document.getElementById("19-object-data-data-uri"));
is(hcard.fn, "John Doe", "19-object-data-data-uri - fn");
is(hcard.n["given-name"][0], "John", "19-object-data-data-uri - given-name");
is(hcard.n["family-name"][0], "Doe", "19-object-data-data-uri - family-name");
is(hcard.logo, "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAMAAAAp4XiDAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAASUExURf///8zMzJmZmWZmZjMzMwAAAPOPemkAAAM1SURBVHjaYmBgYGBkYQUBFkYWFiCPCchixQAMCCZAACF0MAMVM4K4TFh0IGsBCCAkOxhYmBnAAKaHhZkZmxaAAGJgYIbpYGBihGgBWsTMzMwE4jIhaWGAYoAAYmCECDExYAcwGxkg5oNIgABigDqLARdgZmGB2wICrKwAAcSA3xKgIxlZ0PwCEEAMBCxhgHoWSQtAADFAAxgfYEJ1GEAAQbQw4tUCsocBYQVAADEgu4uRkREeUCwszEwwLhOKLQABhNDCBA4aSDgwwhIAJKqYUPwCEEAMUK/AUwnc9aywJMCI7DAgAAggBohZ8JTBhGIJzCoWZL8ABBCYidAB8RUjWppkYUG2BSCAGMDqEMZiswUtXgACiAHsFYixTMywGGLGpgUWYgABxAA2mQkWCMyMqFoYmdD8ACQAAogBHJHMrCxg1cyIiICmCkYWDFsAAgiihYmZCewFFpR0BfI3LLch+QUggBiQ0iQjEyMDmh54qCBlUIAAYsCRJsElADQvgWKTlRGeKwECiAF3XgGmMEYQYADZzcoA9z5AAMG9RQCAtEC9DxBADFiyFyMjVi0wABBAWLQwQdIiuhYGWJIACCBg+KKUJ9BoBRdS2LQALQMIIGDQIEmwAO1kYcVWHCDZAhBAqFqYmOAxj2YNtAwDAYAAYmDEiBYWzHKKkRERYiwAAYSphZEZwxZGZiZQVEJTJkAAMTCyokc7M5oORlC5wcoEjxeAAAJqQXU0UB6W5WFmABMtEzMi1wEEEFAbE0YyAUuzMMEsYQalMkQSBQggUDmNPU3C9IA4LCxI+QUggEBiKOU8yExgqccCL3chnkPKlQABhGo6ejHBDKmdUHMlQAAhhQvQaGZGkBIkjcAMywLmI+VKgABCSowsTJhZkhlWXiBpAQggYBqBZl9GVOdBcz0LZqEEEEAMqLULMBLg1THWog9IAwQQA0qiZcRW5aPbAhBADCg1El4tMAAQQAxoiZYZXnTh1AIQQAzo2QlYpDDjcBgrxGEAAcSAJTthswmiBUwDBBC2GpkZJTaRvQ+mAQKIAUuuxdZWQvILQABBmSxMjBj5EpcWgACCMoFOYYSpZyHQHgMIMACt2hmoVEikCQAAAABJRU5ErkJggg==", "19-object-data-data-uri - logo");
is(hcard.photo, "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAMAAAAp4XiDAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAASUExURf///8zMzJmZmWZmZjMzMwAAAPOP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OYYSpZyHQHgMIMACt2hmoVEikCQAAAABJRU5ErkJggg==", "19-object-data-data-uri - photo");
hcard = new hCard(document.getElementById("20-image-alt"));
is(hcard.fn, "John Doe", "20-image-alt - fn");
is(hcard.n["given-name"][0], "John", "20-image-alt - given-name");
is(hcard.n["family-name"][0], "Doe", "20-image-alt - family-name");
is(hcard.logo, "http://localhost:8888/tests/browser/microformats/test/picture.png", "20-image-alt - logo");
is(hcard.photo, "http://localhost:8888/tests/browser/microformats/test/picture.png", "20-image-alt - photo");
hcard = new hCard(document.getElementById("21-tel"));
is(hcard.fn, "John Doe", "21-tel - fn");
is(hcard.n["given-name"][0], "John", "21-tel - given-name");
is(hcard.n["family-name"][0], "Doe", "21-tel - family-name");
is(hcard.tel[0].value, "+1.415.555.1231", "21-tel - tel");
is(hcard.tel[1].value, "+1 415 555 1232", "21-tel - tel");
is(hcard.tel[1].type[0], "home", "21-tel - type");
is(hcard.tel[2].value, "+14155551233", "21-tel - tel");
is(hcard.tel[2].type[0], "msg", "21-tel - type");
is(hcard.tel[2].type[1], "home", "21-tel - type");
is(hcard.tel[2].type[2], "work", "21-tel - type");
is(hcard.tel[2].type[3], "pref", "21-tel - type");
is(hcard.tel[2].type[4], "voice", "21-tel - type");
is(hcard.tel[2].type[5], "fax", "21-tel - type");
is(hcard.tel[2].type[6], "cell", "21-tel - type");
is(hcard.tel[2].type[7], "video", "21-tel - type");
is(hcard.tel[2].type[8], "pager", "21-tel - type");
is(hcard.tel[2].type[9], "bbs", "21-tel - type");
is(hcard.tel[2].type[10], "car", "21-tel - type");
is(hcard.tel[2].type[11], "isdn", "21-tel - type");
is(hcard.tel[2].type[12], "pcs", "21-tel - type");
isnot(hcard.tel[2].type[13], "invalid", "21-tel - type");
is(hcard.tel[3].value, "+1 415 555 1234", "21-tel - tel");
is(hcard.tel[3].type[0], "home", "21-tel - type");
is(hcard.tel[4].value, "+1.415.555.1235", "21-tel - tel");
is(hcard.tel[5].value, "+1.415.555.1236", "21-tel - tel");
is(hcard.tel[6].value, "+1.415.555.1238", "21-tel - tel");
is(hcard.tel[7].value, "+1.415.555.1239", "21-tel - tel");
is(hcard.tel[8].value, "+1.415.555.1241", "21-tel - tel");
is(hcard.tel[9].value, "+1.415.555.1242", "21-tel - tel");
hcard = new hCard(document.getElementById("21-tel.2"));
is(hcard.tel[0].type[0], "home", "21-tel.2 - type");
is(hcard.tel[0].value, "+1.415.555.1212", "21-tel.2 - tel");
hcard = new hCard(document.getElementById("21-tel.3"));
is(hcard.tel[0].type[0], "home", "21-tel.3 - type (home)");
is(hcard.tel[0].type[1], "pref", "21-tel.3 - type (pref)");
is(hcard.tel[0].value, "+1.415.555.1212", "21-tel.3 - tel");
hcard = new hCard(document.getElementById("22-adr"));
is(hcard.fn, "John Doe", "22-adr - fn");
is(hcard.n["given-name"][0], "John", "22-adr - given-name");
is(hcard.n["family-name"][0], "Doe", "22-adr - family-name");
is(hcard.adr[0]["street-address"][0], "1231 Main St.", "22-adr - street-address");
is(hcard.adr[0].locality, "Beverly Hills", "22-adr - locality");
is(hcard.adr[0].region, "California", "22-adr - region");
is(hcard.adr[0]["postal-code"], "90210", "22-adr - postal-code");
is(hcard.adr[0]["country-name"], "United States of America", "22-adr - country-name");
is(hcard.adr[1]["post-office-box"], "PO Box 1234", "22-adr - post-office-box");
is(hcard.adr[1]["street-address"][0], "1232 Main St.", "22-adr - street-address");
is(hcard.adr[1]["street-address"][1], "Suite 100", "22-adr - street-address");
is(hcard.adr[1].locality, "Beverly Hills", "22-adr - locality");
is(hcard.adr[1].region, "California", "22-adr - region");
is(hcard.adr[1]["postal-code"], "90210", "22-adr - postal-code");
is(hcard.adr[1]["country-name"], "United States of America", "22-adr - country-name");
is(hcard.adr[2]["type"][0], "home", "22-adr - type");
is(hcard.adr[2]["street-address"][0], "1233 Main St.", "22-adr - street-address");
is(hcard.adr[2].locality, "Beverly Hills", "22-adr - locality");
is(hcard.adr[2].region, "California", "22-adr - region");
is(hcard.adr[2]["postal-code"], "90210", "22-adr - postal-code");
is(hcard.adr[2]["country-name"], "United States of America", "22-adr - country-name");
is(hcard.adr[3]["type"][0], "dom", "22-adr - type");
is(hcard.adr[3]["type"][1], "intl", "22-adr - type");
is(hcard.adr[3]["type"][2], "postal", "22-adr - type");
is(hcard.adr[3]["type"][3], "parcel", "22-adr - type");
is(hcard.adr[3]["type"][4], "home", "22-adr - type");
is(hcard.adr[3]["type"][5], "work", "22-adr - type");
is(hcard.adr[3]["type"][6], "pref", "22-adr - type");
is(hcard.adr[3]["street-address"][0], "1234 Main St.", "22-adr - street-address");
is(hcard.adr[3].locality, "Beverly Hills", "22-adr - locality");
is(hcard.adr[3].region, "California", "22-adr - region");
is(hcard.adr[3]["postal-code"], "90210", "22-adr - postal-code");
is(hcard.adr[3]["country-name"], "United States of America", "22-adr - country-name");
hcard = new hCard(document.getElementById("23-abbr-title-everything"));
is(hcard.fn, "John Doe", "23-abbr-title-everything - fn");
is(hcard.n["given-name"][0], "Jonathan", "23-abbr-title-everything - given-name");
is(hcard.n["family-name"][0], "Doe-Smith", "23-abbr-title-everything - family-name");
is(hcard.n["additional-name"], "John", "23-abbr-title-everything - additional-name");
is(hcard.n["honorific-prefix"], "Mister", "23-abbr-title-everything - honorific-prefix");
is(hcard.n["honorific-suffix"], "Medical Doctor", "23-abbr-title-everything - honorific-suffix");
is(hcard["class"], "public", "23-abbr-title-everything - class");
is(hcard.geo.latitude, "37.77", "23-abbr-title-everything - geo.latitude");
is(hcard.geo.longitude, "-122.41", "23-abbr-title-everything - geo.longitude");
is(hcard.bday, "2006-04-04", "23-abbr-title-everything - bday");
is(hcard.nickname[0], "JJ", "23-abbr-title-everything - nickname");
is(hcard.note[0], "this is a note", "23-abbr-title-everything - note");
isnot(hcard.note[0], "this is not a note", "23-abbr-title-everything - note");
is(hcard.org[0]["organization-name"], "Intellicorp", "23-abbr-title-everything - organization-name");
is(hcard.org[0]["organization-unit"][0], "Intelligence", "23-abbr-title-everything - organization-unit");
is(hcard.role, "Chief", "23-abbr-title-everything - role");
is(hcard.tel[0].value, "415.555.1234", "23-abbr-title-everything - tel");
is(hcard.title[0], "President", "23-abbr-title-everything - title");
is(hcard.tz, "-0700", "23-abbr-title-everything - tz");
is(hcard.uid, "abcdefghijklmnopqrstuvwxyz", "23-abbr-title-everything - uid");
is(hcard.adr[0]["post-office-box"], "Box 1234", "23-abbr-title-everything - post-office-box");
is(hcard.adr[0]["street-address"][0], "123 Fake Street", "23-abbr-title-everything - street-address");
is(hcard.adr[0]["extended-address"], "Suite 100", "23-abbr-title-everything - street-address");
is(hcard.adr[0].locality, "San Francisco", "23-abbr-title-everything - locality");
is(hcard.adr[0].region, "California", "23-abbr-title-everything - region");
is(hcard.adr[0]["postal-code"], "12345-6789", "23-abbr-title-everything - postal-code");
is(hcard.adr[0]["country-name"], "United States of America", "23-abbr-title-everything - country-name");
hcard = new hCard(document.getElementById("25-geo-abbr"));
is(hcard.fn, "Paradise", "25-geo-abbr - fn");
is(hcard.geo.latitude, "30.267991", "25-geo-abbr - geo.latitude");
is(hcard.geo.longitude, "-97.739568", "25-geo-abbr - geo.longitude");
hcard = new hCard(document.getElementById("26-ancestors"));
is(hcard.fn, "John Doe", "26-ancestors - fn");
is(hcard.n["given-name"][0], "Jonathan", "26-ancestors - given-name");
is(hcard.n["family-name"][0], "Doe-Smith", "26-ancestors - family-name");
is(hcard.n["additional-name"], "John", "26-ancestors - additional-name");
is(hcard.n["honorific-prefix"], "Mister", "26-ancestors - honorific-prefix");
is(hcard.n["honorific-suffix"], "Medical Doctor", "26-ancestors - honorific-suffix");
is(hcard["class"], "public", "26-ancestors - class");
is(hcard.geo.latitude, "37.77", "26-ancestors - geo.latitude");
is(hcard.geo.longitude, "-122.41", "26-ancestors - geo.longitude");
is(hcard.bday, "2006-04-04", "26-ancestors - bday");
is(hcard.nickname[0], "JJ", "26-ancestors - nickname");
is(hcard.note[0], "this is a note", "26-ancestors - note");
isnot(hcard.note[0], "this is not a note", "26-ancestors - note");
is(hcard.org[0]["organization-name"], "Intellicorp", "26-ancestors - organization-name");
is(hcard.org[0]["organization-unit"][0], "Intelligence", "26-ancestors - organization-unit");
is(hcard.role, "Chief", "26-ancestors - role");
is(hcard.agent[0].fn, "Bob Smith", "26-ancestors - agent.fn");
is(hcard.agent[0].title, "Executive Assistant", "26-ancestors - agent.title");
is(hcard.tel[0].value, "415.555.1234", "26-ancestors - tel");
is(hcard.title[0], "President", "26-ancestors - title");
is(hcard.tz, "-0700", "26-ancestors - tz");
is(hcard.uid, "abcdefghijklmnopqrstuvwxyz", "26-ancestors - uid");
is(hcard.adr[0]["post-office-box"], "Box 1234", "26-ancestors - post-office-box");
is(hcard.adr[0]["street-address"][0], "123 Fake Street", "26-ancestors - street-address");
is(hcard.adr[0]["extended-address"], "Suite 100", "26-ancestors - street-address");
is(hcard.adr[0].locality, "San Francisco", "26-ancestors - locality");
is(hcard.adr[0].region, "California", "26-ancestors - region");
is(hcard.adr[0]["postal-code"], "12345-6789", "26-ancestors - postal-code");
is(hcard.adr[0]["country-name"], "United States of America", "26-ancestors - country-name");
hcard = new hCard(document.getElementById("27-bday-date"));
is(hcard.fn, "john doe", "27-bday-date - fn");
is(hcard.n["given-name"][0], "john", "27-bday-date - given-name");
is(hcard.n["family-name"][0], "doe", "27-bday-date - family-name");
is(hcard.bday, "2000-01-01", "27-bday-date - bday");
hcard = new hCard(document.getElementById("28-bday-datetime"));
is(hcard.fn, "john doe", "28-bday-datetime - fn");
is(hcard.n["given-name"][0], "john", "28-bday-datetime - given-name");
is(hcard.n["family-name"][0], "doe", "28-bday-datetime - family-name");
is(hcard.bday, "2000-01-01T00:00:00", "28-bday-datetime - bday");
hcard = new hCard(document.getElementById("29-bday-datetime-timezone"));
is(hcard.fn, "john doe", "29-bday-datetime-timezone - fn");
is(hcard.n["given-name"][0], "john", "29-bday-datetime-timezone - given-name");
is(hcard.n["family-name"][0], "doe", "29-bday-datetime-timezone - family-name");
is(hcard.bday, "2000-01-01T00:00:00-0800", "29-bday-datetime-timezone - bday");
hcard = new hCard(document.getElementById("30-fn-org.1"));
is(hcard.fn, "W3C", "30-fn-org.1 - fn");
is(hcard.org[0]["organization-name"], "W3C", "30-fn-org.1 - organization-name");
hcard = new hCard(document.getElementById("30-fn-org.2"));
is(hcard.fn, "Dan Connolly", "30-fn-org.2 - fn");
is(hcard.n["given-name"][0], "Dan", "30-fn-org.2 - given-name");
is(hcard.n["family-name"][0], "Connolly", "30-fn-org.2 - family-name");
is(hcard.org[0]["organization-name"], "W3C", "30-fn-org.2 - organization-name");
hcard = new hCard(document.getElementById("30-fn-org.3"));
is(hcard.fn, "W3C", "30-fn-org.3 - fn");
is(hcard.org[0]["organization-name"], "W3C", "30-fn-org.3 - organization-name");
hcard = new hCard(document.getElementById("30-fn-org.4"));
is(hcard.fn, "World Wide Web Consortium", "30-fn-org.4 - fn");
is(hcard.org[0]["organization-name"], "World Wide Web Consortium", "30-fn-org.4 - organization-name");
hcard = new hCard(document.getElementById("30-fn-org.5"));
is(hcard.fn, "World Wide Web Consortium", "30-fn-org.5 - fn");
is(hcard.org[0]["organization-name"], "World Wide Web Consortium", "30-fn-org.5 - organization-name");
hcard = new hCard(document.getElementById("31-include.1"));
is(hcard.fn, "Brian Suda", "31-include.1 - fn");
is(hcard.n["given-name"][0], "Brian", "31-include.1 - given-name");
is(hcard.n["family-name"][0], "Suda", "31-include.1 - family-name");
is(hcard.url, "http://suda.co.uk/", "31-include.1 - url");
is(hcard.email[0].value, "correct@example.com", "31-include.1 - email");
isnot(hcard.email[0].value, "incorrect@example.com", "31-include.1 - email");
hcard = new hCard(document.getElementById("31-include.2"));
is(hcard.fn, "Brian Suda", "31-include.2 - fn");
is(hcard.n["given-name"][0], "Brian", "31-include.2 - given-name");
is(hcard.n["family-name"][0], "Suda", "31-include.2 - family-name");
is(hcard.url, "http://suda.co.uk/", "31-include.2 - url");
is(hcard.email[0].value, "correct@example.com", "31-include.2 - email");
isnot(hcard.email[0].value, "incorrect@example.com", "31-include.2 - email");
hcard = new hCard(document.getElementById("31-include.3"));
is(hcard.fn, "Brian Suda", "31-include.3 - fn");
is(hcard.n["given-name"][0], "Brian", "31-include.3 - given-name");
is(hcard.n["family-name"][0], "Suda", "31-include.3 - family-name");
is(hcard.url, "http://suda.co.uk/", "31-include.3 - url");
is(hcard.email[0].value, "correct@example.com", "31-include.3 - email");
isnot(hcard.email[0].value, "incorrect@example.com", "31-include.3 - email");
hcard = new hCard(document.getElementById("31-include.4"));
is(hcard.fn, "Brian Suda", "31-include.3 - fn");
is(hcard.n["given-name"][0], "Brian", "31-include.3 - given-name");
is(hcard.n["family-name"][0], "Suda", "31-include.3 - family-name");
is(hcard.url, "http://suda.co.uk/", "31-include.3 - url");
hcard = new hCard(document.getElementById("32-header.1"));
is(hcard.fn, "Brian Suda", "32-header.1 - fn");
is(hcard.n["given-name"][0], "Brian", "32-header.1 - given-name");
is(hcard.n["family-name"][0], "Suda", "32-header.1 - family-name");
is(hcard.org[0]["organization-name"], "example.org", "32-header.1 - organization-name");
is(hcard.url, "http://example.org/", "32-header.1 - url");
hcard = new hCard(document.getElementById("32-header.2"));
is(hcard.fn, "John Doe", "32-header.2 - fn");
is(hcard.n["given-name"][0], "John", "32-header.2 - given-name");
is(hcard.n["family-name"][0], "Doe", "32-header.2 - family-name");
is(hcard.org[0]["organization-name"], "example.org", "32-header.2 - organization-name");
is(hcard.url, "http://example.org/", "32-header.2 - url");
hcard = new hCard(document.getElementById("33-area.1"));
is(hcard.fn, "Joe Public", "33-area.1 - fn");
is(hcard.n["given-name"][0], "Joe", "33-area.1 - given-name");
is(hcard.n["family-name"][0], "Public", "33-area.1 - family-name");
is(hcard.url, "http://example.com/", "33-area.1 - url");
is(hcard.email[0].value, "joe@example.com", "33-area.1 - email");
hcard = new hCard(document.getElementById("33-area.2"));
is(hcard.fn, "Joe Public", "33-area.2 - fn");
is(hcard.url, "http://example.com/", "33-area.2 - url");
is(hcard.email[0].value, "joe@example.com", "33-area.2 - email");
is(hcard.org[0]["organization-name"], "Joe Public", "33-area.2 - organization-name");
hcard = new hCard(document.getElementById("33-area.3"));
is(hcard.fn, "Joe Public", "33-area.3 - fn");
is(hcard.url, "http://example.com/", "33-area.3 - url");
is(hcard.email[0].value, "joe@example.com", "33-area.3 - email");
is(hcard.org[0]["organization-name"], "Joe Public", "33-area.3 - organization-name");
hcard = new hCard(document.getElementById("33-area.4"));
is(hcard.fn, "Joe Public", "33-area.4 - fn");
is(hcard.url, "http://example.com/", "33-area.4 - url");
is(hcard.email[0].value, "joe@example.com", "33-area.4 - email");
is(hcard.org[0]["organization-name"], "Joe Public", "33-area.4 - organization-name");
hcard = new hCard(document.getElementById("33-area.5"));
is(hcard.fn, "Joe Public", "33-area.5 - fn");
is(hcard.url, "http://example.com/", "33-area.5 - url");
is(hcard.email[0].value, "joe@example.com", "33-area.5 - email");
is(hcard.org[0]["organization-name"], "Joe Public", "33-area.5 - organization-name");
hcard = new hCard(document.getElementById("34-notes"));
is(hcard.fn, "Joe Public", "34-notes - fn");
is(hcard.n["given-name"][0], "Joe", "34-notes - given-name");
is(hcard.n["family-name"][0], "Public", "34-notes - family-name");
is(hcard.note[0], "Note 1", "34-notes - note");
isnot(hcard.note[1], "Note 2", "34-notes - note");
is(hcard.note[1], "Note 3", "34-notes - note");
is(hcard.note[2], "Note 4 with a ; and a , to be escaped", "34-notes - note");
hcard = new hCard(document.getElementById("35-include-pattern.1"));
is(hcard.fn, "James Levine", "35-include-pattern.1 - fn");
is(hcard.n["given-name"][0], "James", "35-include-pattern.1 - given-name");
is(hcard.n["family-name"][0], "Levine", "35-include-pattern.1 - family-name");
hcard = new hCard(document.getElementById("35-include-pattern.2"));
is(hcard.fn, "James Levine", "35-include-pattern.2 - fn");
is(hcard.n["given-name"][0], "James", "35-include-pattern.2 - given-name");
is(hcard.n["family-name"][0], "Levine", "35-include-pattern.2 - family-name");
is(hcard.org[0]["organization-name"], "SimplyHired", "35-include-pattern.2 - organization-name");
is(hcard.title[0], "Microformat Brainstormer", "35-include-pattern.2 - title");
hcard = new hCard(document.getElementById("35-include-pattern.3"));
is(hcard.fn, "James Levine", "35-include-pattern.3 - fn");
is(hcard.n["given-name"][0], "James", "35-include-pattern.3 - given-name");
is(hcard.n["family-name"][0], "Levine", "35-include-pattern.3 - family-name");
is(hcard.org[0]["organization-name"], "SimplyHired", "35-include-pattern.3 - organization-name");
is(hcard.title[0], "Microformat Brainstormer", "35-include-pattern.3 - title");
hcard = new hCard(document.getElementById("36-categories.1"));
is(hcard.fn, "john doe", "36-categories.1 - fn");
is(hcard.n["given-name"][0], "john", "36-categories.1 - given-name");
is(hcard.n["family-name"][0], "doe", "36-categories.1 - family-name");
is(hcard.category[0], "C1", "36-categories.1 - category");
isnot(hcard.category[0], "C1a", "36-categories.1 - category");
is(hcard.category[1], "C2a", "36-categories.1 - category");
isnot(hcard.category[1], "C2", "36-categories.1 - category");
is(hcard.category[2], "C3", "36-categories.1 - category");
isnot(hcard.category[2], "C3a", "36-categories.1 - category");
isnot(hcard.category[2], "C3b", "36-categories.1 - category");
is(hcard.category[3], "C4", "36-categories.1 - category");
is(hcard.category[4], "C5", "36-categories.1 - category");
isnot(hcard.category[4], "C5a", "36-categories.1 - category");
isnot(hcard.category[4], "C5b", "36-categories.1 - category");
is(hcard.category[5], "C6", "36-categories.1 - category");
isnot(hcard.category[4], "C6a", "36-categories.1 - category");
isnot(hcard.category[4], "C6b", "36-categories.1 - category");
is(hcard.category[6], "C7", "36-categories.1 - category");
isnot(hcard.category[4], "C7a", "36-categories.1 - category");
isnot(hcard.category[4], "C7b", "36-categories.1 - category");
is(hcard.category[7], "C8", "36-categories.1 - category");
isnot(hcard.category[4], "C8a", "36-categories.1 - category");
isnot(hcard.category[4], "C8b", "36-categories.1 - category");
is(hcard.category[8], "C9", "36-categories.1 - category");
isnot(hcard.category[4], "C9a", "36-categories.1 - category");
isnot(hcard.category[4], "C9b", "36-categories.1 - category");
hcard = new hCard(document.getElementById("37-singleton"));
is(hcard.fn, "john doe 1", "37-singleton - fn");
is(hcard.n["given-name"][0], "john", "37-singleton - given-name");
is(hcard.n["family-name"][0], "doe", "37-singleton - family-name");
is(hcard.uid, "unique-id-1", "37-singleton - uid");
is(hcard.tz, "+0600", "37-singleton - tz");
is(hcard["sort-string"], "d", "37-singleton - sort-string");
is(hcard.geo.latitude, "123.45", "37-singleton - geo.latitude");
is(hcard.geo.longitude, "67.89", "37-singleton - geo.longitude");
is(hcard["class"], "public", "37-singleton - class");
is(hcard.bday, "2006-07-07", "37-singleton - bday");
is(hcard.rev, "2006-07-07", "37-singleton - rev");
hcard = new hCard(document.getElementById("38-uid.1"));
is(hcard.fn, "Ryan King", "38-uid.1 - fn");
is(hcard.n["given-name"][0], "Ryan", "38-uid.1 - given-name");
is(hcard.n["family-name"][0], "King", "38-uid.1 - family-name");
is(hcard.uid, "http://theryanking.com/contact/", "38-uid.1 - uid");
is(hcard.url[0], "http://theryanking.com/contact/", "38-uid.1 - url");
hcard = new hCard(document.getElementById("38-uid.2"));
is(hcard.fn, "Ryan King", "38-uid.2 - fn");
is(hcard.n["given-name"][0], "Ryan", "38-uid.2 - given-name");
is(hcard.n["family-name"][0], "King", "38-uid.2 - family-name");
is(hcard.uid, "http://localhost:8888/tests/browser/microformats/test/contact/", "38-uid.2 - uid");
is(hcard.url[0], "http://localhost:8888/tests/browser/microformats/test/contact/", "38-uid.2 - url");
hcard = new hCard(document.getElementById("38-uid.3"));
is(hcard.fn, "Ryan King", "38-uid.3 - fn");
is(hcard.n["given-name"][0], "Ryan", "38-uid.3 - given-name");
is(hcard.n["family-name"][0], "King", "38-uid.3 - family-name");
is(hcard.uid, "http://localhost:8888/tests/browser/microformats/test/contact/", "38-uid.3 - uid");
is(hcard.url[0], "http://localhost:8888/tests/browser/microformats/test/contact/", "38-uid.3 - url");
hcard = new hCard(document.getElementById("38-uid.4"));
is(hcard.fn, "Ryan King", "38-uid.4 - fn");
is(hcard.n["given-name"][0], "Ryan", "38-uid.4 - given-name");
is(hcard.n["family-name"][0], "King", "38-uid.4 - family-name");
is(hcard.uid, "http://theryanking.com/contact/", "38-uid.4 - uid");
is(hcard.url[0], "http://theryanking.com/contact/", "38-uid.4 - url");
hcard = new hCard(document.getElementById("39-noteHTML"));
is(hcard.note[0], "Note", "39-noteHTML - note");
is(hcard.note[0].toHTML(), "<b>Note</b>", "39-noteHTML - note as HTML");
is(hcard.note[0].match("Note"), "Note", "39-noteHTML - match in note");
hcard = new hCard(document.getElementById("email-type"));
is(hcard.email[0].type, "internet", "email - type no value (type)");
is(hcard.email[0].value, "john@example.com", "email - type no value (value)");
}
</script>
</pre>
</body>
</html>