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.
6 This file is a manual test runner for JavaScript unit tests. It finds all the
7 global functions starting with "test" and runs them. It is useful for developing
8 and debugging JavaScript unit tests.
10 See: chrome/test/data/extensions/schema_test.js for an example.
12 <textarea style=
"position:absolute; left:5px; top:5px; right:5px; bottom:5px;">
15 <!-- Add a reference to the script and the script test files here. -->
16 <script src=
"../../renderer/resources/json_schema.js"></script>
17 <script src=
"extensions/json_schema_test.js"></script>
21 console
.log
.apply(console
, arguments
);
24 function runAllTests() {
25 for (var p
in window
) {
26 if (p
.substring(0, 4) == "test") {
30 window
.setTimeout(function() {
36 window
.setTimeout(function() {
42 print((success
? "PASS" : "FAIL") + " " + p
);
48 document
.getElementsByTagName("textarea")[0].value
+= msg
+ "\n";