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
parent be63605b00
commit a847380c46
3 changed files with 6 additions and 4 deletions

View File

@ -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" });
}
},
/**

View File

@ -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");
}
});

View File

@ -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");
}