Improve the microformats tests

RESOLVED WONTFIX

Status

()

Toolkit
Microformats
RESOLVED WONTFIX
3 years ago
2 years ago

People

(Reporter: Ms2ger, Assigned: mkaply)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(firefox40 affected)

Details

(Reporter)

Description

3 years ago
> ::: toolkit/components/microformats/tests/test_Microformats.html
> @@ +252,5 @@
> >    origdate = Microformats.iso8601FromDate(jsdate, true);
> >    is(dateCal.dtstart, origdate, "date round trip");
> >  
> >    var dateCal = new hCalendar(document.getElementById("vcal_vcard"));
> > +  is(String(dateCal.description), "Mozilla's Birthday", "vcard in vcal");
> 
> Add the same sort of isOneElementArrayContaining helper and use that in all
> this file's changes.
> 
> ::: toolkit/components/microformats/tests/test_Microformats_hCalendar.html
> @@ +229,5 @@
> >    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(String(hcalendar.description), "Project xyz Review Meeting Minutes", "07-component-vevent-description-simple - description");
> 
> Add a helper
> 
> function isOneElementArrayContaining(arr, contents, msg)
> {
>   is(arr.length, 1, msg + ": length must be 1");
>   is(arr[0], contents, msg + ": must contain expected value");
> }
> 
> Then use that all three locations in this test.  Please have a microformats
> person review this, tho -- I couldn't be 100% certain from specs that the
> description item was supposed to be a list.
>
> ::: toolkit/components/microformats/tests/test_Microformats_hCard.html
> @@ +575,5 @@
> >  
> >    hcard = new hCard(document.getElementById("01-tantek-basic"));
> >  
> >    is(hcard.fn, "Tantek Çelik", "01-tantek-basic - fn");
> > +  is(String(hcard.url), "http://tantek.com/", "01-tantek-basic - url");
> 
> ...okay, this file *really* wants that helper function, rather than casting
> arrays to strings a hundred times or so.
(Assignee)

Comment 1

3 years ago
I'm wondering if we should just pull microformats. It didn't really get any traction in Firefox.

Are any addons using them?
(Reporter)

Comment 2

3 years ago
I vaguely remember using an addon that exposed them in a toolbar, but that's years ago and never really did something useful. Also not sure if that used this code.
new tests landed in bug 1037483
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.