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

Side by Side Diff: chrome/test/data/dom_checker/automation.js

Issue 53064: - Launch DOM checker in the subdirectory 'dom_checker/', as specified by the... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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 | « no previous file | chrome/test/data/dom_checker/dom_checker.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 Copyright (c) 2009 The Chromium Authors. All rights reserved. 2 Copyright (c) 2009 The Chromium Authors. All rights reserved.
3 Use of this source code is governed by a BSD-style license that can be 3 Use of this source code is governed by a BSD-style license that can be
4 found in the LICENSE file. 4 found in the LICENSE file.
5 */ 5 */
6 6
7 // Automation utilities. 7 // Automation utilities.
8 8
9 function Automation() { 9 function Automation() {
10 this.test_count = 0; 10 this.test_count = 0;
11 this.failures = []; 11 this.failures = [];
12 this.done = false; 12 this.done = false;
13 } 13 }
14 14
15 Automation.prototype.IncrementTestCount = function() { 15 Automation.prototype.IncrementTestCount = function() {
16 this.test_count++; 16 this.test_count++;
17 } 17 }
18 18
19 Automation.prototype.GetTestCount = function() { 19 Automation.prototype.GetTestCount = function() {
20 return this.test_count; 20 return this.test_count;
21 } 21 }
22 22
23 Automation.prototype.AddFailure = function(test) { 23 Automation.prototype.AddFailure = function(test) {
24 // Remove any '<!-- NOP -->' that was inserted by DOM checker.
25 test = test.replace(/<!-- NOP -->/, '');
26
24 this.failures.push(test); 27 this.failures.push(test);
25 } 28 }
26 29
27 Automation.prototype.GetFailures = function() { 30 Automation.prototype.GetFailures = function() {
28 return this.failures; 31 return this.failures;
29 } 32 }
30 33
31 Automation.prototype.SetDone = function() { 34 Automation.prototype.SetDone = function() {
32 this.done = true; 35 this.done = true;
33 } 36 }
34 37
35 Automation.prototype.IsDone = function() { 38 Automation.prototype.IsDone = function() {
36 return this.done; 39 return this.done;
37 } 40 }
38 41
39 automation = new Automation(); 42 automation = new Automation();
40 43
41 // Override functions that can spawn dialog boxes. 44 // Override functions that can spawn dialog boxes.
42 45
43 window.alert = function() {} 46 window.alert = function() {}
44 window.confirm = function() {} 47 window.confirm = function() {}
45 window.prompt = function() {} 48 window.prompt = function() {}
OLDNEW
« no previous file with comments | « no previous file | chrome/test/data/dom_checker/dom_checker.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698