1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 function debug(message
) {
6 var span
= document
.createElement("span");
7 span
.appendChild(document
.createTextNode(message
));
8 span
.appendChild(document
.createElement("br"));
9 document
.getElementById('status').appendChild(span
);
12 function done(message
) {
13 if (document
.location
.hash
== '#fail')
16 debug('PASS: ' + message
);
19 document
.location
.hash
= '#pass';
22 function fail(message
) {
23 debug('FAILED: ' + message
);
24 document
.location
.hash
= '#fail';
28 return "" + document
.getElementById('status').innerHTML
;