[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
simon.fraser at apple.com
simon.fraser at apple.com
Wed Dec 22 14:05:20 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit f001308ac884d626618fd7dcdd77e0cf99855d09
Author: simon.fraser at apple.com <simon.fraser at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Oct 4 06:21:34 2010 +0000
2010-10-03 Simon Fraser <simon.fraser at apple.com>
Update test suite version 20101001.
Handle database migration, and delete tests from the db that are
not present in testinfo.data.
Load about:blank into the test frame before the test url, to make
missing tests more obvious.
* CSSTestSuiteHarness/harness/harness.js:
(TestSuite.prototype.loadTest):
(TestSuite.prototype.openDatabase.creation):
(TestSuite.prototype.openDatabase.migration1_0To1_1):
(TestSuite.prototype.openDatabase.if.return):
(TestSuite.prototype.databaseReady):
(TestSuite.prototype.populateDatabaseFromTestInfoData):
(TestSuite.prototype.syncDatabaseWithTestInfoData.this.db.transaction):
(TestSuite.prototype.syncDatabaseWithTestInfoData):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68999 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKitTools/CSSTestSuiteHarness/harness/harness.js b/WebKitTools/CSSTestSuiteHarness/harness/harness.js
index 2dd522e..7227ae0 100644
--- a/WebKitTools/CSSTestSuiteHarness/harness/harness.js
+++ b/WebKitTools/CSSTestSuiteHarness/harness/harness.js
@@ -25,7 +25,7 @@
// requires jQuery
-const kTestSuiteVersion = '20100917';
+const kTestSuiteVersion = '20101001';
const kTestSuiteHome = '../' + kTestSuiteVersion + '/';
const kTestInfoDataFile = 'testinfo.data';
@@ -715,7 +715,12 @@ TestSuite.prototype.configureForManualTest = function()
TestSuite.prototype.loadTest = function(test)
{
var iframe = document.getElementById('test-frame');
- iframe.src = this.urlForTest(test.id);
+ iframe.src = 'about:blank';
+
+ var url = this.urlForTest(test.id);
+ window.setTimeout(function() {
+ iframe.src = url;
+ }, 0);
document.getElementById('test-title').innerText = test.title;
document.getElementById('test-url').innerText = this.pathForTest(test.id);
@@ -1351,12 +1356,42 @@ TestSuite.prototype.openDatabase = function()
}
var _self = this;
- this.db = window.openDatabase('css21testsuite', '1.0', 'CSS 2.1 test suite results', 10 * 1024 * 1024, function() {
- _self.databaseCreated();
- }, errorHandler);
+ this.db = window.openDatabase('css21testsuite', '', 'CSS 2.1 test suite results', 10 * 1024 * 1024);
- this.updateSummaryData();
- this.loadTestStatus();
+ // Migration handling. we assume migration will happen whenever the suite version changes,
+ // so that we can check for new or obsoleted tests.
+ function creation(tx) {
+ window.console.log('creating table');
+ tx.executeSql('CREATE TABLE tests (test PRIMARY KEY UNIQUE, ref, title, flags, links, assertion, hstatus, hcomment, xstatus, xcomment)', null, null, errorHandler);
+ }
+
+ function migration1_0To1_1(tx) {
+ window.console.log('updating 1.0 to 1.1');
+ // We'll use the 'seen' column to cross-check with testinfo.data.
+ tx.executeSql('ALTER TABLE tests ADD COLUMN seen BOOLEAN DEFAULT \"FALSE\"', null, function() {
+ _self.syncDatabaseWithTestInfoData();
+ }, errorHandler);
+ }
+
+ if (this.db.version == '') {
+ _self.db.changeVersion('', '1.0', creation, null, function() {
+ _self.db.changeVersion('1.0', '1.1', migration1_0To1_1, null, function() {
+ _self.databaseReady();
+ }, errorHandler);
+ }, errorHandler);
+
+ return;
+ }
+
+ if (this.db.version == '1.0') {
+ _self.db.changeVersion('1.0', '1.1', migration1_0To1_1, null, function() {
+ window.console.log('ready')
+ _self.databaseReady();
+ }, errorHandler);
+ return;
+ }
+
+ this.databaseReady();
}
TestSuite.prototype.databaseCreated = function(db)
@@ -1374,6 +1409,12 @@ TestSuite.prototype.databaseCreated = function(db)
});
}
+TestSuite.prototype.databaseReady = function()
+{
+ this.updateSummaryData();
+ this.loadTestStatus();
+}
+
TestSuite.prototype.storeTestResult = function(test, format, result, comment, useragent)
{
if (!this.db)
@@ -1428,7 +1469,7 @@ TestSuite.prototype.clearTestResults = function(results)
});
}
-TestSuite.prototype.populateDatabaseFromTestInfoData = function(testInfoURL)
+TestSuite.prototype.populateDatabaseFromTestInfoData = function()
{
if (!this.testInfoLoaded) {
window.console.log('Tring to populate database before testinfo.data has been loaded');
@@ -1447,6 +1488,36 @@ TestSuite.prototype.populateDatabaseFromTestInfoData = function(testInfoURL)
}
+// Deal with removed/renamed tests in a new version of the suite.
+// self.tests is canonical; the database may contain stale entries.
+TestSuite.prototype.syncDatabaseWithTestInfoData = function()
+{
+ if (!this.testInfoLoaded) {
+ window.console.log('Tring to sync database before testinfo.data has been loaded');
+ return;
+ }
+
+ var _self = this;
+ this.db.transaction(function (tx) {
+ for (var testID in _self.tests)
+ tx.executeSql('UPDATE tests SET seen=\"TRUE\" WHERE test=?\n', [testID], null, errorHandler);
+
+ tx.executeSql('SELECT * FROM tests WHERE seen=\"FALSE\"', [], function(tx, results) {
+ var len = results.rows.length;
+ for (var i = 0; i < len; ++i) {
+ var item = results.rows.item(i);
+ window.console.log('Test ' + item.test + ' was in the database but is no longer in the suite; deleting.');
+ }
+ }, errorHandler);
+
+ // Delete rows for disappeared tests.
+ tx.executeSql('DELETE FROM tests WHERE seen=\"FALSE\"', [], function(tx, results) {
+ _self.populatingDatabase = false;
+ _self.databaseReady();
+ }, errorHandler);
+ });
+}
+
TestSuite.prototype.queryDatabaseForAllTests = function(sortKey, perRowHandler, completionHandler)
{
if (this.populatingDatabase)
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 77a2905..bc7cdfb 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,23 @@
+2010-10-03 Simon Fraser <simon.fraser at apple.com>
+
+ Update test suite version 20101001.
+
+ Handle database migration, and delete tests from the db that are
+ not present in testinfo.data.
+
+ Load about:blank into the test frame before the test url, to make
+ missing tests more obvious.
+
+ * CSSTestSuiteHarness/harness/harness.js:
+ (TestSuite.prototype.loadTest):
+ (TestSuite.prototype.openDatabase.creation):
+ (TestSuite.prototype.openDatabase.migration1_0To1_1):
+ (TestSuite.prototype.openDatabase.if.return):
+ (TestSuite.prototype.databaseReady):
+ (TestSuite.prototype.populateDatabaseFromTestInfoData):
+ (TestSuite.prototype.syncDatabaseWithTestInfoData.this.db.transaction):
+ (TestSuite.prototype.syncDatabaseWithTestInfoData):
+
2010-10-02 Simon Fraser <simon.fraser at apple.com>
Add the ability to jump to a specific test.
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list