Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3581)

Unified Diff: chrome/test/data/webui/net_internals/log_view_painter.js

Issue 1360253002: Log GOAWAY frame debug data. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re: #12. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/net_internals/log_view_painter.js ('k') | net/http/http_log_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/webui/net_internals/log_view_painter.js
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 688b07ab25b95b7d1a3b3a03782a5a54c2122538..406ba452ac5657458146b8b1c447d0ad9696ff7c 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() {
« no previous file with comments | « chrome/browser/resources/net_internals/log_view_painter.js ('k') | net/http/http_log_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698