Diff
Modified: trunk/LayoutTests/ChangeLog (119855 => 119856)
--- trunk/LayoutTests/ChangeLog 2012-06-08 19:25:27 UTC (rev 119855)
+++ trunk/LayoutTests/ChangeLog 2012-06-08 19:49:11 UTC (rev 119856)
@@ -1,3 +1,19 @@
+2012-06-08 Joshua Bell <[email protected]>
+
+ IndexedDB: Add regression test to verify that legacy constants have been removed
+ https://bugs.webkit.org/show_bug.cgi?id=88669
+
+ Reviewed by Tony Chang.
+
+ * storage/indexeddb/legacy-constants-expected.txt:
+ * storage/indexeddb/mozilla/create-index-unique-expected.txt:
+ * storage/indexeddb/mozilla/resources/create-index-unique.js:
+ (createAndVerifyIndex):
+ * storage/indexeddb/resources/constants.js:
+ (test):
+ * storage/indexeddb/resources/legacy-constants.js:
+ (testObsoleteConstants):
+
2012-06-08 Ojan Vafai <[email protected]>
First wave of Chromium rebaselines after skia rollback. See crbug.com/131829.
Modified: trunk/LayoutTests/storage/indexeddb/legacy-constants-expected.txt (119855 => 119856)
--- trunk/LayoutTests/storage/indexeddb/legacy-constants-expected.txt 2012-06-08 19:25:27 UTC (rev 119855)
+++ trunk/LayoutTests/storage/indexeddb/legacy-constants-expected.txt 2012-06-08 19:49:11 UTC (rev 119856)
@@ -72,6 +72,16 @@
request = store.openCursor(1, IDBCursor.PREV_NO_DUPLICATE)
PASS cursor.direction is "prevunique"
cursor.continue();
+
+Verify that constants from previous version of the spec (beyond a grace period) have been removed:
+PASS IDBKeyRange.SINGLE is undefined
+PASS IDBKeyRange.LEFT_OPEN is undefined
+PASS IDBKeyRange.RIGHT_OPEN is undefined
+PASS IDBKeyRange.LEFT_BOUND is undefined
+PASS IDBKeyRange.RIGHT_BOUND is undefined
+PASS IDBTransaction.LOADING is undefined
+PASS IDBRequest.LOADING is undefined
+PASS IDBRequest.DONE is undefined
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/storage/indexeddb/mozilla/create-index-unique-expected.txt (119855 => 119856)
--- trunk/LayoutTests/storage/indexeddb/mozilla/create-index-unique-expected.txt 2012-06-08 19:25:27 UTC (rev 119855)
+++ trunk/LayoutTests/storage/indexeddb/mozilla/create-index-unique-expected.txt 2012-06-08 19:49:11 UTC (rev 119856)
@@ -17,7 +17,6 @@
PASS objectStore.indexNames.length is 1
PASS foundNewlyCreatedIndex is true
PASS event.target.transaction.db is db
-PASS event.target.transaction.readyState is IDBTransaction.LOADING
PASS event.target.transaction.mode is 'versionchange'
PASS successfullyParsed is true
Modified: trunk/LayoutTests/storage/indexeddb/mozilla/resources/create-index-unique.js (119855 => 119856)
--- trunk/LayoutTests/storage/indexeddb/mozilla/resources/create-index-unique.js 2012-06-08 19:25:27 UTC (rev 119855)
+++ trunk/LayoutTests/storage/indexeddb/mozilla/resources/create-index-unique.js 2012-06-08 19:49:11 UTC (rev 119856)
@@ -53,7 +53,6 @@
}
shouldBeTrue("foundNewlyCreatedIndex");
shouldBe("event.target.transaction.db", "db");
- shouldBe("event.target.transaction.readyState", "IDBTransaction.LOADING");
shouldBe("event.target.transaction.mode", "'versionchange'");
finishJSTest();
}
Modified: trunk/LayoutTests/storage/indexeddb/resources/constants.js (119855 => 119856)
--- trunk/LayoutTests/storage/indexeddb/resources/constants.js 2012-06-08 19:25:27 UTC (rev 119855)
+++ trunk/LayoutTests/storage/indexeddb/resources/constants.js 2012-06-08 19:49:11 UTC (rev 119856)
@@ -22,11 +22,13 @@
shouldBe("IDBDatabaseException.ABORT_ERR", "DOMException.ABORT_ERR");
shouldBe("IDBDatabaseException.NOT_FOUND_ERR", "DOMException.NOT_FOUND_ERR");
+ // FIXME: Remove when grace period expires: http://webkit.org/b/85315
shouldBe("IDBCursor.NEXT", "0");
shouldBe("IDBCursor.NEXT_NO_DUPLICATE", "1");
shouldBe("IDBCursor.PREV", "2");
shouldBe("IDBCursor.PREV_NO_DUPLICATE", "3");
+ // FIXME: Remove when grace period expires: http://webkit.org/b/85315
shouldBe("IDBTransaction.READ_ONLY", "0");
shouldBe("IDBTransaction.READ_WRITE", "1");
shouldBe("IDBTransaction.VERSION_CHANGE", "2");
Modified: trunk/LayoutTests/storage/indexeddb/resources/legacy-constants.js (119855 => 119856)
--- trunk/LayoutTests/storage/indexeddb/resources/legacy-constants.js 2012-06-08 19:25:27 UTC (rev 119855)
+++ trunk/LayoutTests/storage/indexeddb/resources/legacy-constants.js 2012-06-08 19:49:11 UTC (rev 119856)
@@ -58,7 +58,7 @@
{
var test = tests.shift();
if (!test) {
- finishJSTest();
+ testObsoleteConstants();
return;
}
@@ -97,4 +97,39 @@
doNext();
}
-test();
\ No newline at end of file
+function testObsoleteConstants()
+{
+ debug("");
+ debug("Verify that constants from previous version of the spec (beyond a grace period) have been removed:");
+
+ // http://www.w3.org/TR/2010/WD-IndexedDB-20100819/
+ shouldBe("IDBKeyRange.SINGLE", "undefined");
+ shouldBe("IDBKeyRange.LEFT_OPEN", "undefined");
+ shouldBe("IDBKeyRange.RIGHT_OPEN", "undefined");
+ shouldBe("IDBKeyRange.LEFT_BOUND", "undefined");
+ shouldBe("IDBKeyRange.RIGHT_BOUND", "undefined");
+
+ // Unclear that this was ever in the spec, but it was present in mozilla tests:
+ shouldBe("IDBTransaction.LOADING", "undefined");
+
+ // http://www.w3.org/TR/2011/WD-IndexedDB-20111206/
+ shouldBe("IDBRequest.LOADING", "undefined");
+ shouldBe("IDBRequest.DONE", "undefined");
+
+ // http://www.w3.org/TR/2011/WD-IndexedDB-20111206/
+ // FIXME: Add when grace period expires: http://webkit.org/b/85315
+ //shouldBe("IDBCursor.NEXT", "undefined");
+ //shouldBe("IDBCursor.NEXT_NO_DUPLICATE", "undefined");
+ //shouldBe("IDBCursor.PREV", "undefined");
+ //shouldBe("IDBCursor.PREV_NO_DUPLICATE", "undefined");
+
+ // http://www.w3.org/TR/2011/WD-IndexedDB-20111206/
+ // FIXME: Add when grace period expires: http://webkit.org/b/85315
+ //shouldBe("IDBTransaction.READ_ONLY", "undefined");
+ //shouldBe("IDBTransaction.READ_WRITE", "undefined");
+ //shouldBe("IDBTransaction.VERSION_CHANGE", "undefined");
+
+ finishJSTest();
+}
+
+test();