mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 609de2f93690 (bug 874363) for failures in browser_net_timeline_ticks.js
This commit is contained in:
parent
e97ad00f2e
commit
dfc3c73ea3
@ -415,7 +415,7 @@ create({ constructor: RequestsMenuView, proto: MenuContainer.prototype }, {
|
|||||||
* Sorts all network requests in this container by a specified detail.
|
* Sorts all network requests in this container by a specified detail.
|
||||||
*
|
*
|
||||||
* @param string aType
|
* @param string aType
|
||||||
* Either null, "status", "method", "file", "domain", "type", "size" or "waterfall".
|
* Either null, "status", "method", "file", "domain", "type" or "size".
|
||||||
*/
|
*/
|
||||||
sortBy: function(aType) {
|
sortBy: function(aType) {
|
||||||
let target = $("#requests-menu-" + aType + "-button");
|
let target = $("#requests-menu-" + aType + "-button");
|
||||||
@ -442,17 +442,12 @@ create({ constructor: RequestsMenuView, proto: MenuContainer.prototype }, {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sort by timing. Set the header attributes so that clicking on the
|
// Sort by timing.
|
||||||
// header reverses the sort direction.
|
|
||||||
if (!target || !direction) {
|
if (!target || !direction) {
|
||||||
aType = "waterfall";
|
this.sortContents(this._byTiming);
|
||||||
target = $("#requests-menu-waterfall-button");
|
|
||||||
target.setAttribute("sorted", direction = "ascending");
|
|
||||||
target.setAttribute("tooltiptext", L10N.getStr("networkMenu.sortedAsc"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sort by whatever was requested.
|
// Sort by whatever was requested.
|
||||||
switch (aType) {
|
else switch (aType) {
|
||||||
case "status":
|
case "status":
|
||||||
if (direction == "ascending") {
|
if (direction == "ascending") {
|
||||||
this.sortContents(this._byStatus);
|
this.sortContents(this._byStatus);
|
||||||
@ -495,13 +490,6 @@ create({ constructor: RequestsMenuView, proto: MenuContainer.prototype }, {
|
|||||||
this.sortContents((a, b) => !this._bySize(a, b));
|
this.sortContents((a, b) => !this._bySize(a, b));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "waterfall":
|
|
||||||
if (direction == "ascending") {
|
|
||||||
this.sortContents(this._byTiming);
|
|
||||||
} else {
|
|
||||||
this.sortContents((a, b) => !this._byTiming(a, b));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -936,7 +924,7 @@ create({ constructor: RequestsMenuView, proto: MenuContainer.prototype }, {
|
|||||||
* The current waterfall scale.
|
* The current waterfall scale.
|
||||||
*/
|
*/
|
||||||
_showWaterfallDivisionLabels: function(aScale) {
|
_showWaterfallDivisionLabels: function(aScale) {
|
||||||
let container = $("#requests-menu-waterfall-button");
|
let container = $("#requests-menu-waterfall-header-box");
|
||||||
let availableWidth = this._waterfallWidth - REQUESTS_WATERFALL_SAFE_BOUNDS;
|
let availableWidth = this._waterfallWidth - REQUESTS_WATERFALL_SAFE_BOUNDS;
|
||||||
|
|
||||||
// Nuke all existing labels.
|
// Nuke all existing labels.
|
||||||
|
@ -82,17 +82,13 @@
|
|||||||
</hbox>
|
</hbox>
|
||||||
<hbox id="requests-menu-waterfall-header-box"
|
<hbox id="requests-menu-waterfall-header-box"
|
||||||
class="requests-menu-header requests-menu-waterfall"
|
class="requests-menu-header requests-menu-waterfall"
|
||||||
align="center"
|
align="center">
|
||||||
flex="1">
|
<label id="requests-menu-waterfall-label"
|
||||||
<button id="requests-menu-waterfall-button"
|
class="plain requests-menu-waterfall"
|
||||||
class="requests-menu-header-button requests-menu-waterfall"
|
value="&netmonitorUI.toolbar.waterfall;"/>
|
||||||
onclick="NetMonitorView.RequestsMenu.sortBy('waterfall')"
|
|
||||||
pack="start"
|
|
||||||
flex="1">
|
|
||||||
<label value="&netmonitorUI.toolbar.waterfall;"/>
|
|
||||||
</button>
|
|
||||||
</hbox>
|
</hbox>
|
||||||
</hbox>
|
</hbox>
|
||||||
|
<spacer id="toolbar-spacer" flex="1"/>
|
||||||
<toolbarbutton id="details-pane-toggle"
|
<toolbarbutton id="details-pane-toggle"
|
||||||
class="devtools-toolbarbutton"
|
class="devtools-toolbarbutton"
|
||||||
tooltiptext="&netmonitorUI.panesButton.tooltip;"
|
tooltiptext="&netmonitorUI.panesButton.tooltip;"
|
||||||
|
@ -45,7 +45,7 @@ function test() {
|
|||||||
.then(() => {
|
.then(() => {
|
||||||
info("Clearing status sort.");
|
info("Clearing status sort.");
|
||||||
EventUtils.sendMouseEvent({ type: "click" }, $("#requests-menu-status-button"));
|
EventUtils.sendMouseEvent({ type: "click" }, $("#requests-menu-status-button"));
|
||||||
testHeaders("waterfall", "ascending");
|
testHeaders();
|
||||||
return testContents([0, 2, 4, 3, 1]);
|
return testContents([0, 2, 4, 3, 1]);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
@ -63,7 +63,7 @@ function test() {
|
|||||||
.then(() => {
|
.then(() => {
|
||||||
info("Clearing method sort.");
|
info("Clearing method sort.");
|
||||||
EventUtils.sendMouseEvent({ type: "click" }, $("#requests-menu-method-button"));
|
EventUtils.sendMouseEvent({ type: "click" }, $("#requests-menu-method-button"));
|
||||||
testHeaders("waterfall", "ascending");
|
testHeaders();
|
||||||
return testContents([0, 2, 4, 3, 1]);
|
return testContents([0, 2, 4, 3, 1]);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
@ -81,7 +81,7 @@ function test() {
|
|||||||
.then(() => {
|
.then(() => {
|
||||||
info("Clearing file sort.");
|
info("Clearing file sort.");
|
||||||
EventUtils.sendMouseEvent({ type: "click" }, $("#requests-menu-file-button"));
|
EventUtils.sendMouseEvent({ type: "click" }, $("#requests-menu-file-button"));
|
||||||
testHeaders("waterfall", "ascending");
|
testHeaders();
|
||||||
return testContents([0, 2, 4, 3, 1]);
|
return testContents([0, 2, 4, 3, 1]);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
@ -99,7 +99,7 @@ function test() {
|
|||||||
.then(() => {
|
.then(() => {
|
||||||
info("Clearing type sort.");
|
info("Clearing type sort.");
|
||||||
EventUtils.sendMouseEvent({ type: "click" }, $("#requests-menu-type-button"));
|
EventUtils.sendMouseEvent({ type: "click" }, $("#requests-menu-type-button"));
|
||||||
testHeaders("waterfall", "ascending");
|
testHeaders();
|
||||||
return testContents([0, 2, 4, 3, 1]);
|
return testContents([0, 2, 4, 3, 1]);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
@ -117,27 +117,9 @@ function test() {
|
|||||||
.then(() => {
|
.then(() => {
|
||||||
info("Clearing size sort.");
|
info("Clearing size sort.");
|
||||||
EventUtils.sendMouseEvent({ type: "click" }, $("#requests-menu-size-button"));
|
EventUtils.sendMouseEvent({ type: "click" }, $("#requests-menu-size-button"));
|
||||||
testHeaders("waterfall", "ascending");
|
testHeaders();
|
||||||
return testContents([0, 2, 4, 3, 1]);
|
return testContents([0, 2, 4, 3, 1]);
|
||||||
})
|
})
|
||||||
.then(() => {
|
|
||||||
info("Testing waterfall sort, descending.");
|
|
||||||
EventUtils.sendMouseEvent({ type: "click" }, $("#requests-menu-waterfall-button"));
|
|
||||||
testHeaders("waterfall", "descending");
|
|
||||||
return testContents([4, 2, 0, 1, 3]);
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
info("Testing waterfall sort, ascending.");
|
|
||||||
EventUtils.sendMouseEvent({ type: "click" }, $("#requests-menu-waterfall-button"));
|
|
||||||
testHeaders("waterfall", "ascending");
|
|
||||||
return testContents([0, 2, 4, 3, 1]);
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
info("Testing waterfall sort, descending. Checking sort cycles correctly.");
|
|
||||||
EventUtils.sendMouseEvent({ type: "click" }, $("#requests-menu-waterfall-button"));
|
|
||||||
testHeaders("waterfall", "descending");
|
|
||||||
return testContents([4, 2, 0, 1, 3]);
|
|
||||||
})
|
|
||||||
.then(() => {
|
.then(() => {
|
||||||
return teardown(aMonitor);
|
return teardown(aMonitor);
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user