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

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: Initialize |goaway_count_|. 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
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() {

Powered by Google App Engine
This is Rietveld 408576698