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

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

Issue 159395: DevTools: make pause work for script evaluations (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 months 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 | Annotate | Revision Log
« no previous file with comments | « webkit/glue/devtools/js/inject.js ('k') | webkit/glue/devtools/tools_agent.h » ('j') | 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 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 test.releaseControl();
462 });
463
464 test.takeControl();
465 };
466
467
468 /**
447 * Key event with given key identifier. 469 * Key event with given key identifier.
448 */ 470 */
449 TestSuite.KeyEvent = function(key) { 471 TestSuite.KeyEvent = function(key) {
450 this.keyIdentifier = key; 472 this.keyIdentifier = key;
451 }; 473 };
452 TestSuite.KeyEvent.prototype.preventDefault = function() {}; 474 TestSuite.KeyEvent.prototype.preventDefault = function() {};
453 TestSuite.KeyEvent.prototype.stopPropagation = function() {}; 475 TestSuite.KeyEvent.prototype.stopPropagation = function() {};
454 476
455 477
456 /** 478 /**
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 /** 587 /**
566 * Run specified test on a fresh instance of the test suite. 588 * Run specified test on a fresh instance of the test suite.
567 * @param {string} name Name of a test method from TestSuite class. 589 * @param {string} name Name of a test method from TestSuite class.
568 */ 590 */
569 uiTests.runTest = function(name) { 591 uiTests.runTest = function(name) {
570 new TestSuite().runTest(name); 592 new TestSuite().runTest(name);
571 }; 593 };
572 594
573 595
574 } 596 }
OLDNEW
« no previous file with comments | « webkit/glue/devtools/js/inject.js ('k') | webkit/glue/devtools/tools_agent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698