Bug 1259812: Fix tests to account for change in tooltip text and breadcrumb lifecycle;r=pbro

MozReview-Commit-ID: 6KJOAhhgmkX
This commit is contained in:
Steve Melia 2016-05-29 22:58:32 +01:00
Родитель be63605b00
Коммит a847380c46
3 изменённых файлов: 6 добавлений и 4 удалений

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

@ -753,8 +753,10 @@ HTMLBreadcrumbs.prototype = {
*/
scroll: function () {
// FIXME bug 684352: make sure its immediate neighbors are visible too.
let element = this.nodeHierarchy[this.currentIndex].button;
element.scrollIntoView({ block: "end", behavior: "smooth" });
if (!this.isDestroyed) {
let element = this.nodeHierarchy[this.currentIndex].button;
element.scrollIntoView({ block: "end", behavior: "smooth" });
}
},
/**

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

@ -49,7 +49,7 @@ add_task(function* () {
is(labelTag.textContent, node.nodeName,
"Node " + node.selector + " has the expected tag name");
is(checkedButton.getAttribute("tooltiptext"), node.title,
is(checkedButton.getAttribute("title"), node.title,
"Node " + node.selector + " has the expected tooltip");
}
});

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

@ -108,6 +108,6 @@ function* testBreadcrumbs(selector, inspector) {
let expectedText = b.prettyPrintNodeAsText(nodeFront);
let button = b.container.querySelector("button[checked=true]");
ok(button, "A crumbs is checked=true");
is(button.getAttribute("tooltiptext"), expectedText,
is(button.getAttribute("title"), expectedText,
"Crumb refers to the right node");
}