Bug 475330 - mochitests for xul:tab and xul:tabpanel relations, r=marcoz, davidb

This commit is contained in:
Alexander Surkov 2009-02-27 19:01:33 +08:00
Родитель ae4701c348
Коммит 8479d096c0
2 изменённых файлов: 30 добавлений и 1 удалений

Просмотреть файл

@ -373,6 +373,6 @@ nsXULTabpanelAccessible::GetRelationByType(PRUint32 aRelationType,
childAcc.swap(acc);
}
return NS_OK;
return nsRelUtils::AddTarget(aRelationType, aRelation, foundTabAcc);
}

Просмотреть файл

@ -104,6 +104,15 @@
testRelation(labelAcc, RELATION_LABEL_FOR, groupboxAcc);
testRelation(groupboxAcc, RELATION_LABELLED_BY, labelAcc);
// 'labelled by'/'label for' relations for xul:tab and xul:tabpanel
// (fixed in bug 366527)
testRelation("tabpanel1", RELATION_LABELLED_BY, "tab1");
testRelation("tab1", RELATION_LABEL_FOR, "tabpanel1");
testRelation("tabpanel2", RELATION_LABELLED_BY, "tab2");
testRelation("tab2", RELATION_LABEL_FOR, "tabpanel2");
testRelation("tabpanel3", RELATION_LABELLED_BY, "tab3");
testRelation("tab3", RELATION_LABEL_FOR, "tabpanel3");
// finish test
SimpleTest.finish();
}
@ -183,6 +192,26 @@
<groupbox id="groupbox">
<caption label="caption"/>
</groupbox>
<tabbox>
<tabs>
<tab label="tab1" id="tab1"/>
<tab label="tab2" id="tab2" linkedpanel="tabpanel2"/>
<tab label="tab3" id="tab3" linkedpanel="tabpanel3"/>
</tabs>
<tabpanels>
<tabpanel id="tabpanel1">
<description>tabpanel1</description>
</tabpanel>
<tabpanel id="tabpanel3">
<description>tabpanel3</description>
</tabpanel>
<tabpanel id="tabpanel2">
<description>tabpanel2</description>
</tabpanel>
</tabpanels>
</tabbox>
</vbox>
</window>