Chromium Code Reviews| 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 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 437 test.assertTrue(!!bps[line].getV8Id(), | 437 test.assertTrue(!!bps[line].getV8Id(), |
| 438 'Breakpoint id was not assigned.'); | 438 'Breakpoint id was not assigned.'); |
| 439 test.releaseControl(); | 439 test.releaseControl(); |
| 440 }); | 440 }); |
| 441 | 441 |
| 442 this.takeControl(); | 442 this.takeControl(); |
| 443 }; | 443 }; |
| 444 | 444 |
| 445 | 445 |
| 446 /** | 446 /** |
| 447 * Tests 'Pause' button will pause debugger when a snippet is evaluated. | |
| 448 */ | |
| 449 TestSuite.prototype.testPauseInEval = function() { | |
| 450 this.showPanel('scripts'); | |
| 451 | |
| 452 var test = this; | |
| 453 | |
| 454 var pauseButton = document.getElementById('scripts-pause'); | |
| 455 pauseButton.click(); | |
| 456 | |
| 457 devtools.tools.evaluateJavaScript('fib(10)'); | |
| 458 | |
| 459 this.addSniffer(WebInspector, 'pausedScript', | |
| 460 function() { | |
| 461 alert(0); | |
|
pfeldman
2009/07/27 07:50:15
alert?
| |
| 462 test.releaseControl(); | |
| 463 }); | |
| 464 | |
| 465 test.takeControl(); | |
| 466 }; | |
| 467 | |
| 468 | |
| 469 /** | |
| 447 * Key event with given key identifier. | 470 * Key event with given key identifier. |
| 448 */ | 471 */ |
| 449 TestSuite.KeyEvent = function(key) { | 472 TestSuite.KeyEvent = function(key) { |
| 450 this.keyIdentifier = key; | 473 this.keyIdentifier = key; |
| 451 }; | 474 }; |
| 452 TestSuite.KeyEvent.prototype.preventDefault = function() {}; | 475 TestSuite.KeyEvent.prototype.preventDefault = function() {}; |
| 453 TestSuite.KeyEvent.prototype.stopPropagation = function() {}; | 476 TestSuite.KeyEvent.prototype.stopPropagation = function() {}; |
| 454 | 477 |
| 455 | 478 |
| 456 /** | 479 /** |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 565 /** | 588 /** |
| 566 * Run specified test on a fresh instance of the test suite. | 589 * Run specified test on a fresh instance of the test suite. |
| 567 * @param {string} name Name of a test method from TestSuite class. | 590 * @param {string} name Name of a test method from TestSuite class. |
| 568 */ | 591 */ |
| 569 uiTests.runTest = function(name) { | 592 uiTests.runTest = function(name) { |
| 570 new TestSuite().runTest(name); | 593 new TestSuite().runTest(name); |
| 571 }; | 594 }; |
| 572 | 595 |
| 573 | 596 |
| 574 } | 597 } |
| OLD | NEW |