Bug 962070 - Tooltips for sources contain the group URL instead of the file URL, r=vporof

This commit is contained in:
kushagra singh 2014-02-04 13:04:38 +02:00
parent 6e7814400d
commit 7aefea5bcb
3 changed files with 9 additions and 1 deletions

View File

@ -128,12 +128,14 @@ SourcesView.prototype = Heritage.extend(WidgetMethods, {
let url = aSource.url;
let label = SourceUtils.getSourceLabel(url.split(" -> ").pop());
let group = SourceUtils.getSourceGroup(url.split(" -> ").pop());
let unicodeUrl = NetworkHelper.convertToUnicode(unescape(url));
let contents = document.createElement("label");
contents.className = "plain dbg-source-item";
contents.setAttribute("value", label);
contents.setAttribute("crop", "start");
contents.setAttribute("flex", "1");
contents.setAttribute("tooltiptext", unicodeUrl);
// Append a source item to this container.
this.push([contents, url], {

View File

@ -45,6 +45,13 @@ function testSourcesDisplay() {
is(gSources.itemCount, 2,
"Found the expected number of sources.");
is(gSources.items[0].target.querySelector(".dbg-source-item").getAttribute("tooltiptext"),
EXAMPLE_URL + "code_script-switching-01.js",
"The correct tooltip text is displayed for the first source.");
is(gSources.items[1].target.querySelector(".dbg-source-item").getAttribute("tooltiptext"),
EXAMPLE_URL + "code_script-switching-02.js",
"The correct tooltip text is displayed for the second source.");
ok(gSources.containsValue(EXAMPLE_URL + gLabel1),
"First source url is incorrect.");
ok(gSources.containsValue(EXAMPLE_URL + gLabel2),

View File

@ -423,7 +423,6 @@ function SideMenuGroup(aWidget, aName, aOptions={}) {
let target = this._target = this.document.createElement("vbox");
target.className = "side-menu-widget-group";
target.setAttribute("name", aName);
target.setAttribute("tooltiptext", aName);
let list = this._list = this.document.createElement("vbox");
list.className = "side-menu-widget-group-list";