mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 962070 - Tooltips for sources contain the group URL instead of the file URL, r=vporof
This commit is contained in:
parent
e3c4048d54
commit
36b07572fd
@ -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], {
|
||||
|
@ -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),
|
||||
|
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user