| Index: chrome/test/data/webui/net_internals/log_view_painter.js
|
| ===================================================================
|
| --- chrome/test/data/webui/net_internals/log_view_painter.js (revision 148858)
|
| +++ chrome/test/data/webui/net_internals/log_view_painter.js (working copy)
|
| @@ -101,17 +101,20 @@
|
| div.innerHTML = '';
|
| timeutil.setTimeTickOffset(testCase.tickOffset);
|
| printLogEntriesAsText(testCase.logEntries, div,
|
| - testCase.enableSecurityStripping);
|
| + testCase.enableSecurityStripping,
|
| + testCase.logCreationTime);
|
|
|
| // Strip any trailing newlines, since the whitespace when using innerText
|
| // can be a bit unpredictable.
|
| var actualText = div.innerText;
|
| actualText = actualText.replace(/^\s+|\s+$/g, '');
|
|
|
| - expectEquals(testCase.expectedText, actualText);
|
| + expectEquals('\n' + testCase.expectedText, '\n' + actualText);
|
| }
|
|
|
| runTestCase(painterTestURLRequest());
|
| + runTestCase(painterTestURLRequestIncomplete());
|
| + runTestCase(painterTestURLRequestIncompleteFromLoadedLog());
|
| runTestCase(painterTestNetError());
|
| runTestCase(painterTestHexEncodedBytes());
|
| runTestCase(painterTestCertVerifierJob());
|
| @@ -746,6 +749,72 @@
|
| }
|
|
|
| /**
|
| + * Test case for a URLRequest that was not completed that did not come from a
|
| + * loaded log file.
|
| + */
|
| +function painterTestURLRequestIncomplete() {
|
| + var testCase = {};
|
| + testCase.tickOffset = '1337911098446';
|
| +
|
| + testCase.logEntries = [
|
| + {
|
| + 'phase': EventPhase.PHASE_BEGIN,
|
| + 'source': {
|
| + 'id': 146,
|
| + 'type': EventSourceType.URL_REQUEST
|
| + },
|
| + 'time': '953534778',
|
| + 'type': EventType.REQUEST_ALIVE
|
| + },
|
| + {
|
| + 'params': {
|
| + 'load_flags': 128,
|
| + 'method': 'GET',
|
| + 'priority': 4,
|
| + 'url': 'http://www.google.com/'
|
| + },
|
| + 'phase': EventPhase.PHASE_BEGIN,
|
| + 'source': {
|
| + 'id': 146,
|
| + 'type': EventSourceType.URL_REQUEST
|
| + },
|
| + 'time': '953534910',
|
| + 'type': EventType.URL_REQUEST_START_JOB
|
| + },
|
| + {
|
| + 'phase': EventPhase.PHASE_END,
|
| + 'source': {
|
| + 'id': 146,
|
| + 'type': EventSourceType.URL_REQUEST
|
| + },
|
| + 'time': '953534970',
|
| + 'type': EventType.URL_REQUEST_START_JOB
|
| + },
|
| + ];
|
| +
|
| + testCase.expectedText =
|
| +'t=1338864633224 [st= 0] +REQUEST_ALIVE [dt=?]\n' +
|
| +'t=1338864633356 [st=132] URL_REQUEST_START_JOB [dt=60]\n' +
|
| +' --> load_flags = 128 (ENABLE_LOAD_TIMING)\n' +
|
| +' --> method = "GET"\n' +
|
| +' --> priority = 4\n' +
|
| +' --> url = "http://www.google.com/"';
|
| +
|
| + return testCase;
|
| +}
|
| +
|
| +/**
|
| + * Test case for a URLRequest that was not completed that came from a loaded
|
| + * log file.
|
| + */
|
| +function painterTestURLRequestIncompleteFromLoadedLog() {
|
| + var testCase = painterTestURLRequestIncomplete();
|
| + testCase.logCreationTime = 1338864634013;
|
| + testCase.expectedText += '\nt=1338864634013 [st=789]';
|
| + return testCase;
|
| +}
|
| +
|
| +/**
|
| * Tests the custom formatting of net_errors across several different event
|
| * types.
|
| */
|
|
|