1 This test ensures that exceptions are handled correctly by the various callback mechanisms present in WebCore.
3 if (window
.testRunner
) {
4 testRunner
.dumpAsText();
5 testRunner
.waitUntilDone();
8 var db
= openDatabase("exception-info-test", "1.0", "Test for exception information thrown by callbacks and timers", 1);
10 function errorObject(msg
) {
11 return { message
: "FAIL: message incorrectly pulled from thrown object in " + msg
,
12 toString: function() {return "PASS: toString called on exception value thrown from " + msg
} }
15 function eventTest() {
16 setTimeout(dbTransactionTest
, 0);
17 throw errorObject("event handler");
20 function dbTransactionTest() {
21 db
.transaction(function(tx
) {
22 setTimeout(dbStatementTest
, 0);
23 throw errorObject("sql transaction callback");
27 function dbStatementTest() {
30 tx
.executeSql("I am bogus syntax", [], function() {
31 }, function(tx
, error
) {
32 setTimeout(timerTest
, 0);
33 throw errorObject("sql error callback");
38 function timerTest() {
39 if (window
.testRunner
)
40 setTimeout("testRunner.notifyDone()", 0);
41 throw errorObject("timer");
44 window
.onload
= eventTest
;