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

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

Issue 17333003: Pretty-print QUIC CONNECTION_CLOSE and RST_STREAM error codes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Wrap Created 7 years, 6 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 93bcfe1df953c9177abfe2c31a4f16e72152baea..8730bce89a9e48d29fe0b6da3e440dc26236716e 100644
--- a/chrome/test/data/webui/net_internals/log_view_painter.js
+++ b/chrome/test/data/webui/net_internals/log_view_painter.js
@@ -150,6 +150,7 @@ TEST_F('NetInternalsTest', 'netInternalsLogViewPainterPrintAsText', function() {
runTestCase(painterTestURLRequestIncompleteFromLoadedLog());
runTestCase(painterTestURLRequestIncompleteFromLoadedLogSingleEvent());
runTestCase(painterTestNetError());
+ runTestCase(painterTestQuicError());
runTestCase(painterTestHexEncodedBytes());
runTestCase(painterTestCertVerifierJob());
runTestCase(painterTestProxyConfigOneProxyAllSchemes());
@@ -1082,6 +1083,83 @@ function painterTestNetError() {
}
/**
+ * Tests the custom formatting of net_errors across several different event
eroman 2013/06/18 19:39:17 Update this comment to reflect it is a quic error
Ryan Hamilton 2013/06/19 16:59:11 Done.
+ * types.
+ */
+function painterTestQuicError() {
+ var testCase = {};
+ testCase.tickOffset = '1337911098446';
+
+ testCase.logEntries = [
+ {
+ 'params': {
+ "host": "www.example.com"
+ },
+ 'phase': EventPhase.PHASE_BEGIN,
+ 'source': {
+ 'id': 318,
+ 'type': EventSourceType.URL_REQUEST
+ },
+ 'time': '953675448',
+ 'type': EventType.QUIC_SESSION
+ },
+ {
+ 'params': {
+ 'details': "invalid headers",
+ 'quic_rst_stream_error': 3,
eroman 2013/06/18 19:39:17 [optional] Note that in the future if you change t
Ryan Hamilton 2013/06/19 16:59:11 Great idea. Done!
+ 'stream_id': 1
+ },
+ 'phase': EventPhase.PHASE_NONE,
+ 'source': {
+ 'id': 318,
+ 'type': EventSourceType.URL_REQUEST
+ },
+ 'time': '953675460',
+ 'type': EventType.QUIC_SESSION_RST_STREAM_FRAME_RECEIVED
+ },
+ {
+ 'params': {
+ 'quic_error': 25
eroman 2013/06/18 19:39:17 Same comment as above
Ryan Hamilton 2013/06/19 16:59:11 Done.
+ },
+ 'phase': EventPhase.PHASE_NONE,
+ 'source': {
+ 'id': 318,
+ 'type': EventSourceType.URL_REQUEST
+ },
+ 'time': '953675705',
+ 'type': EventType.QUIC_SESSION_CONNECTION_CLOSE_FRAME_RECEIVED
+ },
+ {
+ 'params': {
+ 'quic_error': 25
Ryan Hamilton 2013/06/19 16:59:11 And done here too.
+ },
+ 'phase': EventPhase.PHASE_END,
+ 'source': {
+ 'id': 318,
+ 'type': EventSourceType.URL_REQUEST
+ },
+ 'time': '953675923',
+ 'type': EventType.QUIC_SESSION
+ }
+ ];
+
+ testCase.expectedText =
+'t=1338864773894 [st= 0] +QUIC_SESSION [dt=475]\n' +
+' --> host = "www.example.com"\n' +
+'t=1338864773906 [st= 12] QUIC_SESSION_RST_STREAM_FRAME_RECEIVED\n' +
+' --> details = "invalid headers"\n' +
+' --> quic_rst_stream_error = 3 (' +
eroman 2013/06/18 19:39:17 Same comment as above
Ryan Hamilton 2013/06/19 16:59:11 Oh, clever! That didn't occur to me even after th
+ 'BAD_APPLICATION_PAYLOAD)\n' +
+' --> stream_id = 1\n' +
+'t=1338864774151 [st=257] QUIC_SESSION_CONNECTION_CLOSE_FRAME_RECEIVED\n' +
+' --> quic_error = 25 (CONNECTION_TIMED_OUT)\n' +
+'t=1338864774369 [st=475] -QUIC_SESSION\n' +
+' --> quic_error = 25 (CONNECTION_TIMED_OUT)';
eroman 2013/06/18 19:39:17 Same comment as above.
Ryan Hamilton 2013/06/19 16:59:11 Done.
+
+ return testCase;
+}
+
+/**
* Tests the formatting of bytes sent/received as hex + ASCII. Note that the
* test data was truncated which is why the byte_count doesn't quite match the
* hex_encoded_bytes.

Powered by Google App Engine
This is Rietveld 408576698