[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

dumi at chromium.org dumi at chromium.org
Thu Apr 8 02:08:46 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 49c079701f7d0128d39ecf8e293c1e2350038a37
Author: dumi at chromium.org <dumi at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Mar 4 01:20:25 2010 +0000

    Making database-lock-after-reload.html a bit more robust and
    cleaning up some style issues.
    
    Reviewed by Dimitri Glazkov.
    
    * storage/database-lock-after-reload.html:
    * storage/resources/database-lock-after-reload-2.html:
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55490 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index dd14525..153552e 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2010-03-03  Dumitru Daniliuc  <dumi at chromium.org>
+
+        Reviewed by Dimitri Glazkov.
+
+        Making database-lock-after-reload.html a bit more robust and
+        cleaning up some style issues.
+
+        * storage/database-lock-after-reload.html:
+        * storage/resources/database-lock-after-reload-2.html:
+
 2010-03-03  David Levin  <levin at chromium.org>
 
         No review, rolling out r55474.
diff --git a/LayoutTests/storage/database-lock-after-reload.html b/LayoutTests/storage/database-lock-after-reload.html
index 8bdaddc..5b5989f 100644
--- a/LayoutTests/storage/database-lock-after-reload.html
+++ b/LayoutTests/storage/database-lock-after-reload.html
@@ -1,8 +1,6 @@
 <html>
 <head>
 <script>
-var database;
-
 function log(message)
 {
     document.getElementById("console").innerHTML += message + "<br>";
@@ -15,7 +13,7 @@ function finishTest()
         layoutTestController.notifyDone();
 }
 
-function errorFunction(tx, error)
+function errorFunction(error)
 {
     log("Test failed - " + error.message);
     finishTest();
@@ -23,16 +21,16 @@ function errorFunction(tx, error)
 
 function addData(db)
 {
-    db.transaction(function(tx) { 
+    db.transaction(function(tx) {
         log("Inserting some data");
-        // Insert a large amount of data that will take a little while to run. Schedule a timout to run that will load a new page
-        // whilst the transaction is still in progress, interrupting the transaction. This should not leave the database locked and on
-        // the next page we should be able to insert some more data.
-        tx.executeSql("INSERT INTO DataTest (testData) VALUES (ZEROBLOB(524200))", [], function(tx, result) { }, errorFunction);
-        location.href = "./resources/database-lock-after-reload-2.html";
-    }, errorFunction, function() { 
-        finishTest();
-    });
+        // Load a new page while the transaction is still in progress, interrupting the transaction.
+        // This should not leave the database locked and on the next page we should be able to insert
+        // some more data.
+        tx.executeSql("INSERT INTO DataTest (testData) VALUES (ZEROBLOB(524200))", [],
+            function(tx, result) { location.href = "./resources/database-lock-after-reload-2.html"; },
+            function(tx, error) { errorFunction(error); });
+        tx.executeSql("INSERT INTO DataTest (testData) VALUES (ZEROBLOB(524200))");
+    }, errorFunction, function() { finishTest(); });
 }
 
 function runTest()
@@ -42,20 +40,20 @@ function runTest()
         layoutTestController.dumpAsText();
         layoutTestController.waitUntilDone();
     }
-    
+
+    var database;
     try {
         database = openDatabase("DatabaseLockTest", "1.0", "Test for database locking", 5242880);
     } catch (e) {
         log("Error - could not open database");
         finishTest();
     }
-    
+
     database.transaction(function(tx) {
         log("Adding a table");
-        tx.executeSql("CREATE TABLE DataTest (testData)", [], function(tx, result) { }, errorFunction); 
-    }, errorFunction, function() { 
-        addData(database); 
-    });
+        tx.executeSql("CREATE TABLE DataTest (testData)", [], function(tx, result) { },
+            function(tx, error) { errorFunction(error); });
+    }, errorFunction, function() { addData(database); });
 }
 
 </script>
diff --git a/LayoutTests/storage/resources/database-lock-after-reload-2.html b/LayoutTests/storage/resources/database-lock-after-reload-2.html
index d73a0df..6e0f09c 100644
--- a/LayoutTests/storage/resources/database-lock-after-reload-2.html
+++ b/LayoutTests/storage/resources/database-lock-after-reload-2.html
@@ -1,8 +1,6 @@
 <html>
 <head>
 <script>
-var database;
-
 function log(message)
 {
     document.getElementById("console").innerHTML += message + "<br>";
@@ -15,7 +13,7 @@ function finishTest()
         layoutTestController.notifyDone();
 }
 
-function errorFunction(tx, error)
+function errorFunction(error)
 {
     log("Test failed - " + error.message);
     finishTest();
@@ -23,13 +21,11 @@ function errorFunction(tx, error)
 
 function addData(db)
 {
-    db.transaction(function(tx) { 
+    db.transaction(function(tx) {
         log("Inserting some data");
-
-        tx.executeSql("INSERT INTO DataTest (testData) VALUES (?)", ["A"], function(tx, result) { }, errorFunction);
-    }, function(){}, function() { 
-        finishTest();
-    });
+        tx.executeSql("INSERT INTO DataTest (testData) VALUES (?)", ["A"],
+            function(tx, result) { }, function(tx, error) { errorFunction(error); });
+    }, function() { }, function() { finishTest(); });
 }
 
 function runTest()
@@ -38,9 +34,9 @@ function runTest()
         layoutTestController.dumpAsText();
         layoutTestController.waitUntilDone();
     }
-    
+
     try {
-        database = openDatabase("DatabaseLockTest", "1.0", "Test for database locking", 5242880);
+        var database = openDatabase("DatabaseLockTest", "1.0", "Test for database locking", 5242880);
         addData(database);
     } catch(e) {
         log("Error - could not open database");

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list