Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(225)

Side by Side Diff: webkit/glue/devtools/js/tests.js

Issue 348062: Fix TestProfilerTab. (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 }; 362 };
363 363
364 364
365 /** 365 /**
366 * Test that profiler works. 366 * Test that profiler works.
367 */ 367 */
368 TestSuite.prototype.testProfilerTab = function() { 368 TestSuite.prototype.testProfilerTab = function() {
369 this.showPanel('profiles'); 369 this.showPanel('profiles');
370 370
371 var test = this; 371 var test = this;
372 this.addSniffer(WebInspector, 'addProfileHeader', 372 this.addSniffer(WebInspector.panels.profiles, 'addProfileHeader',
373 function(type, profile) { 373 function(typeOrProfile, profile) {
374 if (!profile) { 374 if (!profile) {
375 profile = type; 375 profile = typeOrProfile;
376 type = profile.typeId;
377 } 376 }
378 var panel = WebInspector.panels.profiles; 377 var panel = WebInspector.panels.profiles;
379 panel.showProfile(profile); 378 panel.showProfile(profile);
380 var node = panel.visibleView.profileDataGridTree.children[0]; 379 var node = panel.visibleView.profileDataGridTree.children[0];
381 // Iterate over displayed functions and search for a function 380 // Iterate over displayed functions and search for a function
382 // that is called 'fib' or 'eternal_fib'. If found, it will mean 381 // that is called 'fib' or 'eternal_fib'. If found, it will mean
383 // that we actually have profiled page's code. 382 // that we actually have profiled page's code.
384 while (node) { 383 while (node) {
385 if (node.functionName.indexOf('fib') != -1) { 384 if (node.functionName.indexOf('fib') != -1) {
386 test.releaseControl(); 385 test.releaseControl();
(...skipping 1359 matching lines...) Expand 10 before | Expand all | Expand 10 after
1746 /** 1745 /**
1747 * Run specified test on a fresh instance of the test suite. 1746 * Run specified test on a fresh instance of the test suite.
1748 * @param {string} name Name of a test method from TestSuite class. 1747 * @param {string} name Name of a test method from TestSuite class.
1749 */ 1748 */
1750 uiTests.runTest = function(name) { 1749 uiTests.runTest = function(name) {
1751 new TestSuite().runTest(name); 1750 new TestSuite().runTest(name);
1752 }; 1751 };
1753 1752
1754 1753
1755 } 1754 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698