Reviewed by T3h Mitz Pettel (Dan Bernstein)
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Feb 2008 00:28:14 +0000 (00:28 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Feb 2008 00:28:14 +0000 (00:28 +0000)
        Layout test for already fixed bug <rdar://problem/5729445>

        * storage/multiple-transactions-expected.txt: Added.
        * storage/multiple-transactions.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@30578 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/storage/multiple-transactions-expected.txt [new file with mode: 0644]
LayoutTests/storage/multiple-transactions.html [new file with mode: 0644]

index 90895cc420242994d9092ac2315c578dc0a540d0..cf852b4196385257a8b080187fb80df83d6c49ef 100644 (file)
@@ -1,3 +1,12 @@
+2008-02-25  Brady Eidson  <beidson@apple.com>
+
+        Reviewed by T3h Mitz Pettel (Dan Bernstein)
+
+        Layout test for already fixed bug <rdar://problem/5729445>
+
+        * storage/multiple-transactions-expected.txt: Added.
+        * storage/multiple-transactions.html: Added.
+
 2008-02-25  Darin Adler  <darin@apple.com>
 
         Reviewed by Anders.
diff --git a/LayoutTests/storage/multiple-transactions-expected.txt b/LayoutTests/storage/multiple-transactions-expected.txt
new file mode 100644 (file)
index 0000000..3e9c0f6
--- /dev/null
@@ -0,0 +1,6 @@
+This is a test to see if the database API allows multiple transactions to be queued on the same database at once:
+Transaction 1 Started
+Transaction 1 Succeeded
+Transaction 2 Started
+Transaction 2 Succeeded
+
diff --git a/LayoutTests/storage/multiple-transactions.html b/LayoutTests/storage/multiple-transactions.html
new file mode 100644 (file)
index 0000000..56656ca
--- /dev/null
@@ -0,0 +1,53 @@
+<html>
+<head>
+<script>
+
+function log(message)
+{
+    document.body.innerHTML += message + "<br>";
+}
+
+var complete = 0;
+
+function checkCompletion()
+{
+    if (++complete == 2 && window.layoutTestController)
+        layoutTestController.notifyDone();
+}
+
+function runTest()
+{
+    if (window.layoutTestController) {
+        layoutTestController.dumpAsText();
+        layoutTestController.waitUntilDone();
+    }
+    
+    var db = openDatabase("MultipleTransactionsTest", "1.0", "Test to make sure multiple transactions can be queued at once for an HTML5 database", 32768);
+
+    db.transaction(function(tx) {
+        log("Transaction 1 Started");
+    }, function(err) {
+        log("Transaction 1 Errored - " + err);
+        checkCompletion();
+    }, function() {
+        log("Transaction 1 Succeeded");
+        checkCompletion();
+    });
+
+    db.transaction(function(tx) {
+        log("Transaction 2 Started");
+    }, function(err) {
+        log("Transaction 2 Errored - " + err);
+        checkCompletion();
+    }, function() {
+        log("Transaction 2 Succeeded");
+        checkCompletion();
+    });
+}
+
+</script>
+<head>
+<body onload="runTest();">
+This is a test to see if the database API allows multiple transactions to be queued on the same database at once:<br>
+</body>
+</html>