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

Side by Side Diff: chrome/test/data/webui/net_internals/log_util.js

Issue 2969473002: Stop warning "missing clientInfo.numericDate" when loading (Closed)
Patch Set: Created 3 years, 5 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/resources/net_internals/log_util.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview This file contains tests for creating and loading log files. 6 * @fileoverview This file contains tests for creating and loading log files.
7 * It also tests the stop capturing button, since it both creates and then loads 7 * It also tests the stop capturing button, since it both creates and then loads
8 * a log dump. 8 * a log dump.
9 */ 9 */
10 10
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 }, 119 },
120 120
121 /** 121 /**
122 * Loads the received log and completes the Task. 122 * Loads the received log and completes the Task.
123 * @param {string} logDumpText Log received from the browser process. 123 * @param {string} logDumpText Log received from the browser process.
124 */ 124 */
125 onLogReceived_: function(logDumpText) { 125 onLogReceived_: function(logDumpText) {
126 assertEquals('string', typeof logDumpText); 126 assertEquals('string', typeof logDumpText);
127 expectTrue(SourceTracker.getInstance().getPrivacyStripping()); 127 expectTrue(SourceTracker.getInstance().getPrivacyStripping());
128 128
129 var expectedResult = 'The log file is missing clientInfo.numericDate.\n' + 129 var expectedResult = 'Log loaded.';
130 'Synthesizing export date as time of last event captured.\n' +
131 'Log loaded.';
132 130
133 if (this.truncate_) { 131 if (this.truncate_) {
134 expectedResult = 132 expectedResult =
135 'Log file truncated. Events may be missing.\n' + expectedResult; 133 'Log file truncated. Events may be missing.\n' + expectedResult;
136 } 134 }
137 135
138 logDumpText = logDumpText.substring(0, logDumpText.length - this.truncate_); 136 logDumpText = logDumpText.substring(0, logDumpText.length - this.truncate_);
139 expectEquals(expectedResult, log_util.loadLogFile(logDumpText, 'log.txt')); 137 expectEquals(expectedResult, log_util.loadLogFile(logDumpText, 'log.txt'));
140 expectFalse(SourceTracker.getInstance().getPrivacyStripping()); 138 expectFalse(SourceTracker.getInstance().getPrivacyStripping());
141 139
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 taskQueue.addFunctionTask(checkViewsAfterLogLoaded); 275 taskQueue.addFunctionTask(checkViewsAfterLogLoaded);
278 taskQueue.addFunctionTask(checkPrivacyStripping.bind(null, true)); 276 taskQueue.addFunctionTask(checkPrivacyStripping.bind(null, true));
279 taskQueue.addFunctionTask(checkActiveView.bind(null, EventsView.TAB_ID)); 277 taskQueue.addFunctionTask(checkActiveView.bind(null, EventsView.TAB_ID));
280 taskQueue.run(); 278 taskQueue.run();
281 279
282 // Simulate a click on the stop capturing button 280 // Simulate a click on the stop capturing button
283 $(CaptureView.STOP_BUTTON_ID).click(); 281 $(CaptureView.STOP_BUTTON_ID).click();
284 }); 282 });
285 283
286 })(); // Anonymous namespace 284 })(); // Anonymous namespace
OLDNEW
« no previous file with comments | « chrome/browser/resources/net_internals/log_util.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698