| 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 * @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 27 matching lines...) Expand all Loading... |
| 38 timeline: TimelineView.TAB_HANDLE_ID, | 38 timeline: TimelineView.TAB_HANDLE_ID, |
| 39 dns: DnsView.TAB_HANDLE_ID, | 39 dns: DnsView.TAB_HANDLE_ID, |
| 40 sockets: SocketsView.TAB_HANDLE_ID, | 40 sockets: SocketsView.TAB_HANDLE_ID, |
| 41 spdy: SpdyView.TAB_HANDLE_ID, | 41 spdy: SpdyView.TAB_HANDLE_ID, |
| 42 httpCache: HttpCacheView.TAB_HANDLE_ID, | 42 httpCache: HttpCacheView.TAB_HANDLE_ID, |
| 43 httpThrottling: HttpThrottlingView.TAB_HANDLE_ID, | 43 httpThrottling: HttpThrottlingView.TAB_HANDLE_ID, |
| 44 serviceProviders: ServiceProvidersView.TAB_HANDLE_ID, | 44 serviceProviders: ServiceProvidersView.TAB_HANDLE_ID, |
| 45 tests: TestView.TAB_HANDLE_ID, | 45 tests: TestView.TAB_HANDLE_ID, |
| 46 hsts: HSTSView.TAB_HANDLE_ID, | 46 hsts: HSTSView.TAB_HANDLE_ID, |
| 47 logs: LogsView.TAB_HANDLE_ID, | 47 logs: LogsView.TAB_HANDLE_ID, |
| 48 prerender: PrerenderView.TAB_HANDLE_ID | 48 prerender: PrerenderView.TAB_HANDLE_ID, |
| 49 chromeos: CrosView.TAB_HANDLE_ID |
| 49 }; | 50 }; |
| 50 | 51 |
| 51 /** | 52 /** |
| 52 * Creates a test function that can use the expect and assert functions | 53 * Creates a test function that can use the expect and assert functions |
| 53 * in test_api.js. Will call testDone() in response to any failure. | 54 * in test_api.js. Will call testDone() in response to any failure. |
| 54 * | 55 * |
| 55 * The resulting function has no return value. | 56 * The resulting function has no return value. |
| 56 * @param {string} testName The name of the function, reported on error. | 57 * @param {string} testName The name of the function, reported on error. |
| 57 * @param {Function} testFunction The function to run. | 58 * @param {Function} testFunction The function to run. |
| 58 * @return {function():void} Function that passes its parameters to | 59 * @return {function():void} Function that passes its parameters to |
| (...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 578 HostResolverInfoObserver.prototype.onHostResolverInfoChanged = function() { | 579 HostResolverInfoObserver.prototype.onHostResolverInfoChanged = function() { |
| 579 assertNotReached(); | 580 assertNotReached(); |
| 580 }; | 581 }; |
| 581 | 582 |
| 582 // Create the observer and add it to |g_browser|. | 583 // Create the observer and add it to |g_browser|. |
| 583 g_browser.addHostResolverInfoObserver(new HostResolverInfoObserver()); | 584 g_browser.addHostResolverInfoObserver(new HostResolverInfoObserver()); |
| 584 | 585 |
| 585 // Needed to trigger an update. | 586 // Needed to trigger an update. |
| 586 netInternalsTest.switchToView('dns'); | 587 netInternalsTest.switchToView('dns'); |
| 587 }); | 588 }); |
| OLD | NEW |