Switch global error menu icon to vectorized MD asset
[chromium-blink-merge.git] / chrome / test / data / dom_checker / automation.js
blob8b0cb05c0779404b3eb98ed1baf01b2ef2691249
1 /*
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.
5 */
7 // Automation utilities.
9 function Automation() {
10 this.test_count = 0;
11 this.failures = [];
12 this.done = false;
15 Automation.prototype.IncrementTestCount = function() {
16 this.test_count++;
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() {
31 return this.failures;
34 Automation.prototype.SetDone = function() {
35 this.done = true;
38 Automation.prototype.IsDone = function() {
39 return this.done;
42 automation = new Automation();
44 // Override functions that can spawn dialog boxes.
46 window.alert = function() {}
47 window.confirm = function() {}
48 window.prompt = function() {}