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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 sockets: SocketsView.TAB_HANDLE_ID, | 248 sockets: SocketsView.TAB_HANDLE_ID, |
249 spdy: SpdyView.TAB_HANDLE_ID, | 249 spdy: SpdyView.TAB_HANDLE_ID, |
250 httpPipeline: HttpPipelineView.TAB_HANDLE_ID, | 250 httpPipeline: HttpPipelineView.TAB_HANDLE_ID, |
251 httpCache: HttpCacheView.TAB_HANDLE_ID, | 251 httpCache: HttpCacheView.TAB_HANDLE_ID, |
252 serviceProviders: ServiceProvidersView.TAB_HANDLE_ID, | 252 serviceProviders: ServiceProvidersView.TAB_HANDLE_ID, |
253 tests: TestView.TAB_HANDLE_ID, | 253 tests: TestView.TAB_HANDLE_ID, |
254 hsts: HSTSView.TAB_HANDLE_ID, | 254 hsts: HSTSView.TAB_HANDLE_ID, |
255 logs: LogsView.TAB_HANDLE_ID, | 255 logs: LogsView.TAB_HANDLE_ID, |
256 prerender: PrerenderView.TAB_HANDLE_ID, | 256 prerender: PrerenderView.TAB_HANDLE_ID, |
257 bandwidth: BandwidthView.TAB_HANDLE_ID, | 257 bandwidth: BandwidthView.TAB_HANDLE_ID, |
258 chromeos: CrosView.TAB_HANDLE_ID | 258 chromeos: CrosView.TAB_HANDLE_ID, |
| 259 mobile: MobileView.TAB_HANDLE_ID |
259 }; | 260 }; |
260 | 261 |
261 assertEquals(typeof hashToTabHandleIdMap[hash], 'string', | 262 assertEquals(typeof hashToTabHandleIdMap[hash], 'string', |
262 'Invalid tab anchor: ' + hash); | 263 'Invalid tab anchor: ' + hash); |
263 var tabId = hashToTabHandleIdMap[hash]; | 264 var tabId = hashToTabHandleIdMap[hash]; |
264 assertEquals('object', typeof NetInternalsTest.getTab(tabId), | 265 assertEquals('object', typeof NetInternalsTest.getTab(tabId), |
265 'Invalid tab: ' + tabId); | 266 'Invalid tab: ' + tabId); |
266 return tabId; | 267 return tabId; |
267 }; | 268 }; |
268 | 269 |
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
683 ]; | 684 ]; |
684 | 685 |
685 for (var i = 0; i < allIds.length; ++i) { | 686 for (var i = 0; i < allIds.length; ++i) { |
686 var curId = allIds[i]; | 687 var curId = allIds[i]; |
687 expectEquals(nodeId == curId, NetInternalsTest.nodeIsVisible($(curId))); | 688 expectEquals(nodeId == curId, NetInternalsTest.nodeIsVisible($(curId))); |
688 } | 689 } |
689 }; | 690 }; |
690 | 691 |
691 return NetInternalsTest; | 692 return NetInternalsTest; |
692 })(); | 693 })(); |
OLD | NEW |