| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 /** | 6 /** |
| 7 * @fileoverview This file contains small testing framework along with the | 7 * @fileoverview This file contains small testing framework along with the |
| 8 * test suite for the frontend. These tests are a part of the continues build | 8 * test suite for the frontend. These tests are a part of the continues build |
| 9 * and are executed by the devtools_sanity_unittest.cc as a part of the | 9 * and are executed by the devtools_sanity_unittest.cc as a part of the |
| 10 * Interactive UI Test suite. | 10 * Interactive UI Test suite. |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 * Tests that resources tab is enabled when corresponding item is selected. | 223 * Tests that resources tab is enabled when corresponding item is selected. |
| 224 */ | 224 */ |
| 225 TestSuite.prototype.testEnableResourcesTab = function() { | 225 TestSuite.prototype.testEnableResourcesTab = function() { |
| 226 this.showPanel('resources'); | 226 this.showPanel('resources'); |
| 227 | 227 |
| 228 var test = this; | 228 var test = this; |
| 229 this.addSniffer(WebInspector, 'addResource', | 229 this.addSniffer(WebInspector, 'addResource', |
| 230 function(identifier, payload) { | 230 function(identifier, payload) { |
| 231 test.assertEquals('simple_page.html', payload.lastPathComponent); | 231 test.assertEquals('simple_page.html', payload.lastPathComponent); |
| 232 WebInspector.panels.resources.refresh(); | 232 WebInspector.panels.resources.refresh(); |
| 233 WebInspector.resources[identifier]._resourcesTreeElement.select(); | 233 WebInspector.panels.resources.revealAndSelectItem( |
| 234 WebInspector.resources[identifier]); |
| 234 | 235 |
| 235 test.releaseControl(); | 236 test.releaseControl(); |
| 236 }); | 237 }); |
| 237 | 238 |
| 238 // Following call should lead to reload that we capture in the | 239 // Following call should lead to reload that we capture in the |
| 239 // addResource override. | 240 // addResource override. |
| 240 WebInspector.panels.resources._enableResourceTracking(); | 241 WebInspector.panels.resources._enableResourceTracking(); |
| 241 | 242 |
| 242 // We now have some time to report results to controller. | 243 // We now have some time to report results to controller. |
| 243 this.takeControl(); | 244 this.takeControl(); |
| (...skipping 1404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1648 /** | 1649 /** |
| 1649 * Run specified test on a fresh instance of the test suite. | 1650 * Run specified test on a fresh instance of the test suite. |
| 1650 * @param {string} name Name of a test method from TestSuite class. | 1651 * @param {string} name Name of a test method from TestSuite class. |
| 1651 */ | 1652 */ |
| 1652 uiTests.runTest = function(name) { | 1653 uiTests.runTest = function(name) { |
| 1653 new TestSuite().runTest(name); | 1654 new TestSuite().runTest(name); |
| 1654 }; | 1655 }; |
| 1655 | 1656 |
| 1656 | 1657 |
| 1657 } | 1658 } |
| OLD | NEW |