Closed Bug 1154175 Opened 10 years ago Closed 9 years ago

Improve the microformats tests

Categories

(Toolkit Graveyard :: Microformats, defect)

defect
Not set
normal

Tracking

(firefox40 affected)

RESOLVED WONTFIX
Tracking Status
firefox40 --- affected

People

(Reporter: Ms2ger, Assigned: mkaply)

References

Details

> ::: 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.
I'm wondering if we should just pull microformats. It didn't really get any traction in Firefox. Are any addons using them?
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
Closed: 9 years ago
Resolution: --- → WONTFIX
Product: Toolkit → Toolkit Graveyard
You need to log in before you can comment on or make changes to this bug.