зеркало из https://github.com/mozilla/gecko-dev.git
Bug 432611: given-name and family-name should be plural properties, patch by Michael Kaply <mozilla@kaply.com>, r=sayrer, a=schrep
This commit is contained in:
Родитель
441fde1d13
Коммит
2122ff8702
|
@ -1281,11 +1281,13 @@ var hCard_definition = {
|
|||
plural: true
|
||||
},
|
||||
"given-name" : {
|
||||
plural: true
|
||||
},
|
||||
"additional-name" : {
|
||||
plural: true
|
||||
},
|
||||
"family-name" : {
|
||||
plural: true
|
||||
},
|
||||
"honorific-suffix" : {
|
||||
plural: true
|
||||
|
@ -1297,23 +1299,23 @@ var hCard_definition = {
|
|||
virtualGetter: function(mfnode) {
|
||||
var fn = Microformats.parser.getMicroformatProperty(mfnode, "hCard", "fn");
|
||||
var orgs = Microformats.parser.getMicroformatProperty(mfnode, "hCard", "org");
|
||||
var given_name;
|
||||
var family_name;
|
||||
var given_name = [];
|
||||
var family_name = [];
|
||||
if (fn && (!orgs || (orgs.length > 1) || (fn != orgs[0]["organization-name"]))) {
|
||||
var fns = fn.split(" ");
|
||||
if (fns.length === 2) {
|
||||
if (fns[0].charAt(fns[0].length-1) == ',') {
|
||||
given_name = fns[1];
|
||||
family_name = fns[0].substr(0, fns[0].length-1);
|
||||
given_name[0] = fns[1];
|
||||
family_name[0] = fns[0].substr(0, fns[0].length-1);
|
||||
} else if (fns[1].length == 1) {
|
||||
given_name = fns[1];
|
||||
family_name = fns[0];
|
||||
given_name[0] = fns[1];
|
||||
family_name[0] = fns[0];
|
||||
} else if ((fns[1].length == 2) && (fns[1].charAt(fns[1].length-1) == '.')) {
|
||||
given_name = fns[1];
|
||||
family_name = fns[0];
|
||||
given_name[0] = fns[1];
|
||||
family_name[0] = fns[0];
|
||||
} else {
|
||||
given_name = fns[0];
|
||||
family_name = fns[1];
|
||||
given_name[0] = fns[0];
|
||||
family_name[0] = fns[1];
|
||||
}
|
||||
return {"given-name" : given_name, "family-name" : family_name};
|
||||
}
|
||||
|
|
|
@ -566,75 +566,75 @@ function test_hCard() {
|
|||
|
||||
is(hcard.fn, "Tantek Çelik", "01-tantek-basic - fn");
|
||||
is(hcard.url, "http://tantek.com/", "01-tantek-basic - url");
|
||||
is(hcard.n["given-name"], "Tantek", "01-tantek-basic - given-name");
|
||||
is(hcard.n["family-name"], "Çelik", "01-tantek-basic - family-name");
|
||||
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"], "Ryan", "02-multiple-class-names-on-vcard.1 - given-name");
|
||||
is(hcard.n["family-name"], "King", "02-multiple-class-names-on-vcard.1 - family-name");
|
||||
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"], "Ryan", "02-multiple-class-names-on-vcard.2 - given-name");
|
||||
is(hcard.n["family-name"], "King", "02-multiple-class-names-on-vcard.2 - family-name");
|
||||
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"], "Ryan", "02-multiple-class-names-on-vcard.3 - given-name");
|
||||
is(hcard.n["family-name"], "King", "02-multiple-class-names-on-vcard.3 - family-name");
|
||||
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"], "Ryan", "03-implied-n.1 - given-name");
|
||||
is(hcard.n["family-name"], "King", "03-implied-n.1 - family-name");
|
||||
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"], "Ryan", "03-implied-n.2 - given-name");
|
||||
is(hcard.n["family-name"], "King", "03-implied-n.2 - family-name");
|
||||
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"], "Ryan", "03-implied-n.3 - given-name");
|
||||
is(hcard.n["family-name"], "King", "03-implied-n.3 - family-name");
|
||||
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"], "Brian", "03-implied-n.4 - given-name");
|
||||
is(hcard.n["family-name"], "Suda", "03-implied-n.4 - family-name");
|
||||
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"], "Ryan", "03-implied-n.5 - given-name");
|
||||
is(hcard.n["family-name"], "King", "03-implied-n.5 - family-name");
|
||||
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"], "R", "03-implied-n.6 - given-name");
|
||||
is(hcard.n["family-name"], "King", "03-implied-n.6 - family-name");
|
||||
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"], "R", "03-implied-n.7 - given-name");
|
||||
is(hcard.n["family-name"], "King", "03-implied-n.7 - family-name");
|
||||
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"], "R.", "03-implied-n.8 - given-name");
|
||||
is(hcard.n["family-name"], "King", "03-implied-n.8 - family-name");
|
||||
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"));
|
||||
|
||||
|
@ -649,67 +649,67 @@ function test_hCard() {
|
|||
hcard = new hCard(document.getElementById("04-ignore-unknowns"));
|
||||
|
||||
is(hcard.fn, "Ryan King", "04-ignore-unknowns - fn");
|
||||
is(hcard.n["given-name"], "Ryan", "04-ignore-unknowns - given-name");
|
||||
is(hcard.n["family-name"], "King", "04-ignore-unknowns - family-name");
|
||||
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"], "Ryan", "05-mailto-1 - given-name");
|
||||
is(hcard.n["family-name"], "King", "05-mailto-1 - family-name");
|
||||
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"], "Brian", "06-mailto-2 - given-name");
|
||||
is(hcard.n["family-name"], "Suda", "06-mailto-2 - family-name");
|
||||
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"], "John", "07-relative-url - given-name");
|
||||
is(hcard.n["family-name"], "Doe", "07-relative-url - family-name");
|
||||
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"], "John", "11-multiple-urls - given-name");
|
||||
is(hcard.n["family-name"], "Doe", "11-multiple-urls - family-name");
|
||||
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"], "John", "12-img-src-url - given-name");
|
||||
is(hcard.n["family-name"], "Doe", "12-img-src-url - family-name");
|
||||
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"], "John", "13-photo-logo - given-name");
|
||||
is(hcard.n["family-name"], "Doe", "13-photo-logo - family-name");
|
||||
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"], "John", "14-img-src-data-url - given-name");
|
||||
is(hcard.n["family-name"], "Doe", "14-img-src-data-url - family-name");
|
||||
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,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAMAAAAp4XiDAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAASUExURf///8zMzJmZmWZmZjMzMwAAAPOPemkAAAM1SURBVHjaYmBgYGBkYQUBFkYWFiCPCchixQAMCCZAACF0MAMVM4K4TFh0IGsBCCAkOxhYmBnAAKaHhZkZmxaAAGJgYIbpYGBihGgBWsTMzMwE4jIhaWGAYoAAYmCECDExYAcwGxkg5oNIgABigDqLARdgZmGB2wICrKwAAcSA3xKgIxlZ0PwCEEAMBCxhgHoWSQtAADFAAxgfYEJ1GEAAQbQw4tUCsocBYQVAADEgu4uRkREeUCwszEwwLhOKLQABhNDCBA4aSDgwwhIAJKqYUPwCEEAMUK/AUwnc9aywJMCI7DAgAAggBohZ8JTBhGIJzCoWZL8ABBCYidAB8RUjWppkYUG2BSCAGMDqEMZiswUtXgACiAHsFYixTMywGGLGpgUWYgABxAA2mQkWCMyMqFoYmdD8ACQAAogBHJHMrCxg1cyIiICmCkYWDFsAAgiihYmZCewFFpR0BfI3LLch+QUggBiQ0iQjEyMDmh54qCBlUIAAYsCRJsElADQvgWKTlRGeKwECiAF3XgGmMEYQYADZzcoA9z5AAMG9RQCAtEC9DxBADFiyFyMjVi0wABBAWLQwQdIiuhYGWJIACCBg+KKUJ9BoBRdS2LQALQMIIGDQIEmwAO1kYcVWHCDZAhBAqFqYmOAxj2YNtAwDAYAAYmDEiBYWzHKKkRERYiwAAYSphZEZwxZGZiZQVEJTJkAAMTCyokc7M5oORlC5wcoEjxeAAAJqQXU0UB6W5WFmABMtEzMi1wEEEFAbE0YyAUuzMMEsYQalMkQSBQggUDmNPU3C9IA4LCxI+QUggEBiKOU8yExgqccCL3chnkPKlQABhGo6ejHBDKmdUHMlQAAhhQvQaGZGkBIkjcAMywLmI+VKgABCSowsTJhZkhlWXiBpAQggYBqBZl9GVOdBcz0LZqEEEEAMqLULMBLg1THWog9IAwQQA0qiZcRW5aPbAhBADCg1El4tMAAQQAxoiZYZXnTh1AIQQAzo2QlYpDDjcBgrxGEAAcSAJTthswmiBUwDBBC2GpkZJTaRvQ+mAQKIAUuuxdZWQvILQABBmSxMjBj5EpcWgACCMoFOYYSpZyHQHgMIMACt2hmoVEikCQAAAABJRU5ErkJggg==", "14-img-src-data-url - logo");
|
||||
is(hcard.photo, "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAMAAAAp4XiDAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAASUExURf///8zMzJmZmWZmZjMzMwAAAPOPemkAAAM1SURBVHjaYmBgYGBkYQUBFkYWFiCPCchixQAMCCZAACF0MAMVM4K4TFh0IGsBCCAkOxhYmBnAAKaHhZkZmxaAAGJgYIbpYGBihGgBWsTMzMwE4jIhaWGAYoAAYmCECDExYAcwGxkg5oNIgABigDqLARdgZmGB2wICrKwAAcSA3xKgIxlZ0PwCEEAMBCxhgHoWSQtAADFAAxgfYEJ1GEAAQbQw4tUCsocBYQVAADEgu4uRkREeUCwszEwwLhOKLQABhNDCBA4aSDgwwhIAJKqYUPwCEEAMUK/AUwnc9aywJMCI7DAgAAggBohZ8JTBhGIJzCoWZL8ABBCYidAB8RUjWppkYUG2BSCAGMDqEMZiswUtXgACiAHsFYixTMywGGLGpgUWYgABxAA2mQkWCMyMqFoYmdD8ACQAAogBHJHMrCxg1cyIiICmCkYWDFsAAgiihYmZCewFFpR0BfI3LLch+QUggBiQ0iQjEyMDmh54qCBlUIAAYsCRJsElADQvgWKTlRGeKwECiAF3XgGmMEYQYADZzcoA9z5AAMG9RQCAtEC9DxBADFiyFyMjVi0wABBAWLQwQdIiuhYGWJIACCBg+KKUJ9BoBRdS2LQALQMIIGDQIEmwAO1kYcVWHCDZAhBAqFqYmOAxj2YNtAwDAYAAYmDEiBYWzHKKkRERYiwAAYSphZEZwxZGZiZQVEJTJkAAMTCyokc7M5oORlC5wcoEjxeAAAJqQXU0UB6W5WFmABMtEzMi1wEEEFAbE0YyAUuzMMEsYQalMkQSBQggUDmNPU3C9IA4LCxI+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"], "John", "15-honorific-additional-single - given-name");
|
||||
is(hcard.n["family-name"], "Doe", "15-honorific-additional-single - family-name");
|
||||
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");
|
||||
|
@ -717,8 +717,8 @@ function test_hCard() {
|
|||
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"], "John", "16-honorific-additional-multiple - given-name");
|
||||
is(hcard.n["family-name"], "Doe", "16-honorific-additional-multiple - family-name");
|
||||
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");
|
||||
|
@ -729,15 +729,15 @@ function test_hCard() {
|
|||
hcard = new hCard(document.getElementById("17-email-not-uri"));
|
||||
|
||||
is(hcard.fn, "John Doe", "17-email-not-uri - fn");
|
||||
is(hcard.n["given-name"], "John", "17-email-not-uri - given-name");
|
||||
is(hcard.n["family-name"], "Doe", "17-email-not-uri - family-name");
|
||||
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"], "John", "18-object-data-http-uri - given-name");
|
||||
is(hcard.n["family-name"], "Doe", "18-object-data-http-uri - family-name");
|
||||
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");
|
||||
|
@ -745,8 +745,8 @@ function test_hCard() {
|
|||
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"], "John", "19-object-data-data-uri - given-name");
|
||||
is(hcard.n["family-name"], "Doe", "19-object-data-data-uri - family-name");
|
||||
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///8zMzJmZmWZmZjMzMwAAAPOPemkAAAM1SURBVHjaYmBgYGBkYQUBFkYWFiCPCchixQAMCCZAACF0MAMVM4K4TFh0IGsBCCAkOxhYmBnAAKaHhZkZmxaAAGJgYIbpYGBihGgBWsTMzMwE4jIhaWGAYoAAYmCECDExYAcwGxkg5oNIgABigDqLARdgZmGB2wICrKwAAcSA3xKgIxlZ0PwCEEAMBCxhgHoWSQtAADFAAxgfYEJ1GEAAQbQw4tUCsocBYQVAADEgu4uRkREeUCwszEwwLhOKLQABhNDCBA4aSDgwwhIAJKqYUPwCEEAMUK/AUwnc9aywJMCI7DAgAAggBohZ8JTBhGIJzCoWZL8ABBCYidAB8RUjWppkYUG2BSCAGMDqEMZiswUtXgACiAHsFYixTMywGGLGpgUWYgABxAA2mQkWCMyMqFoYmdD8ACQAAogBHJHMrCxg1cyIiICmCkYWDFsAAgiihYmZCewFFpR0BfI3LLch+QUggBiQ0iQjEyMDmh54qCBlUIAAYsCRJsElADQvgWKTlRGeKwECiAF3XgGmMEYQYADZzcoA9z5AAMG9RQCAtEC9DxBADFiyFyMjVi0wABBAWLQwQdIiuhYGWJIACCBg+KKUJ9BoBRdS2LQALQMIIGDQIEmwAO1kYcVWHCDZAhBAqFqYmOAxj2YNtAwDAYAAYmDEiBYWzHKKkRERYiwAAYSphZEZwxZGZiZQVEJTJkAAMTCyokc7M5oORlC5wcoEjxeAAAJqQXU0UB6W5WFmABMtEzMi1wEEEFAbE0YyAUuzMMEsYQalMkQSBQggUDmNPU3C9IA4LCxI+QUggEBiKOU8yExgqccCL3chnkPKlQABhGo6ejHBDKmdUHMlQAAhhQvQaGZGkBIkjcAMywLmI+VKgABCSowsTJhZkhlWXiBpAQggYBqBZl9GVOdBcz0LZqEEEEAMqLULMBLg1THWog9IAwQQA0qiZcRW5aPbAhBADCg1El4tMAAQQAxoiZYZXnTh1AIQQAzo2QlYpDDjcBgrxGEAAcSAJTthswmiBUwDBBC2GpkZJTaRvQ+mAQKIAUuuxdZWQvILQABBmSxMjBj5EpcWgACCMoFOYYSpZyHQHgMIMACt2hmoVEikCQAAAABJRU5ErkJggg==", "19-object-data-data-uri - photo");
|
||||
|
||||
|
@ -754,16 +754,16 @@ function test_hCard() {
|
|||
hcard = new hCard(document.getElementById("20-image-alt"));
|
||||
|
||||
is(hcard.fn, "John Doe", "20-image-alt - fn");
|
||||
is(hcard.n["given-name"], "John", "20-image-alt - given-name");
|
||||
is(hcard.n["family-name"], "Doe", "20-image-alt - family-name");
|
||||
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"], "John", "21-tel - given-name");
|
||||
is(hcard.n["family-name"], "Doe", "21-tel - family-name");
|
||||
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");
|
||||
|
@ -794,8 +794,8 @@ function test_hCard() {
|
|||
hcard = new hCard(document.getElementById("22-adr"));
|
||||
|
||||
is(hcard.fn, "John Doe", "22-adr - fn");
|
||||
is(hcard.n["given-name"], "John", "22-adr - given-name");
|
||||
is(hcard.n["family-name"], "Doe", "22-adr - family-name");
|
||||
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");
|
||||
|
@ -830,8 +830,8 @@ function test_hCard() {
|
|||
hcard = new hCard(document.getElementById("23-abbr-title-everything"));
|
||||
|
||||
is(hcard.fn, "John Doe", "23-abbr-title-everything - fn");
|
||||
is(hcard.n["given-name"], "Jonathan", "23-abbr-title-everything - given-name");
|
||||
is(hcard.n["family-name"], "Doe-Smith", "23-abbr-title-everything - family-name");
|
||||
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");
|
||||
|
@ -866,8 +866,8 @@ function test_hCard() {
|
|||
hcard = new hCard(document.getElementById("26-ancestors"));
|
||||
|
||||
is(hcard.fn, "John Doe", "26-ancestors - fn");
|
||||
is(hcard.n["given-name"], "Jonathan", "26-ancestors - given-name");
|
||||
is(hcard.n["family-name"], "Doe-Smith", "26-ancestors - family-name");
|
||||
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");
|
||||
|
@ -898,22 +898,22 @@ function test_hCard() {
|
|||
hcard = new hCard(document.getElementById("27-bday-date"));
|
||||
|
||||
is(hcard.fn, "john doe", "27-bday-date - fn");
|
||||
is(hcard.n["given-name"], "john", "27-bday-date - given-name");
|
||||
is(hcard.n["family-name"], "doe", "27-bday-date - family-name");
|
||||
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"], "john", "28-bday-datetime - given-name");
|
||||
is(hcard.n["family-name"], "doe", "28-bday-datetime - family-name");
|
||||
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"], "john", "29-bday-datetime-timezone - given-name");
|
||||
is(hcard.n["family-name"], "doe", "29-bday-datetime-timezone - family-name");
|
||||
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"));
|
||||
|
@ -925,8 +925,8 @@ function test_hCard() {
|
|||
hcard = new hCard(document.getElementById("30-fn-org.2"));
|
||||
|
||||
is(hcard.fn, "Dan Connolly", "30-fn-org.2 - fn");
|
||||
is(hcard.n["given-name"], "Dan", "30-fn-org.2 - given-name");
|
||||
is(hcard.n["family-name"], "Connolly", "30-fn-org.2 - family-name");
|
||||
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"));
|
||||
|
@ -947,8 +947,8 @@ function test_hCard() {
|
|||
hcard = new hCard(document.getElementById("31-include.1"));
|
||||
|
||||
is(hcard.fn, "Brian Suda", "31-include.1 - fn");
|
||||
is(hcard.n["given-name"], "Brian", "31-include.1 - given-name");
|
||||
is(hcard.n["family-name"], "Suda", "31-include.1 - family-name");
|
||||
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");
|
||||
|
@ -956,8 +956,8 @@ function test_hCard() {
|
|||
hcard = new hCard(document.getElementById("31-include.2"));
|
||||
|
||||
is(hcard.fn, "Brian Suda", "31-include.2 - fn");
|
||||
is(hcard.n["given-name"], "Brian", "31-include.2 - given-name");
|
||||
is(hcard.n["family-name"], "Suda", "31-include.2 - family-name");
|
||||
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");
|
||||
|
@ -965,8 +965,8 @@ function test_hCard() {
|
|||
hcard = new hCard(document.getElementById("31-include.3"));
|
||||
|
||||
is(hcard.fn, "Brian Suda", "31-include.3 - fn");
|
||||
is(hcard.n["given-name"], "Brian", "31-include.3 - given-name");
|
||||
is(hcard.n["family-name"], "Suda", "31-include.3 - family-name");
|
||||
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");
|
||||
|
@ -974,31 +974,31 @@ function test_hCard() {
|
|||
hcard = new hCard(document.getElementById("31-include.4"));
|
||||
|
||||
is(hcard.fn, "Brian Suda", "31-include.3 - fn");
|
||||
is(hcard.n["given-name"], "Brian", "31-include.3 - given-name");
|
||||
is(hcard.n["family-name"], "Suda", "31-include.3 - family-name");
|
||||
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"], "Brian", "32-header.1 - given-name");
|
||||
is(hcard.n["family-name"], "Suda", "32-header.1 - family-name");
|
||||
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"], "John", "32-header.2 - given-name");
|
||||
is(hcard.n["family-name"], "Doe", "32-header.2 - family-name");
|
||||
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"], "Joe", "33-area.1 - given-name");
|
||||
is(hcard.n["family-name"], "Public", "33-area.1 - family-name");
|
||||
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");
|
||||
|
||||
|
@ -1033,8 +1033,8 @@ function test_hCard() {
|
|||
hcard = new hCard(document.getElementById("34-notes"));
|
||||
|
||||
is(hcard.fn, "Joe Public", "34-notes - fn");
|
||||
is(hcard.n["given-name"], "Joe", "34-notes - given-name");
|
||||
is(hcard.n["family-name"], "Public", "34-notes - family-name");
|
||||
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");
|
||||
|
@ -1043,30 +1043,30 @@ function test_hCard() {
|
|||
hcard = new hCard(document.getElementById("35-include-pattern.1"));
|
||||
|
||||
is(hcard.fn, "James Levine", "35-include-pattern.1 - fn");
|
||||
is(hcard.n["given-name"], "James", "35-include-pattern.1 - given-name");
|
||||
is(hcard.n["family-name"], "Levine", "35-include-pattern.1 - family-name");
|
||||
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"], "James", "35-include-pattern.2 - given-name");
|
||||
is(hcard.n["family-name"], "Levine", "35-include-pattern.2 - family-name");
|
||||
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"], "James", "35-include-pattern.3 - given-name");
|
||||
is(hcard.n["family-name"], "Levine", "35-include-pattern.3 - family-name");
|
||||
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"], "john", "36-categories.1 - given-name");
|
||||
is(hcard.n["family-name"], "doe", "36-categories.1 - family-name");
|
||||
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");
|
||||
|
@ -1094,8 +1094,8 @@ function test_hCard() {
|
|||
hcard = new hCard(document.getElementById("37-singleton"));
|
||||
|
||||
is(hcard.fn, "john doe 1", "37-singleton - fn");
|
||||
is(hcard.n["given-name"], "john", "37-singleton - given-name");
|
||||
is(hcard.n["family-name"], "doe", "37-singleton - family-name");
|
||||
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");
|
||||
|
@ -1108,32 +1108,32 @@ function test_hCard() {
|
|||
hcard = new hCard(document.getElementById("38-uid.1"));
|
||||
|
||||
is(hcard.fn, "Ryan King", "38-uid.1 - fn");
|
||||
is(hcard.n["given-name"], "Ryan", "38-uid.1 - given-name");
|
||||
is(hcard.n["family-name"], "King", "38-uid.1 - family-name");
|
||||
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"], "Ryan", "38-uid.2 - given-name");
|
||||
is(hcard.n["family-name"], "King", "38-uid.2 - family-name");
|
||||
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"], "Ryan", "38-uid.3 - given-name");
|
||||
is(hcard.n["family-name"], "King", "38-uid.3 - family-name");
|
||||
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"], "Ryan", "38-uid.4 - given-name");
|
||||
is(hcard.n["family-name"], "King", "38-uid.4 - family-name");
|
||||
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");
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче