| 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 /** | 5 /** |
| 6 * @fileoverview The way these tests work is as follows: | 6 * @fileoverview The way these tests work is as follows: |
| 7 * C++ in net_internals_ui_browsertest.cc does any necessary setup, and then | 7 * C++ in net_internals_ui_browsertest.cc does any necessary setup, and then |
| 8 * calls the entry point for a test with RunJavascriptTest. The called | 8 * calls the entry point for a test with RunJavascriptTest. The called |
| 9 * function can then use the assert/expect functions defined in test_api.js. | 9 * function can then use the assert/expect functions defined in test_api.js. |
| 10 * All callbacks from the browser are wrapped in such a way that they can | 10 * All callbacks from the browser are wrapped in such a way that they can |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 spdy: SpdyView.TAB_ID, | 295 spdy: SpdyView.TAB_ID, |
| 296 quic: QuicView.TAB_ID, | 296 quic: QuicView.TAB_ID, |
| 297 httpCache: HttpCacheView.TAB_ID, | 297 httpCache: HttpCacheView.TAB_ID, |
| 298 modules: ModulesView.TAB_ID, | 298 modules: ModulesView.TAB_ID, |
| 299 tests: TestView.TAB_ID, | 299 tests: TestView.TAB_ID, |
| 300 hsts: HSTSView.TAB_ID, | 300 hsts: HSTSView.TAB_ID, |
| 301 logs: LogsView.TAB_ID, | 301 logs: LogsView.TAB_ID, |
| 302 prerender: PrerenderView.TAB_ID, | 302 prerender: PrerenderView.TAB_ID, |
| 303 bandwidth: BandwidthView.TAB_ID, | 303 bandwidth: BandwidthView.TAB_ID, |
| 304 chromeos: CrosView.TAB_ID, | 304 chromeos: CrosView.TAB_ID, |
| 305 visualizer: CrosLogVisualizerView.TAB_ID | 305 visualizer: CrosLogVisualizerView.TAB_ID, |
| 306 sdch: SdchView.TAB_ID |
| 306 }; | 307 }; |
| 307 | 308 |
| 308 assertEquals(typeof hashToTabHandleIdMap[hash], 'string', | 309 assertEquals(typeof hashToTabHandleIdMap[hash], 'string', |
| 309 'Invalid tab anchor: ' + hash); | 310 'Invalid tab anchor: ' + hash); |
| 310 var tabId = hashToTabHandleIdMap[hash]; | 311 var tabId = hashToTabHandleIdMap[hash]; |
| 311 assertEquals('object', typeof NetInternalsTest.getTab(tabId), | 312 assertEquals('object', typeof NetInternalsTest.getTab(tabId), |
| 312 'Invalid tab: ' + tabId); | 313 'Invalid tab: ' + tabId); |
| 313 return tabId; | 314 return tabId; |
| 314 }; | 315 }; |
| 315 | 316 |
| (...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 726 ]; | 727 ]; |
| 727 | 728 |
| 728 for (var i = 0; i < allIds.length; ++i) { | 729 for (var i = 0; i < allIds.length; ++i) { |
| 729 var curId = allIds[i]; | 730 var curId = allIds[i]; |
| 730 expectEquals(nodeId == curId, NetInternalsTest.nodeIsVisible($(curId))); | 731 expectEquals(nodeId == curId, NetInternalsTest.nodeIsVisible($(curId))); |
| 731 } | 732 } |
| 732 }; | 733 }; |
| 733 | 734 |
| 734 return NetInternalsTest; | 735 return NetInternalsTest; |
| 735 })(); | 736 })(); |
| OLD | NEW |