summaryrefslogtreecommitdiffstats
path: root/chrome/test/data
diff options
context:
space:
mode:
authorbnc <bnc@chromium.org>2015-10-12 09:23:11 -0700
committerCommit bot <commit-bot@chromium.org>2015-10-12 16:23:59 +0000
commit14ebd6d0797d64a3d2eceb2950048b65015d471e (patch)
tree3a4a04a9f85e5e0a8fff116f400441d4aca944be /chrome/test/data
parent36bd4b148293adc0b4ba169b7dfb789d65f3f516 (diff)
downloadchromium_src-14ebd6d0797d64a3d2eceb2950048b65015d471e.zip
chromium_src-14ebd6d0797d64a3d2eceb2950048b65015d471e.tar.gz
chromium_src-14ebd6d0797d64a3d2eceb2950048b65015d471e.tar.bz2
Log GOAWAY frame debug data.
* Buffer GOAWAY frame debug data in BufferedSpdyFramer. * Add |debug_data| argument to BufferedSpdyFramerVisitorInterface::OnGoAway(). * Add "debug_data" field to NetLog::TYPE_HTTP2_SESSION_GOAWAY event. * Strip value depending on NetLogCaptureMode both in native and Javascript code. * Add unittests. BUG=478685 Review URL: https://codereview.chromium.org/1360253002 Cr-Commit-Position: refs/heads/master@{#353531}
Diffstat (limited to 'chrome/test/data')
-rw-r--r--chrome/test/data/webui/net_internals/log_view_painter.js36
1 files changed, 32 insertions, 4 deletions
diff --git a/chrome/test/data/webui/net_internals/log_view_painter.js b/chrome/test/data/webui/net_internals/log_view_painter.js
index 688b07a..406ba452a 100644
--- a/chrome/test/data/webui/net_internals/log_view_painter.js
+++ b/chrome/test/data/webui/net_internals/log_view_painter.js
@@ -9,8 +9,7 @@ GEN_INCLUDE(['net_internals_test.js']);
(function() {
/**
- * Check that stripCookiesAndLoginInfo correctly removes cookies and login
- * information.
+ * Check that stripPrivacyInfo correctly removes cookies and login information.
*/
TEST_F('NetInternalsTest', 'netInternalsLogViewPainterStripInfo', function() {
// Each entry in |expectations| is a list consisting of a header element
@@ -85,7 +84,7 @@ TEST_F('NetInternalsTest', 'netInternalsLogViewPainterStripInfo', function() {
};
entry.params.headers[position] = expectation[0];
- var stripped = stripCookiesAndLoginInfo(entry);
+ var stripped = stripPrivacyInfo(entry);
// The entry should be duplicated, so the original still has the deleted
// information.
expectNotEquals(stripped, entry);
@@ -114,7 +113,7 @@ TEST_F('NetInternalsTest', 'netInternalsLogViewPainterStripInfo', function() {
'type': EventSourceType.HTTP_TRANSACTION_HTTP2_SEND_REQUEST_HEADERS
};
var strippedSpdyRequestHeadersEntry =
- stripCookiesAndLoginInfo(spdyRequestHeadersEntry);
+ stripPrivacyInfo(spdyRequestHeadersEntry);
expectEquals('cookie: [4 bytes were stripped]',
strippedSpdyRequestHeadersEntry.params.headers[3]);
@@ -122,6 +121,35 @@ TEST_F('NetInternalsTest', 'netInternalsLogViewPainterStripInfo', function() {
});
/**
+ * Check that stripPrivacyInfo correctly removes HTTP/2 GOAWAY frame debug data.
+ */
+TEST_F('NetInternalsTest', 'netInternalsLogViewPainterStripGoAway', function() {
+ var entry = {
+ 'params': {
+ 'active_streams': 1,
+ 'debug_data': 'potentially privacy sensitive information',
+ 'last_accepted_stream_id': 1,
+ 'status': 0,
+ 'unclaimed_streams': 0,
+ },
+ 'phase': 0,
+ 'source': {'id': 404, 'type': 5},
+ 'time': '49236780',
+ 'type': EventType.HTTP2_SESSION_GOAWAY,
+ };
+
+ var stripped = stripPrivacyInfo(entry);
+
+ // The entry should be duplicated, so the original still has the deleted
+ // information.
+ expectNotEquals(stripped, entry);
+ expectEquals('[41 bytes were stripped]',
+ stripped.params.debug_data);
+
+ testDone();
+});
+
+/**
* Tests the formatting of log entries to fixed width text.
*/
TEST_F('NetInternalsTest', 'netInternalsLogViewPainterPrintAsText', function() {