OLD | NEW |
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 // Include test fixture. | 5 // Include test fixture. |
6 GEN_INCLUDE(['net_internals_test.js']); | 6 GEN_INCLUDE(['net_internals_test.js']); |
7 | 7 |
8 // Anonymous namespace | 8 // Anonymous namespace |
9 (function() { | 9 (function() { |
10 | 10 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 | 59 |
60 /** | 60 /** |
61 * Modifies the log dump and loads it. | 61 * Modifies the log dump and loads it. |
62 */ | 62 */ |
63 onLogDumpCreated: function(logDumpText) { | 63 onLogDumpCreated: function(logDumpText) { |
64 var logDump = JSON.parse(logDumpText); | 64 var logDump = JSON.parse(logDumpText); |
65 | 65 |
66 logDump.constants.timeTickOffset = '0'; | 66 logDump.constants.timeTickOffset = '0'; |
67 logDump.events = []; | 67 logDump.events = []; |
68 | 68 |
69 var source = new NetInternalsTest.Source(1, LogSourceType.SOCKET); | 69 var source = new NetInternalsTest.Source(1, EventSourceType.SOCKET); |
70 logDump.events.push( | 70 logDump.events.push( |
71 NetInternalsTest.createBeginEvent(source, LogEventType.SOCKET_ALIVE, | 71 NetInternalsTest.createBeginEvent(source, EventType.SOCKET_ALIVE, |
72 this.startTime_, null)); | 72 this.startTime_, null)); |
73 logDump.events.push( | 73 logDump.events.push( |
74 NetInternalsTest.createMatchingEndEvent(logDump.events[0], | 74 NetInternalsTest.createMatchingEndEvent(logDump.events[0], |
75 this.endTime_, null)); | 75 this.endTime_, null)); |
76 logDumpText = JSON.stringify(logDump); | 76 logDumpText = JSON.stringify(logDump); |
77 | 77 |
78 assertEquals('Log loaded.', log_util.loadLogFile(logDumpText)); | 78 assertEquals('Log loaded.', log_util.loadLogFile(logDumpText)); |
79 | 79 |
80 endTime = this.endTime_; | 80 endTime = this.endTime_; |
81 startTime = this.startTime_; | 81 startTime = this.startTime_; |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 mouseZoomAllTheWayIn(); | 422 mouseZoomAllTheWayIn(); |
423 sanityCheckWithTimeRange(true); | 423 sanityCheckWithTimeRange(true); |
424 | 424 |
425 mouseZoomOut(1); | 425 mouseZoomOut(1); |
426 sanityCheckWithTimeRange(true); | 426 sanityCheckWithTimeRange(true); |
427 | 427 |
428 testDone(); | 428 testDone(); |
429 }); | 429 }); |
430 | 430 |
431 })(); // Anonymous namespace | 431 })(); // Anonymous namespace |
OLD | NEW |