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
4 found in the LICENSE file.
7 // Automation utilities.
9 function Automation() {
15 Automation.prototype.IncrementTestCount = function() {
19 Automation.prototype.GetTestCount = function() {
20 return this.test_count;
23 Automation.prototype.AddFailure = function(test) {
24 // Remove any '<!-- NOP -->' that was inserted by DOM checker.
25 test = test.replace(/<!-- NOP -->/, '');
27 this.failures.push(test);
30 Automation.prototype.GetFailures = function() {
34 Automation.prototype.SetDone = function() {
38 Automation.prototype.IsDone = function() {
42 automation = new Automation();
44 // Override functions that can spawn dialog boxes.
46 window.alert = function() {}
47 window.confirm = function() {}
48 window.prompt = function() {}