mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
#384186 r=sayrer, moa=bsmedberg, a=mconnor Initial Microformats API checkin
This commit is contained in:
parent
0673510071
commit
7e1e48680c
51
toolkit/components/microformats/Makefile.in
Normal file
51
toolkit/components/microformats/Makefile.in
Normal file
@ -0,0 +1,51 @@
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is Microformats.
|
||||
#
|
||||
# The Initial Developer of the Original Code is IBM Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2007
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Mike Kaply
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
DEPTH = ../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DIRS = src
|
||||
|
||||
ifdef MOZ_MOCHITEST
|
||||
DIRS += tests
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
48
toolkit/components/microformats/src/Makefile.in
Normal file
48
toolkit/components/microformats/src/Makefile.in
Normal file
@ -0,0 +1,48 @@
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is Microformats.
|
||||
#
|
||||
# The Initial Developer of the Original Code IBM Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2007
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Mike Kaply
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
DEPTH = ../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = microformats
|
||||
|
||||
EXTRA_JS_MODULES = Microformats.js
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
1658
toolkit/components/microformats/src/Microformats.js
Normal file
1658
toolkit/components/microformats/src/Microformats.js
Normal file
File diff suppressed because it is too large
Load Diff
54
toolkit/components/microformats/tests/Makefile.in
Normal file
54
toolkit/components/microformats/tests/Makefile.in
Normal file
@ -0,0 +1,54 @@
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is Microformats.
|
||||
#
|
||||
# The Initial Developer of the Original Code IBM Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2007
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Mike Kaply
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
DEPTH = ../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
_TEST_FILES = \
|
||||
test_Microformats.html \
|
||||
test_Microformats_hCard.html \
|
||||
test_Microformats_geo.html \
|
||||
test_Microformats_hCalendar.html \
|
||||
$(NULL)
|
||||
|
||||
libs:: $(_TEST_FILES)
|
||||
$(INSTALL) $^ $(DEPTH)/_tests/testing/mochitest/tests/browser/microformats/test
|
51
toolkit/components/microformats/tests/test_Microformats.html
Normal file
51
toolkit/components/microformats/tests/test_Microformats.html
Normal file
@ -0,0 +1,51 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Testing Microformats.js</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">
|
||||
<div class="vcard" id="vcard1_node">
|
||||
<a class="url fn" href="http://tantek.com/">Tantek Çelik</a>
|
||||
<div id="vcard1_org" class="org">Technorati</div>
|
||||
</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");
|
||||
var hCards = Microformats.get("hCard", document, false);
|
||||
is(hCards.length, 1, "Check Microformats.get");
|
||||
is(Microformats.count("hCard", document, false), 1, "Check Microformats.count");
|
||||
ok(Microformats.isMicroformat(document.getElementById("vcard1_node")), "Check isMicroformat");
|
||||
is(Microformats.getParent(document.getElementById("vcard1_org")), document.getElementById("vcard1_node"), "Check getParent");
|
||||
is(Microformats.getNamesFromNode(document.getElementById("vcard1_node")), "hCard", "Check getNamesFromNode");
|
||||
|
||||
}
|
||||
|
||||
function test_hCard() {
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
Components.utils.import("resource://gre/modules/Microformats.js");
|
||||
|
||||
var hCards = Microformats.get("hCard", document, false);
|
||||
|
||||
is(hCards[0].fn, "Tantek Çelik", "Check for fn on test vcard");
|
||||
is(hCards[0].url, "http://tantek.com/", "Check for url on test vcard");
|
||||
}
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,67 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
|
||||
<title>Testing Microformats.js (geo)</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">
|
||||
|
||||
<span class="geo" id="01-geo-basic">
|
||||
<span class="latitude">37.77</span>
|
||||
<span class="longitude">-122.411</span>
|
||||
</span>
|
||||
|
||||
|
||||
<span class="geo" id="01-geo-abbr-latlong" >
|
||||
<abbr class="latitude" title="37.77">Northern</abbr>
|
||||
<abbr class="longitude" title="-122.41">California</abbr>
|
||||
</span>
|
||||
|
||||
<abbr class="geo" id="01-geo-abbr" title="30.267991;-97.739568">Paradise</abbr>
|
||||
|
||||
</div>
|
||||
<pre id="test">
|
||||
<script class="testbody" type="text/javascript">
|
||||
|
||||
test_Microformats();
|
||||
test_geo();
|
||||
|
||||
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_geo() {
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
Components.utils.import("resource://gre/modules/Microformats.js");
|
||||
|
||||
var Geo;
|
||||
|
||||
Geo = new geo(document.getElementById("01-geo-basic"));
|
||||
|
||||
is(Geo.latitude, "37.77", "01-geo-basic - latitude");
|
||||
is(Geo.longitude, "-122.411", "01-geo-basic - longitude");
|
||||
|
||||
Geo = new geo(document.getElementById("01-geo-abbr-latlong"));
|
||||
|
||||
is(Geo.latitude, "37.77", "02-geo-abbr-latlong - latitude");
|
||||
is(Geo.longitude, "-122.41", "02-geo-abbr-latlong - longitude");
|
||||
|
||||
Geo = new geo(document.getElementById("01-geo-abbr"));
|
||||
|
||||
is(Geo.latitude, "30.267991", "01-geo-abbr - latitude");
|
||||
is(Geo.longitude, "-97.739568", "01-geo-abbr - longitude");
|
||||
}
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,303 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
|
||||
<title>Testing Microformats.js (hCalendar)</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://hg.microformats.org/tests
|
||||
|
||||
<div class="vevent" id="01-component-vevent-dtstart-date">
|
||||
<div>Dates: <abbr class="dtstart" title="19970903">September 3, 1997</abbr></div>
|
||||
</div>
|
||||
|
||||
<div class="vevent" id="02-component-vevent-dtstart-datetime">
|
||||
<div>Dates: <abbr class="dtstart" title="19970903T163000Z">September 3, 1997, 16:30</abbr></div>
|
||||
</div>
|
||||
|
||||
<div class="vevent" id="03-component-vevent-dtend-date">
|
||||
<div>Dates: <abbr class="dtstart" title="19970903">September 3, 1997</abbr>
|
||||
<abbr class="dtend" title="19970904">( all day )</abbr></div>
|
||||
</div>
|
||||
|
||||
<div class="vevent" id="04-component-vevent-dtend-datetime">
|
||||
<div>Date: <abbr class="dtstart" title="19970903T160000Z">September 3, 1997 at 4pm</abbr>
|
||||
<abbr class="dtend" title="19970903T180000Z"> for 2 hours.</abbr></div>
|
||||
</div>
|
||||
|
||||
<div class="vcalendar">
|
||||
<span class="vevent" id="05-calendar-simple">
|
||||
<a class="url" href="http://www.web2con.com/">
|
||||
<span class="summary">Web 2.0 Conference</span>:
|
||||
<abbr class="dtstart" title="2005-10-05">October 5</abbr>-
|
||||
<abbr class="dtend" title="2005-10-08">7</abbr>,
|
||||
at the <span class="location">Argent Hotel, San Francisco, CA</span>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<p class="vevent" id="06-component-vevent-uri-relative">
|
||||
<a class="url summary" href="/squidlist/calendar/12279/2006/1/15">Bad Movie Night - Gigli (blame mike spiegelman)</a>
|
||||
<br />
|
||||
<abbr class="dtstart" title="20060115T000000">Sun, Jan 15 : 8pm</abbr>
|
||||
<br />
|
||||
</p>
|
||||
|
||||
<div class="vevent" id="07-component-vevent-description-simple">
|
||||
<div class="description">Project xyz Review Meeting Minutes</div>
|
||||
</div>
|
||||
|
||||
<div class="aaa vevent" id="08-component-vevent-multiple-classes">
|
||||
<a class="bbb url" href="http://www.web2con.com/">
|
||||
<span class="ccc summary">Web 2.0 Conference</span>:
|
||||
<abbr class="ddd dtstart" title="2005-10-05">October 5</abbr>-
|
||||
<abbr class="eee dtend" title="2005-10-08">7</abbr>,
|
||||
at the <span class="fff location">Argent Hotel, San Francisco, CA</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<ul>
|
||||
<li class="vevent" id="09-component-vevent-summary-in-img-alt">
|
||||
<a class="url" href="http://conferences.oreillynet.com/et2006/">
|
||||
<img style="display:block" class="summary"
|
||||
src="http://conferences.oreillynet.com/images/et2005/logo_sm.gif"
|
||||
alt="O'Reilly Emerging Technology Conference" />
|
||||
<abbr class="dtstart" title="20060306">
|
||||
3/6</abbr>-<abbr class="dtend" title="20060310">9</abbr>
|
||||
@
|
||||
<span class="location">
|
||||
Manchester Grand Hyatt in San Diego, CA
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="vcalendar">
|
||||
<div class="vevent" id="10-component-vevent-entity">
|
||||
<div class="summary">Cricket & Tennis Centre</div>
|
||||
<div class="description">Melbourne's Cricket & Tennis Centres are in the heart of the city</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="schedule vevent" id="11-component-vevent-summary-in-subelements">
|
||||
<span class="summary">
|
||||
<span style="font-weight:bold; color: #3E4876;">Welcome!</span>
|
||||
<a href="/cs/web2005/view/e_spkr/1852">John Battelle</a>,
|
||||
<a href="/cs/web2005/view/e_spkr/416">Tim O'Reilly</a>
|
||||
</span>
|
||||
<br />
|
||||
<b>Time:</b>
|
||||
<abbr class="dtstart" title="20051005T1630-0700">4:30pm</abbr>-
|
||||
<abbr class="dtend" title="20051005T1645-0700">4:45pm
|
||||
</abbr>
|
||||
</p>
|
||||
|
||||
<p class="vevent" id="12-component-vevent-summary-url-in-same-class">
|
||||
<a class="url summary" href="http://www.laughingsquid.com/squidlist/calendar/12377/2006/1/25">Art Reception for Tom Schultz and Felix Macnee</a>
|
||||
<br />
|
||||
<abbr class="dtstart" title="20060125T000000">Wed, Jan 25 : 6:00 pm - 9:00 pm</abbr>
|
||||
<br />
|
||||
</p>
|
||||
|
||||
<div class="vcalendar">
|
||||
<div class="vevent" id="13-component-vevent-summary-url-property">
|
||||
<span class="summary">
|
||||
<a class="url" href="http://dps1.travelocity.com/dparcobrand.ctl?smls=Y&Service=YHOE&.intl=us&aln_name=AA&flt_num=1655&dep_arp_name=&arr_arp_name=&dep_dt_dy_1=23&dep_dt_mn_1=Jan&dep_dt_yr_1=2006&dep_tm_1=9:00am">ORD-SFO/AA 1655</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="vcalendar">
|
||||
<span class="vevent" id="15-calendar-xml-lang">
|
||||
<a class="url" href="http://www.web2con.com/">
|
||||
<span class="summary">Web 2.0 Conference</span>:
|
||||
<abbr class="dtstart" title="2005-10-05">October 5</abbr>-
|
||||
<abbr class="dtend" title="2005-10-08">7</abbr>,
|
||||
at the <span class="location">Argent Hotel, San Francisco, CA</span>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="vcalendar">
|
||||
<span class="vevent" id="16-calendar-force-outlook">
|
||||
<a class="url" href="http://www.web2con.com/">
|
||||
<abbr class="dtstart" title="2005-10-05">October 5</abbr>-
|
||||
<abbr class="dtend" title="2005-10-08">7</abbr>,
|
||||
at the <span class="location">Argent Hotel, San Francisco, CA</span>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<p class="vevent" id="17-component-vevent-description-value-in-subelements">
|
||||
<span class="description">
|
||||
RESOLUTION: to have a
|
||||
<b class="summary">3rd PAW ftf meeting</b>
|
||||
<abbr class="dtstart" title="2006-01-18">18</abbr>-<abbr class="dtend" title="2006-01-20">19 Jan</abbr> in
|
||||
<em class="location">Maryland</em>; location contingent on confirmation from timbl</span>
|
||||
</p>
|
||||
|
||||
<div class="vevent" id="18-component-vevent-uid.1">
|
||||
<div>UID: <span class="uid">http://example.com/foo.html</span></div>
|
||||
</div>
|
||||
<div class="vevent" id="18-component-vevent-uid.2">
|
||||
UID: <a class="uid" href="http://example.com/foo.html">another hcal event</a>
|
||||
</div>
|
||||
|
||||
<div class="vevent" id="18-component-vevent-uid.3">
|
||||
UID: <object class="uid" data="http://example.com/foo.html">another hcal event</object>
|
||||
</div>
|
||||
|
||||
<div class="vevent" id="18-component-vevent-uid.4">
|
||||
UID: <map id="foo"><area alt="uid" class="uid" href="http://example.com/foo.html" /></map>
|
||||
</div>
|
||||
|
||||
<div class="vevent" id="18-component-vevent-uid.5">
|
||||
UID: <img class="uid" alt="uid" src="http://example.com/foo.html" />
|
||||
</div>
|
||||
|
||||
<div class="vcalendar">
|
||||
<div class="vevent" id="19-calendar-attachments">
|
||||
<div>Start Time: <abbr class="dtstart" title="19970324T123000Z">March 24, 1997 12:30 UTC</abbr></div>
|
||||
<div class="summary">Calendaring Interoperability Planning Meeting</div>
|
||||
|
||||
<div>Attachments:
|
||||
<ul>
|
||||
<li><a class="attach" href="http://microformats.org/img/logo.gif">microformats logo</a></li>
|
||||
<li><a class="attach" type="application/postscript" href="ftp://xyzCorp.com/pub/conf/bkgrnd.ps">ftp://xyzCorp.com/pub/conf/bkgrnd.ps</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</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 hcalendar;
|
||||
|
||||
hcalendar = new hCalendar(document.getElementById("01-component-vevent-dtstart-date"));
|
||||
|
||||
is(hcalendar.dtstart, "1997-09-03", "01-component-vevent-dtstart-date - dtstart");
|
||||
|
||||
hcalendar = new hCalendar(document.getElementById("02-component-vevent-dtstart-datetime"));
|
||||
|
||||
is(hcalendar.dtstart, "1997-09-03T16:30:00Z", "02-component-vevent-dtstart-datetime - dtstart");
|
||||
|
||||
hcalendar = new hCalendar(document.getElementById("03-component-vevent-dtend-date"));
|
||||
|
||||
is(hcalendar.dtstart, "1997-09-03", "03-component-vevent-dtend-date - dtstart");
|
||||
is(hcalendar.dtend, "1997-09-04", "03-component-vevent-dtend-date - dtend");
|
||||
|
||||
|
||||
hcalendar = new hCalendar(document.getElementById("04-component-vevent-dtend-datetime"));
|
||||
|
||||
is(hcalendar.dtstart, "1997-09-03T16:00:00Z", "04-component-vevent-dtend-datetime - dtstart");
|
||||
is(hcalendar.dtend, "1997-09-03T18:00:00Z", "04-component-vevent-dtend-datetime - dtend");
|
||||
|
||||
hcalendar = new hCalendar(document.getElementById("05-calendar-simple"));
|
||||
|
||||
is(hcalendar.dtstart, "2005-10-05", "05-calendar-simple - dtstart");
|
||||
is(hcalendar.dtend, "2005-10-08", "05-calendar-simple - dtend");
|
||||
is(hcalendar.url, "http://www.web2con.com/", "05-calendar-simple - url");
|
||||
is(hcalendar.summary, "Web 2.0 Conference", "05-calendar-simple - summary");
|
||||
is(hcalendar.location, "Argent Hotel, San Francisco, CA", "05-calendar-simple - location");
|
||||
|
||||
hcalendar = new hCalendar(document.getElementById("06-component-vevent-uri-relative"));
|
||||
is(hcalendar.url, "http://localhost:8888/squidlist/calendar/12279/2006/1/15", "06-component-vevent-uri-relative - url");
|
||||
is(hcalendar.summary, "Bad Movie Night - Gigli (blame mike spiegelman)", "06-component-vevent-uri-relative - summary");
|
||||
is(hcalendar.dtstart, "2006-01-15T00:00:00", "06-component-vevent-uri-relative - dtstart");
|
||||
|
||||
hcalendar = new hCalendar(document.getElementById("07-component-vevent-description-simple"));
|
||||
is(hcalendar.description, "Project xyz Review Meeting Minutes", "07-component-vevent-description-simple - description");
|
||||
|
||||
hcalendar = new hCalendar(document.getElementById("08-component-vevent-multiple-classes"));
|
||||
is(hcalendar.dtstart, "2005-10-05", "08-component-vevent-multiple-classes - dtstart");
|
||||
is(hcalendar.dtend, "2005-10-08", "08-component-vevent-multiple-classes - dtend");
|
||||
is(hcalendar.url, "http://www.web2con.com/", "08-component-vevent-multiple-classes - url");
|
||||
is(hcalendar.summary, "Web 2.0 Conference", "08-component-vevent-multiple-classes - summary");
|
||||
is(hcalendar.location, "Argent Hotel, San Francisco, CA", "08-component-vevent-multiple-classes - location");
|
||||
|
||||
hcalendar = new hCalendar(document.getElementById("09-component-vevent-summary-in-img-alt"));
|
||||
is(hcalendar.dtstart, "2006-03-06", "09-component-vevent-summary-in-img-alt - dtstart");
|
||||
is(hcalendar.dtend, "2006-03-10", "09-component-vevent-summary-in-img-alt - dtend");
|
||||
is(hcalendar.url, "http://conferences.oreillynet.com/et2006/", "09-component-vevent-summary-in-img-alt - url");
|
||||
is(hcalendar.summary, "O'Reilly Emerging Technology Conference", "09-component-vevent-summary-in-img-alt - summary");
|
||||
is(hcalendar.location, "Manchester Grand Hyatt in San Diego, CA", "09-component-vevent-summary-in-img-alt - location");
|
||||
|
||||
hcalendar = new hCalendar(document.getElementById("10-component-vevent-entity"));
|
||||
is(hcalendar.summary, "Cricket & Tennis Centre", "10-component-vevent-entity - summary");
|
||||
is(hcalendar.description, "Melbourne's Cricket & Tennis Centres are in the heart of the city", "10-component-vevent-entity - description");
|
||||
|
||||
hcalendar = new hCalendar(document.getElementById("11-component-vevent-summary-in-subelements"));
|
||||
is(hcalendar.dtstart, "2005-10-05T16:30:00-0700", "11-component-vevent-summary-in-subelements - dtstart");
|
||||
is(hcalendar.dtend, "2005-10-05T16:45:00-0700", "11-component-vevent-summary-in-subelements - dtend");
|
||||
is(hcalendar.summary, "Welcome! John Battelle, Tim O'Reilly", "11-component-vevent-summary-in-subelements - summary");
|
||||
|
||||
hcalendar = new hCalendar(document.getElementById("12-component-vevent-summary-url-in-same-class"));
|
||||
is(hcalendar.dtstart, "2006-01-25T00:00:00", "12-component-vevent-summary-url-in-same-class - dtstart");
|
||||
is(hcalendar.summary, "Art Reception for Tom Schultz and Felix Macnee", "12-component-vevent-summary-url-in-same-class - summary");
|
||||
is(hcalendar.url, "http://www.laughingsquid.com/squidlist/calendar/12377/2006/1/25", "12-component-vevent-summary-url-in-same-class - url");
|
||||
|
||||
hcalendar = new hCalendar(document.getElementById("13-component-vevent-summary-url-property"));
|
||||
is(hcalendar.summary, "ORD-SFO/AA 1655", "13-component-vevent-summary-url-property - summary");
|
||||
is(hcalendar.url, "http://dps1.travelocity.com/dparcobrand.ctl?smls=Y&Service=YHOE&.intl=us&aln_name=AA&flt_num=1655&dep_arp_name=&arr_arp_name=&dep_dt_dy_1=23&dep_dt_mn_1=Jan&dep_dt_yr_1=2006&dep_tm_1=9:00am", "13-component-vevent-summary-url-property - url");
|
||||
|
||||
hcalendar = new hCalendar(document.getElementById("15-calendar-xml-lang"));
|
||||
is(hcalendar.dtend, "2005-10-08", "15-calendar-xml-lang - dtend");
|
||||
is(hcalendar.dtstart, "2005-10-05", "15-calendar-xml-lang - dtstart");
|
||||
is(hcalendar.location, "Argent Hotel, San Francisco, CA", "15-calendar-xml-lang - location");
|
||||
is(hcalendar.summary, "Web 2.0 Conference", "15-calendar-xml-lang - summary");
|
||||
is(hcalendar.url, "http://www.web2con.com/", "15-calendar-xml-lang - url");
|
||||
|
||||
hcalendar = new hCalendar(document.getElementById("16-calendar-force-outlook"));
|
||||
is(hcalendar.dtend, "2005-10-08", "16-calendar-force-outlook - dtend");
|
||||
is(hcalendar.dtstart, "2005-10-05", "16-calendar-force-outlook - dtstart");
|
||||
is(hcalendar.location, "Argent Hotel, San Francisco, CA", "16-calendar-force-outlook - location");
|
||||
is(hcalendar.url, "http://www.web2con.com/", "16-calendar-force-outlook - url");
|
||||
|
||||
hcalendar = new hCalendar(document.getElementById("17-component-vevent-description-value-in-subelements"));
|
||||
is(hcalendar.description, "RESOLUTION: to have a 3rd PAW ftf meeting 18-19 Jan in Maryland; location contingent on confirmation from timbl", "17-component-vevent-description-value-in-subelements - description");
|
||||
is(hcalendar.dtstart, "2006-01-18", "17-component-vevent-description-value-in-subelements - dtstart");
|
||||
is(hcalendar.dtend, "2006-01-20", "17-component-vevent-description-value-in-subelements - dtend");
|
||||
is(hcalendar.location, "Maryland", "17-component-vevent-description-value-in-subelements - location");
|
||||
is(hcalendar.summary, "3rd PAW ftf meeting", "17-component-vevent-description-value-in-subelements - summary");
|
||||
|
||||
hcalendar = new hCalendar(document.getElementById("18-component-vevent-uid.1"));
|
||||
|
||||
hcalendar = new hCalendar(document.getElementById("18-component-vevent-uid.2"));
|
||||
|
||||
hcalendar = new hCalendar(document.getElementById("18-component-vevent-uid.3"));
|
||||
|
||||
hcalendar = new hCalendar(document.getElementById("18-component-vevent-uid.4"));
|
||||
|
||||
hcalendar = new hCalendar(document.getElementById("18-component-vevent-uid.5"));
|
||||
|
||||
hcalendar = new hCalendar(document.getElementById("19-calendar-attachments"));
|
||||
}
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
1125
toolkit/components/microformats/tests/test_Microformats_hCard.html
Normal file
1125
toolkit/components/microformats/tests/test_Microformats_hCard.html
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user