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..0fa2711d162a6d224b5919170520927aed1e73b5 100644 |
--- a/chrome/test/data/webui/net_internals/log_view_painter.js |
+++ b/chrome/test/data/webui/net_internals/log_view_painter.js |
@@ -122,6 +122,36 @@ TEST_F('NetInternalsTest', 'netInternalsLogViewPainterStripInfo', function() { |
}); |
/** |
+ * Check that stripCookiesAndLoginInfo 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 = stripCookiesAndLoginInfo(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() { |