| 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() {
|
|
|