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 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 if (node.functionName.indexOf('fib') != -1) { | 423 if (node.functionName.indexOf('fib') != -1) { |
424 test.releaseControl(); | 424 test.releaseControl(); |
425 } | 425 } |
426 node = node.traverseNextNode(true, null, true); | 426 node = node.traverseNextNode(true, null, true); |
427 } | 427 } |
428 | 428 |
429 test.fail(); | 429 test.fail(); |
430 }); | 430 }); |
431 var ticksCount = 0; | 431 var ticksCount = 0; |
432 var tickRecord = '\nt,'; | 432 var tickRecord = '\nt,'; |
433 this.addSniffer(RemoteDebuggerAgent, 'DidGetNextLogLines', | 433 this.addSniffer(RemoteProfilerAgent, 'DidGetLogLines', |
434 function(log) { | 434 function(posIgnored, log) { |
435 var pos = 0; | 435 var pos = 0; |
436 while ((pos = log.indexOf(tickRecord, pos)) != -1) { | 436 while ((pos = log.indexOf(tickRecord, pos)) != -1) { |
437 pos += tickRecord.length; | 437 pos += tickRecord.length; |
438 ticksCount++; | 438 ticksCount++; |
439 } | 439 } |
440 if (ticksCount > 100) { | 440 if (ticksCount > 100) { |
441 InspectorBackend.stopProfiling(); | 441 InspectorBackend.stopProfiling(); |
442 } | 442 } |
443 }, true); | 443 }, true); |
444 | 444 |
(...skipping 1502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1947 /** | 1947 /** |
1948 * Run specified test on a fresh instance of the test suite. | 1948 * Run specified test on a fresh instance of the test suite. |
1949 * @param {string} name Name of a test method from TestSuite class. | 1949 * @param {string} name Name of a test method from TestSuite class. |
1950 */ | 1950 */ |
1951 uiTests.runTest = function(name) { | 1951 uiTests.runTest = function(name) { |
1952 new TestSuite().runTest(name); | 1952 new TestSuite().runTest(name); |
1953 }; | 1953 }; |
1954 | 1954 |
1955 | 1955 |
1956 } | 1956 } |
OLD | NEW |