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.
|
||||
*
|
||||
* @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) {
|
||||
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
|
||||
// header reverses the sort direction.
|
||||
// Sort by timing.
|
||||
if (!target || !direction) {
|
||||
aType = "waterfall";
|
||||
target = $("#requests-menu-waterfall-button");
|
||||
target.setAttribute("sorted", direction = "ascending");
|
||||
target.setAttribute("tooltiptext", L10N.getStr("networkMenu.sortedAsc"));
|
||||
this.sortContents(this._byTiming);
|
||||
}
|
||||
|
||||
// Sort by whatever was requested.
|
||||
switch (aType) {
|
||||
else switch (aType) {
|
||||
case "status":
|
||||
if (direction == "ascending") {
|
||||
this.sortContents(this._byStatus);
|
||||
@ -495,13 +490,6 @@ create({ constructor: RequestsMenuView, proto: MenuContainer.prototype }, {
|
||||
this.sortContents((a, b) => !this._bySize(a, b));
|
||||
}
|
||||
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.
|
||||
*/
|
||||
_showWaterfallDivisionLabels: function(aScale) {
|
||||
let container = $("#requests-menu-waterfall-button");
|
||||
let container = $("#requests-menu-waterfall-header-box");
|
||||
let availableWidth = this._waterfallWidth - REQUESTS_WATERFALL_SAFE_BOUNDS;
|
||||
|
||||
// Nuke all existing labels.
|
||||
|
@ -82,17 +82,13 @@
|
||||
</hbox>
|
||||
<hbox id="requests-menu-waterfall-header-box"
|
||||
class="requests-menu-header requests-menu-waterfall"
|
||||
align="center"
|
||||
flex="1">
|
||||
<button id="requests-menu-waterfall-button"
|
||||
class="requests-menu-header-button requests-menu-waterfall"
|
||||
onclick="NetMonitorView.RequestsMenu.sortBy('waterfall')"
|
||||
pack="start"
|
||||
flex="1">
|
||||
<label value="&netmonitorUI.toolbar.waterfall;"/>
|
||||
</button>
|
||||
align="center">
|
||||
<label id="requests-menu-waterfall-label"
|
||||
class="plain requests-menu-waterfall"
|
||||
value="&netmonitorUI.toolbar.waterfall;"/>
|
||||
</hbox>
|
||||
</hbox>
|
||||
<spacer id="toolbar-spacer" flex="1"/>
|
||||
<toolbarbutton id="details-pane-toggle"
|
||||
class="devtools-toolbarbutton"
|
||||
tooltiptext="&netmonitorUI.panesButton.tooltip;"
|
||||
|
@ -45,7 +45,7 @@ function test() {
|
||||
.then(() => {
|
||||
info("Clearing status sort.");
|
||||
EventUtils.sendMouseEvent({ type: "click" }, $("#requests-menu-status-button"));
|
||||
testHeaders("waterfall", "ascending");
|
||||
testHeaders();
|
||||
return testContents([0, 2, 4, 3, 1]);
|
||||
})
|
||||
.then(() => {
|
||||
@ -63,7 +63,7 @@ function test() {
|
||||
.then(() => {
|
||||
info("Clearing method sort.");
|
||||
EventUtils.sendMouseEvent({ type: "click" }, $("#requests-menu-method-button"));
|
||||
testHeaders("waterfall", "ascending");
|
||||
testHeaders();
|
||||
return testContents([0, 2, 4, 3, 1]);
|
||||
})
|
||||
.then(() => {
|
||||
@ -81,7 +81,7 @@ function test() {
|
||||
.then(() => {
|
||||
info("Clearing file sort.");
|
||||
EventUtils.sendMouseEvent({ type: "click" }, $("#requests-menu-file-button"));
|
||||
testHeaders("waterfall", "ascending");
|
||||
testHeaders();
|
||||
return testContents([0, 2, 4, 3, 1]);
|
||||
})
|
||||
.then(() => {
|
||||
@ -99,7 +99,7 @@ function test() {
|
||||
.then(() => {
|
||||
info("Clearing type sort.");
|
||||
EventUtils.sendMouseEvent({ type: "click" }, $("#requests-menu-type-button"));
|
||||
testHeaders("waterfall", "ascending");
|
||||
testHeaders();
|
||||
return testContents([0, 2, 4, 3, 1]);
|
||||
})
|
||||
.then(() => {
|
||||
@ -117,27 +117,9 @@ function test() {
|
||||
.then(() => {
|
||||
info("Clearing size sort.");
|
||||
EventUtils.sendMouseEvent({ type: "click" }, $("#requests-menu-size-button"));
|
||||
testHeaders("waterfall", "ascending");
|
||||
testHeaders();
|
||||
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(() => {
|
||||
return teardown(aMonitor);
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user