From 6517ee346256138a7487bb559f46623e6646f230 Mon Sep 17 00:00:00 2001
From: Wes Kocher
Date: Fri, 22 Jul 2016 13:32:37 -0700
Subject: [PATCH] Backed out 6 changesets (bug 1244227) for m(cl) failures
Backed out changeset 0cf1259b7073 (bug 1244227)
Backed out changeset d5866b9dd3d9 (bug 1244227)
Backed out changeset 49b5309e3415 (bug 1244227)
Backed out changeset 33bc49f015a7 (bug 1244227)
Backed out changeset f680f6460f07 (bug 1244227)
Backed out changeset 5a4bb3258978 (bug 1244227)
---
.../client/netmonitor/har/test/browser.ini | 1 -
.../test/browser_net_har_throttle_upload.js | 60 ---
.../test/html_har_post-data-test-page.html | 6 -
devtools/client/netmonitor/test/browser.ini | 1 -
.../netmonitor/test/browser_net_throttle.js | 53 ---
.../test/html_har_post-data-test-page.html | 33 ++
devtools/client/webconsole/webconsole.js | 31 --
devtools/server/actors/webconsole.js | 17 +-
devtools/shared/webconsole/moz.build | 1 -
devtools/shared/webconsole/network-monitor.js | 244 +++++------
.../webconsole/test/unit/test_throttle.js | 140 ------
.../shared/webconsole/test/unit/xpcshell.ini | 1 -
devtools/shared/webconsole/throttle.js | 400 ------------------
netwerk/base/ThrottleQueue.cpp | 392 -----------------
netwerk/base/ThrottleQueue.h | 65 ---
netwerk/base/moz.build | 2 -
netwerk/base/nsIThrottledInputChannel.idl | 80 ----
netwerk/build/nsNetCID.h | 10 -
netwerk/build/nsNetModule.cpp | 5 -
netwerk/protocol/http/HttpBaseChannel.cpp | 23 -
netwerk/protocol/http/HttpBaseChannel.h | 5 -
netwerk/protocol/http/nsHttpTransaction.cpp | 21 -
netwerk/test/unit/test_throttlechannel.js | 41 --
netwerk/test/unit/test_throttlequeue.js | 23 -
netwerk/test/unit/test_throttling.js | 57 ---
netwerk/test/unit/xpcshell.ini | 3 -
26 files changed, 147 insertions(+), 1568 deletions(-)
delete mode 100644 devtools/client/netmonitor/har/test/browser_net_har_throttle_upload.js
delete mode 100644 devtools/client/netmonitor/test/browser_net_throttle.js
create mode 100644 devtools/client/netmonitor/test/html_har_post-data-test-page.html
delete mode 100644 devtools/shared/webconsole/test/unit/test_throttle.js
delete mode 100644 devtools/shared/webconsole/throttle.js
delete mode 100644 netwerk/base/ThrottleQueue.cpp
delete mode 100644 netwerk/base/ThrottleQueue.h
delete mode 100644 netwerk/base/nsIThrottledInputChannel.idl
delete mode 100644 netwerk/test/unit/test_throttlechannel.js
delete mode 100644 netwerk/test/unit/test_throttlequeue.js
delete mode 100644 netwerk/test/unit/test_throttling.js
diff --git a/devtools/client/netmonitor/har/test/browser.ini b/devtools/client/netmonitor/har/test/browser.ini
index 14d4f846fad3..6923c64f3c37 100644
--- a/devtools/client/netmonitor/har/test/browser.ini
+++ b/devtools/client/netmonitor/har/test/browser.ini
@@ -9,4 +9,3 @@ support-files =
[browser_net_har_copy_all_as_har.js]
[browser_net_har_post_data.js]
-[browser_net_har_throttle_upload.js]
diff --git a/devtools/client/netmonitor/har/test/browser_net_har_throttle_upload.js b/devtools/client/netmonitor/har/test/browser_net_har_throttle_upload.js
deleted file mode 100644
index 51ec10a3b637..000000000000
--- a/devtools/client/netmonitor/har/test/browser_net_har_throttle_upload.js
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// Test timing of upload when throttling.
-
-"use strict";
-
-add_task(function* () {
- let [ , debuggee, monitor ] = yield initNetMonitor(
- HAR_EXAMPLE_URL + "html_har_post-data-test-page.html");
-
- info("Starting test... ");
-
- let { NetMonitorView } = monitor.panelWin;
- let { RequestsMenu } = NetMonitorView;
-
- const size = 4096;
- const request = {
- "NetworkMonitor.throttleData": {
- roundTripTimeMean: 0,
- roundTripTimeMax: 0,
- downloadBPSMean: 200000,
- downloadBPSMax: 200000,
- uploadBPSMean: size / 3,
- uploadBPSMax: size / 3,
- },
- };
- let client = monitor._controller.webConsoleClient;
-
- info("sending throttle request");
- let deferred = promise.defer();
- client.setPreferences(request, response => {
- deferred.resolve(response);
- });
- yield deferred.promise;
-
- RequestsMenu.lazyUpdate = false;
-
- // Execute one POST request on the page and wait till its done.
- debuggee.executeTest2(size);
- yield waitForNetworkEvents(monitor, 0, 1);
-
- // Copy HAR into the clipboard (asynchronous).
- let jsonString = yield RequestsMenu.copyAllAsHar();
- let har = JSON.parse(jsonString);
-
- // Check out the HAR log.
- isnot(har.log, null, "The HAR log must exist");
- is(har.log.pages.length, 1, "There must be one page");
- is(har.log.entries.length, 1, "There must be one request");
-
- let entry = har.log.entries[0];
- is(entry.request.postData.text, "x".repeat(size),
- "Check post data payload");
-
- ok(entry.timings.send >= 2000, "upload should have taken more than 2 seconds");
-
- // Clean up
- teardown(monitor).then(finish);
-});
diff --git a/devtools/client/netmonitor/har/test/html_har_post-data-test-page.html b/devtools/client/netmonitor/har/test/html_har_post-data-test-page.html
index 816dad08efc1..6cc4efa84ddb 100644
--- a/devtools/client/netmonitor/har/test/html_har_post-data-test-page.html
+++ b/devtools/client/netmonitor/har/test/html_har_post-data-test-page.html
@@ -27,12 +27,6 @@
var data = "{'first': 'John', 'last': 'Doe'}";
post(url, data);
}
-
- function executeTest2(size) {
- var url = "html_har_post-data-test-page.html";
- var data = "x".repeat(size);
- post(url, data);
- }
+ HAR POST data test
+
+
+
diff --git a/devtools/client/netmonitor/test/browser.ini b/devtools/client/netmonitor/test/browser.ini
index f2f07092431e..7408d14f30e9 100644
--- a/devtools/client/netmonitor/test/browser.ini
+++ b/devtools/client/netmonitor/test/browser.ini
@@ -138,7 +138,6 @@ skip-if = (e10s && debug && os == 'mac') # Bug 1253037
[browser_net_statistics-03.js]
[browser_net_status-codes.js]
[browser_net_streaming-response.js]
-[browser_net_throttle.js]
[browser_net_timeline_ticks.js]
[browser_net_timing-division.js]
[browser_net_persistent_logs.js]
diff --git a/devtools/client/netmonitor/test/browser_net_throttle.js b/devtools/client/netmonitor/test/browser_net_throttle.js
deleted file mode 100644
index deefd1b4822e..000000000000
--- a/devtools/client/netmonitor/test/browser_net_throttle.js
+++ /dev/null
@@ -1,53 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// Network throttling integration test.
-
-"use strict";
-
-add_task(function* () {
- requestLongerTimeout(2);
-
- let [, , monitor] = yield initNetMonitor(SIMPLE_URL);
- const {ACTIVITY_TYPE, NetMonitorController, NetMonitorView} =
- monitor.panelWin;
-
- info("Starting test... ");
-
- const request = {
- "NetworkMonitor.throttleData": {
- roundTripTimeMean: 0,
- roundTripTimeMax: 0,
- // Must be smaller than the length of the content of SIMPLE_URL
- // in bytes.
- downloadBPSMean: 200,
- downloadBPSMax: 200,
- uploadBPSMean: 10000,
- uploadBPSMax: 10000,
- },
- };
- let client = monitor._controller.webConsoleClient;
-
- info("sending throttle request");
- let deferred = promise.defer();
- client.setPreferences(request, response => {
- deferred.resolve(response);
- });
- yield deferred.promise;
-
- const startTime = Date.now();
- let eventPromise =
- monitor.panelWin.once(monitor.panelWin.EVENTS.RECEIVED_EVENT_TIMINGS);
- yield NetMonitorController
- .triggerActivity(ACTIVITY_TYPE.RELOAD.WITH_CACHE_DISABLED);
- const endTime = Date.now();
- ok(endTime - startTime > 1000, "download took more than one second");
-
- yield eventPromise;
- let requestItem = NetMonitorView.RequestsMenu.getItemAtIndex(0);
- ok(requestItem.attachment.eventTimings.timings.receive > 1000,
- "download reported as taking more than one second");
-
- yield teardown(monitor);
- finish();
-});
diff --git a/devtools/client/netmonitor/test/html_har_post-data-test-page.html b/devtools/client/netmonitor/test/html_har_post-data-test-page.html
new file mode 100644
index 000000000000..050ea55d1106
--- /dev/null
+++ b/devtools/client/netmonitor/test/html_har_post-data-test-page.html
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
Network Monitor Test Page
+
+
+
+
+