OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 * Exports a log dump to a string and loads it. Makes sure no errors occur, | 6 * Exports a log dump to a string and loads it. Makes sure no errors occur, |
7 * and checks visibility of tabs aftwards. | 7 * and checks visibility of tabs aftwards. |
8 */ | 8 */ |
9 netInternalsTest.test('netInternalsExportImportDump', function() { | 9 netInternalsTest.test('netInternalsExportImportDump', function() { |
10 // Callback passed to |createLogDumpAsync|. Tries to load the dumped log | 10 // Callback passed to |createLogDumpAsync|. Tries to load the dumped log |
11 // file, and then checks tab visibility afterwards. | 11 // file, and then checks tab visibility afterwards. |
12 // @param {string} logDumpText Log dump, as a string. | 12 // @param {string} logDumpText Log dump, as a string. |
13 function onLogDumpCreated(logDumpText) { | 13 function onLogDumpCreated(logDumpText) { |
14 expectEquals('Log loaded.', logutil.loadLogFile(logDumpText)); | 14 expectEquals('Log loaded.', logutil.loadLogFile(logDumpText)); |
15 | 15 |
16 var tabVisibilityState = { | 16 var tabVisibilityState = { |
17 capture: false, | 17 capture: false, |
18 export: false, | 18 export: false, |
19 import: true, | 19 import: true, |
20 proxy: true, | 20 proxy: true, |
21 events: true, | 21 events: true, |
| 22 timeline: true, |
22 dns: true, | 23 dns: true, |
23 sockets: true, | 24 sockets: true, |
24 spdy: true, | 25 spdy: true, |
25 httpCache: true, | 26 httpCache: true, |
26 httpThrottling: false, | 27 httpThrottling: false, |
27 serviceProviders: cr.isWindows, | 28 serviceProviders: cr.isWindows, |
28 tests: false, | 29 tests: false, |
29 hsts: false, | 30 hsts: false, |
30 logs: false, | 31 logs: false, |
31 prerender: true | 32 prerender: true |
32 }; | 33 }; |
33 | 34 |
34 netInternalsTest.checkTabHandleVisibility(tabVisibilityState, false); | 35 netInternalsTest.checkTabHandleVisibility(tabVisibilityState, false); |
35 testDone(); | 36 testDone(); |
36 } | 37 } |
37 | 38 |
38 logutil.createLogDumpAsync('Log dump test', onLogDumpCreated); | 39 logutil.createLogDumpAsync('Log dump test', onLogDumpCreated); |
39 }); | 40 }); |
OLD | NEW |