Title: [135222] trunk/LayoutTests
- Revision
- 135222
- Author
- [email protected]
- Date
- 2012-11-19 17:58:40 -0800 (Mon, 19 Nov 2012)
Log Message
IndexedDB: convert delete-closed-database-object to upgradeneeded
https://bugs.webkit.org/show_bug.cgi?id=102458
Reviewed by Tony Chang.
This test relies on gc behavior and seems flaky in content_shell.
* storage/indexeddb/delete-closed-database-object-expected.txt:
* storage/indexeddb/resources/delete-closed-database-object.js:
(prepareDatabase):
(openSuccess.openRequest.onsuccess):
(openSuccess):
(setVersion):
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (135221 => 135222)
--- trunk/LayoutTests/ChangeLog 2012-11-20 01:55:10 UTC (rev 135221)
+++ trunk/LayoutTests/ChangeLog 2012-11-20 01:58:40 UTC (rev 135222)
@@ -1,3 +1,19 @@
+2012-11-19 David Grogan <[email protected]>
+
+ IndexedDB: convert delete-closed-database-object to upgradeneeded
+ https://bugs.webkit.org/show_bug.cgi?id=102458
+
+ Reviewed by Tony Chang.
+
+ This test relies on gc behavior and seems flaky in content_shell.
+
+ * storage/indexeddb/delete-closed-database-object-expected.txt:
+ * storage/indexeddb/resources/delete-closed-database-object.js:
+ (prepareDatabase):
+ (openSuccess.openRequest.onsuccess):
+ (openSuccess):
+ (setVersion):
+
2012-11-19 Chris Rogers <[email protected]>
Implement .detune attribute for BiquadFilterNode
Modified: trunk/LayoutTests/storage/indexeddb/delete-closed-database-object-expected.txt (135221 => 135222)
--- trunk/LayoutTests/storage/indexeddb/delete-closed-database-object-expected.txt 2012-11-20 01:55:10 UTC (rev 135221)
+++ trunk/LayoutTests/storage/indexeddb/delete-closed-database-object-expected.txt 2012-11-20 01:58:40 UTC (rev 135222)
@@ -1,4 +1,3 @@
-CONSOLE MESSAGE: The setVersion() method is non-standard and will be removed. Use the "upgradeneeded" event instead.
Ensure that IDBDatabase objects are deleted when there are no retaining paths left
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
@@ -6,13 +5,16 @@
indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
-self.state = 'starting'
-indexedDB.open('delete-closed-database-object')
-db = event.target.result
-indexedDB.open('delete-closed-database-object')
-Second connection successfully established.
-calling setVersion() - callback should run immediately
-db.setVersion('version 1')
+dbname = "delete-closed-database-object.html"
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+db.close()
+We can't specify a version here due to http://wkbug.com/102716
+indexedDB.open(dbname)
+Dropping references to new connection.
+gc()
+Open request should not receive a blocked event:
+indexedDB.open(dbname, 2)
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/storage/indexeddb/resources/delete-closed-database-object.js (135221 => 135222)
--- trunk/LayoutTests/storage/indexeddb/resources/delete-closed-database-object.js 2012-11-20 01:55:10 UTC (rev 135221)
+++ trunk/LayoutTests/storage/indexeddb/resources/delete-closed-database-object.js 2012-11-20 01:58:40 UTC (rev 135222)
@@ -5,45 +5,35 @@
description("Ensure that IDBDatabase objects are deleted when there are no retaining paths left");
-function test() {
- removeVendorPrefixes();
- openDBConnection();
-}
-
-function openDBConnection()
+indexedDBTest(prepareDatabase, openSuccess);
+function prepareDatabase()
{
- evalAndLog("self.state = 'starting'");
- request = evalAndLog("indexedDB.open('delete-closed-database-object')");
- request._onsuccess_ = openSuccess;
- request._onerror_ = unexpectedErrorCallback;
}
function openSuccess()
{
- self.db = evalAndLog("db = event.target.result");
+ db = event.target.result;
+ evalAndLog("db.close()");
- // Open a second connection to the same database.
- var request2 = evalAndLog("indexedDB.open('delete-closed-database-object')");
- request2._onsuccess_ = openSuccess2;
- request2._onerror_ = unexpectedErrorCallback;
+ debug("We can't specify a version here due to http://wkbug.com/102716");
+ var openRequest = evalAndLog("indexedDB.open(dbname)"); // NOTE: No version specified.
+ openRequest._onblocked_ = unexpectedBlockedCallback;
+ openRequest._onupgradeneeded_ = unexpectedUpgradeNeededCallback;
+ openRequest._onerror_ = unexpectedErrorCallback;
+ openRequest._onsuccess_ = function() {
+ debug("Dropping references to new connection.");
+ // After leaving this function, there are no remaining references to the
+ // db, so it should get deleted.
+ setTimeout(setVersion, 2);
+ };
}
-function openSuccess2()
-{
- debug("Second connection successfully established.");
- // After leaving this function, there are no remaining references to the
- // second connection, so it should get deleted.
- setTimeout(setVersion, 2);
-}
-
function setVersion()
{
- gc();
- debug("calling setVersion() - callback should run immediately");
- var versionChangeRequest = evalAndLog("db.setVersion('version 1')");
- versionChangeRequest._onerror_ = unexpectedErrorCallback;
- versionChangeRequest._onblocked_ = unexpectedBlockedCallback;
- versionChangeRequest._onsuccess_ = finishJSTest;
+ evalAndLog("gc()");
+ debug("Open request should not receive a blocked event:");
+ var request = evalAndLog("indexedDB.open(dbname, 2)");
+ request._onerror_ = unexpectedErrorCallback;
+ request._onblocked_ = unexpectedBlockedCallback;
+ request._onsuccess_ = finishJSTest;
}
-
-test();
\ No newline at end of file
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes