27 lines
1.1 KiB
HTML
27 lines
1.1 KiB
HTML
|
<!DOCTYPE html>
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||
|
<script>
|
||
|
function openDatabaseAndPerformTransaction(callback)
|
||
|
{
|
||
|
var database = openDatabase("alert-inside-sql-transaction-database", "1.0", "alert-inside-sql-transaction-database", 1 * 1024 * 1024 /* bytes */);
|
||
|
database.transaction(callback);
|
||
|
}
|
||
|
|
||
|
function runTest()
|
||
|
{
|
||
|
openDatabaseAndPerformTransaction(function (sqlTransaction) { alert("Lock the device. Unlock the device and press OK."); });
|
||
|
openDatabaseAndPerformTransaction(function (sqlTransaction) { document.getElementById("result").textContent = "PASS did execute SQLTransactionCallback callback"; });
|
||
|
}
|
||
|
|
||
|
window.onload = runTest;
|
||
|
</script>
|
||
|
</head>
|
||
|
<body>
|
||
|
<p>This test can be used to verify that we execute a SQLTransactionCallback callback after locking an unlocking the device during an earlier
|
||
|
SQLTransactionCallback callback that showed a modal dialog. You should run this test both in Safari on iOS and from a home screen web app.</p>
|
||
|
<div id="result">FAIL did not execute SQLTransactionCallback callback</div>
|
||
|
</body>
|
||
|
</html>
|