Title: [114540] trunk/LayoutTests
- Revision
- 114540
- Author
- dgro...@chromium.org
- Date
- 2012-04-18 11:40:30 -0700 (Wed, 18 Apr 2012)
Log Message
IDB: Pending setVersion call in worker prevents document from opening the db, even after worker termination
https://bugs.webkit.org/show_bug.cgi?id=83952
These two tests fail in DRT most proximately because DRT provides
different instances of IDBFactoryBackend to a document and worker:
https://bugs.webkit.org/show_bug.cgi?id=82776.
One fails in chromium because of a logic error tracked by
http://crbug.com/123418. The plan is to run them both as browser tests
when the logic is fixed, but just one in the meantime.
Also added SKIP for storage/indexeddb/dont-commit-on-blocked.html
since it also can't pass in DRT and just turns the flakiness dashboard
all red.
Reviewed by Ojan Vafai.
* platform/chromium/test_expectations.txt:
* storage/indexeddb/pending-version-change-stuck-expected.txt: Added.
* storage/indexeddb/pending-version-change-stuck-works-with-terminate-expected.txt: Added.
* storage/indexeddb/pending-version-change-stuck-works-with-terminate.html: Added.
* storage/indexeddb/pending-version-change-stuck.html: Added.
* storage/indexeddb/resources/pending-version-change-stuck.js: Added.
(test.request.onsuccess.request.onblocked):
(test.request.onsuccess):
(test):
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (114539 => 114540)
--- trunk/LayoutTests/ChangeLog 2012-04-18 18:36:59 UTC (rev 114539)
+++ trunk/LayoutTests/ChangeLog 2012-04-18 18:40:30 UTC (rev 114540)
@@ -1,3 +1,32 @@
+2012-04-18 David Grogan <dgro...@chromium.org>
+
+ IDB: Pending setVersion call in worker prevents document from opening the db, even after worker termination
+ https://bugs.webkit.org/show_bug.cgi?id=83952
+
+ These two tests fail in DRT most proximately because DRT provides
+ different instances of IDBFactoryBackend to a document and worker:
+ https://bugs.webkit.org/show_bug.cgi?id=82776.
+
+ One fails in chromium because of a logic error tracked by
+ http://crbug.com/123418. The plan is to run them both as browser tests
+ when the logic is fixed, but just one in the meantime.
+
+ Also added SKIP for storage/indexeddb/dont-commit-on-blocked.html
+ since it also can't pass in DRT and just turns the flakiness dashboard
+ all red.
+
+ Reviewed by Ojan Vafai.
+
+ * platform/chromium/test_expectations.txt:
+ * storage/indexeddb/pending-version-change-stuck-expected.txt: Added.
+ * storage/indexeddb/pending-version-change-stuck-works-with-terminate-expected.txt: Added.
+ * storage/indexeddb/pending-version-change-stuck-works-with-terminate.html: Added.
+ * storage/indexeddb/pending-version-change-stuck.html: Added.
+ * storage/indexeddb/resources/pending-version-change-stuck.js: Added.
+ (test.request.onsuccess.request.onblocked):
+ (test.request.onsuccess):
+ (test):
+
2012-04-18 Luiz Agostini <luiz.agost...@palm.com>
matchMedia() MediaQueryList not updating
Modified: trunk/LayoutTests/platform/chromium/test_expectations.txt (114539 => 114540)
--- trunk/LayoutTests/platform/chromium/test_expectations.txt 2012-04-18 18:36:59 UTC (rev 114539)
+++ trunk/LayoutTests/platform/chromium/test_expectations.txt 2012-04-18 18:40:30 UTC (rev 114540)
@@ -3673,8 +3673,10 @@
BUGWK82717 SNOWLEOPARD : storage/executesql-accepts-only-one-statement.html = PASS TIMEOUT
BUGWK82717 SNOWLEOPARD : storage/database-lock-after-reload.html = PASS TIMEOUT
-// This test depends on Worker behavior that is broken in DRT
-BUGWK82776 : storage/indexeddb/dont-commit-on-blocked.html = PASS FAIL
+// These tests depends on Worker behavior that is broken in DRT
+BUGWK82776 SKIP : storage/indexeddb/dont-commit-on-blocked.html = PASS FAIL
+BUGWK82776 SKIP : storage/indexeddb/pending-version-change-stuck.html = PASS FAIL
+BUGWK82776 SKIP : storage/indexeddb/pending-version-change-stuck-works-with-terminate.html = PASS FAIL
BUGWK WIN RELEASE : http/tests/xmlhttprequest/redirect-cross-origin-post.html = PASS TEXT
Added: trunk/LayoutTests/storage/indexeddb/pending-version-change-stuck-expected.txt (0 => 114540)
--- trunk/LayoutTests/storage/indexeddb/pending-version-change-stuck-expected.txt (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/pending-version-change-stuck-expected.txt 2012-04-18 18:40:30 UTC (rev 114540)
@@ -0,0 +1,13 @@
+Implicitly terminating worker with blocked setVersion call should allow later open calls to proceed
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+request = indexedDB.open("pending-version-change-stuck.html")
+PASS Open worked after page reload.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/storage/indexeddb/pending-version-change-stuck-works-with-terminate-expected.txt (0 => 114540)
--- trunk/LayoutTests/storage/indexeddb/pending-version-change-stuck-works-with-terminate-expected.txt (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/pending-version-change-stuck-works-with-terminate-expected.txt 2012-04-18 18:40:30 UTC (rev 114540)
@@ -0,0 +1,13 @@
+Explicitly terminating worker with blocked setVersion call should allow later open calls to proceed
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+request = indexedDB.open("pending-version-change-stuck-works-with-terminate.html")
+PASS Open worked after page reload.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/storage/indexeddb/pending-version-change-stuck-works-with-terminate.html (0 => 114540)
--- trunk/LayoutTests/storage/indexeddb/pending-version-change-stuck-works-with-terminate.html (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/pending-version-change-stuck-works-with-terminate.html 2012-04-18 18:40:30 UTC (rev 114540)
@@ -0,0 +1,51 @@
+<html>
+<head>
+<script src=""
+<script src=""
+</head>
+<body>
+<script>
+
+description("Explicitly terminating worker with blocked setVersion call should allow later open calls to proceed");
+
+function test()
+{
+ removeVendorPrefixes();
+ dbname = self.location.pathname.substring(1 + self.location.pathname.lastIndexOf("/"));
+ evalAndLog("request = indexedDB.open(\"" + dbname + "\")");
+ request._onblocked_ = unexpectedBlockedCallback;
+ request._onerror_ = unexpectedErrorCallback;
+ if (self.location.search == "?second") {
+ request._onsuccess_ = function() {
+ testPassed("Open worked after page reload.");
+ finishJSTest();
+ };
+ } else {
+ request._onsuccess_ = startTheWorker;
+ }
+}
+
+function startTheWorker()
+{
+ var worker = startWorker("resources/pending-version-change-stuck.js?" + encodeURI(dbname));
+ worker._onerror_ = function(e) {
+ testFailed(e.message);
+ finishJSTest();
+ };
+ originalOnMessage = worker.onmessage;
+ worker._onmessage_ = function(event) {
+ if (event.data == "gotblocked") {
+ worker.terminate();
+ self.location = self.location + "?second";
+ }
+ else
+ originalOnMessage(event);
+ };
+}
+
+test();
+
+</script>
+<script src=""
+</body>
+</html>
Added: trunk/LayoutTests/storage/indexeddb/pending-version-change-stuck.html (0 => 114540)
--- trunk/LayoutTests/storage/indexeddb/pending-version-change-stuck.html (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/pending-version-change-stuck.html 2012-04-18 18:40:30 UTC (rev 114540)
@@ -0,0 +1,49 @@
+<html>
+<head>
+<script src=""
+<script src=""
+</head>
+<body>
+<script>
+
+description("Implicitly terminating worker with blocked setVersion call should allow later open calls to proceed");
+
+function test()
+{
+ removeVendorPrefixes();
+ dbname = self.location.pathname.substring(1 + self.location.pathname.lastIndexOf("/"));
+ evalAndLog("request = indexedDB.open(\"" + dbname + "\")");
+ request._onblocked_ = unexpectedBlockedCallback;
+ request._onerror_ = unexpectedErrorCallback;
+ if (self.location.search == "?second") {
+ request._onsuccess_ = function() {
+ testPassed("Open worked after page reload.");
+ finishJSTest();
+ };
+ } else {
+ request._onsuccess_ = startTheWorker;
+ }
+}
+
+function startTheWorker()
+{
+ var worker = startWorker("resources/pending-version-change-stuck.js?" + encodeURI(dbname));
+ worker._onerror_ = function(e) {
+ testFailed(e.message);
+ finishJSTest();
+ };
+ originalOnMessage = worker.onmessage;
+ worker._onmessage_ = function(event) {
+ if (event.data == "gotblocked")
+ self.location = self.location + "?second";
+ else
+ originalOnMessage(event);
+ };
+}
+
+test();
+
+</script>
+<script src=""
+</body>
+</html>
Added: trunk/LayoutTests/storage/indexeddb/resources/pending-version-change-stuck.js (0 => 114540)
--- trunk/LayoutTests/storage/indexeddb/resources/pending-version-change-stuck.js (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/resources/pending-version-change-stuck.js 2012-04-18 18:40:30 UTC (rev 114540)
@@ -0,0 +1,23 @@
+if (this.importScripts) {
+ importScripts('../../../fast/js/resources/js-test-pre.js');
+ importScripts('shared.js');
+}
+
+function test()
+{
+ removeVendorPrefixes();
+ dbname = decodeURI(self.location.search.substring(1));
+ evalAndLog("request = indexedDB.open(\"" + dbname + "\")");
+ request._onerror_ = unexpectedErrorCallback;
+ request._onsuccess_ = function(e) {
+ db = request.result;
+ evalAndLog("request = db.setVersion(1)");
+ request._onsuccess_ = unexpectedSuccessCallback;
+ request._onblocked_ = function() {
+ testPassed("worker received blocked event.");
+ postMessage("gotblocked");
+ };
+ };
+}
+
+test();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes