Diff
Modified: trunk/LayoutTests/ChangeLog (135307 => 135308)
--- trunk/LayoutTests/ChangeLog 2012-11-20 21:00:08 UTC (rev 135307)
+++ trunk/LayoutTests/ChangeLog 2012-11-20 21:10:23 UTC (rev 135308)
@@ -1,3 +1,19 @@
+2012-11-20 David Grogan <dgro...@chromium.org>
+
+ IndexedDB: Remove legacy enum-based constants from IDL
+ https://bugs.webkit.org/show_bug.cgi?id=85315
+
+ Reviewed by Adam Barth.
+
+ * storage/indexeddb/constants-expected.txt:
+ * storage/indexeddb/cursor-overloads-expected.txt:
+ * storage/indexeddb/cursor-overloads.html:
+ * storage/indexeddb/legacy-constants-expected.txt:
+ * storage/indexeddb/resources/constants.js:
+ (test):
+ * storage/indexeddb/resources/legacy-constants.js:
+ (testObsoleteConstants):
+
2012-11-20 Jussi Kukkonen <jussi.kukko...@intel.com>
animations/stop-animation-on-suspend.html sometimes fails on all platforms
Modified: trunk/LayoutTests/storage/indexeddb/constants-expected.txt (135307 => 135308)
--- trunk/LayoutTests/storage/indexeddb/constants-expected.txt 2012-11-20 21:00:08 UTC (rev 135307)
+++ trunk/LayoutTests/storage/indexeddb/constants-expected.txt 2012-11-20 21:10:23 UTC (rev 135308)
@@ -17,13 +17,6 @@
PASS IDBDatabaseException.QUOTA_ERR is DOMException.QUOTA_EXCEEDED_ERR
PASS IDBDatabaseException.ABORT_ERR is DOMException.ABORT_ERR
PASS IDBDatabaseException.NOT_FOUND_ERR is DOMException.NOT_FOUND_ERR
-PASS IDBCursor.NEXT is 0
-PASS IDBCursor.NEXT_NO_DUPLICATE is 1
-PASS IDBCursor.PREV is 2
-PASS IDBCursor.PREV_NO_DUPLICATE is 3
-PASS IDBTransaction.READ_ONLY is 0
-PASS IDBTransaction.READ_WRITE is 1
-PASS IDBTransaction.VERSION_CHANGE is 2
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/storage/indexeddb/cursor-overloads-expected.txt (135307 => 135308)
--- trunk/LayoutTests/storage/indexeddb/cursor-overloads-expected.txt 2012-11-20 21:00:08 UTC (rev 135307)
+++ trunk/LayoutTests/storage/indexeddb/cursor-overloads-expected.txt 2012-11-20 21:10:23 UTC (rev 135308)
@@ -1,27 +1,3 @@
-CONSOLE MESSAGE: Numeric direction values are deprecated in openCursor and openKeyCursor. Use "next", "nextunique", "prev", or "prevunique".
-CONSOLE MESSAGE: Numeric direction values are deprecated in openCursor and openKeyCursor. Use "next", "nextunique", "prev", or "prevunique".
-CONSOLE MESSAGE: Numeric direction values are deprecated in openCursor and openKeyCursor. Use "next", "nextunique", "prev", or "prevunique".
-CONSOLE MESSAGE: Numeric direction values are deprecated in openCursor and openKeyCursor. Use "next", "nextunique", "prev", or "prevunique".
-CONSOLE MESSAGE: Numeric direction values are deprecated in openCursor and openKeyCursor. Use "next", "nextunique", "prev", or "prevunique".
-CONSOLE MESSAGE: Numeric direction values are deprecated in openCursor and openKeyCursor. Use "next", "nextunique", "prev", or "prevunique".
-CONSOLE MESSAGE: Numeric direction values are deprecated in openCursor and openKeyCursor. Use "next", "nextunique", "prev", or "prevunique".
-CONSOLE MESSAGE: Numeric direction values are deprecated in openCursor and openKeyCursor. Use "next", "nextunique", "prev", or "prevunique".
-CONSOLE MESSAGE: Numeric direction values are deprecated in openCursor and openKeyCursor. Use "next", "nextunique", "prev", or "prevunique".
-CONSOLE MESSAGE: Numeric direction values are deprecated in openCursor and openKeyCursor. Use "next", "nextunique", "prev", or "prevunique".
-CONSOLE MESSAGE: Numeric direction values are deprecated in openCursor and openKeyCursor. Use "next", "nextunique", "prev", or "prevunique".
-CONSOLE MESSAGE: Numeric direction values are deprecated in openCursor and openKeyCursor. Use "next", "nextunique", "prev", or "prevunique".
-CONSOLE MESSAGE: Numeric direction values are deprecated in openCursor and openKeyCursor. Use "next", "nextunique", "prev", or "prevunique".
-CONSOLE MESSAGE: Numeric direction values are deprecated in openCursor and openKeyCursor. Use "next", "nextunique", "prev", or "prevunique".
-CONSOLE MESSAGE: Numeric direction values are deprecated in openCursor and openKeyCursor. Use "next", "nextunique", "prev", or "prevunique".
-CONSOLE MESSAGE: Numeric direction values are deprecated in openCursor and openKeyCursor. Use "next", "nextunique", "prev", or "prevunique".
-CONSOLE MESSAGE: Numeric direction values are deprecated in openCursor and openKeyCursor. Use "next", "nextunique", "prev", or "prevunique".
-CONSOLE MESSAGE: Numeric direction values are deprecated in openCursor and openKeyCursor. Use "next", "nextunique", "prev", or "prevunique".
-CONSOLE MESSAGE: Numeric direction values are deprecated in openCursor and openKeyCursor. Use "next", "nextunique", "prev", or "prevunique".
-CONSOLE MESSAGE: Numeric direction values are deprecated in openCursor and openKeyCursor. Use "next", "nextunique", "prev", or "prevunique".
-CONSOLE MESSAGE: Numeric direction values are deprecated in openCursor and openKeyCursor. Use "next", "nextunique", "prev", or "prevunique".
-CONSOLE MESSAGE: Numeric direction values are deprecated in openCursor and openKeyCursor. Use "next", "nextunique", "prev", or "prevunique".
-CONSOLE MESSAGE: Numeric direction values are deprecated in openCursor and openKeyCursor. Use "next", "nextunique", "prev", or "prevunique".
-CONSOLE MESSAGE: Numeric direction values are deprecated in openCursor and openKeyCursor. Use "next", "nextunique", "prev", or "prevunique".
Validate the overloads of IDBObjectStore.openCursor(), IDBIndex.openCursor() and IDBIndex.openKeyCursor().
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
@@ -58,18 +34,6 @@
store.openCursor(0, 'prevunique')
PASS event.target.result is non-null.
PASS event.target.result.direction is "prevunique"
-store.openCursor(0, IDBCursor.NEXT)
-PASS event.target.result is non-null.
-PASS event.target.result.direction is "next"
-store.openCursor(0, IDBCursor.NEXT_NO_DUPLICATE)
-PASS event.target.result is non-null.
-PASS event.target.result.direction is "nextunique"
-store.openCursor(0, IDBCursor.PREV)
-PASS event.target.result is non-null.
-PASS event.target.result.direction is "prev"
-store.openCursor(0, IDBCursor.PREV_NO_DUPLICATE)
-PASS event.target.result is non-null.
-PASS event.target.result.direction is "prevunique"
store.openCursor(IDBKeyRange.only(0))
PASS event.target.result is non-null.
PASS event.target.result.direction is "next"
@@ -85,18 +49,6 @@
store.openCursor(IDBKeyRange.only(0), 'prevunique')
PASS event.target.result is non-null.
PASS event.target.result.direction is "prevunique"
-store.openCursor(IDBKeyRange.only(0), IDBCursor.NEXT)
-PASS event.target.result is non-null.
-PASS event.target.result.direction is "next"
-store.openCursor(IDBKeyRange.only(0), IDBCursor.NEXT_NO_DUPLICATE)
-PASS event.target.result is non-null.
-PASS event.target.result.direction is "nextunique"
-store.openCursor(IDBKeyRange.only(0), IDBCursor.PREV)
-PASS event.target.result is non-null.
-PASS event.target.result.direction is "prev"
-store.openCursor(IDBKeyRange.only(0), IDBCursor.PREV_NO_DUPLICATE)
-PASS event.target.result is non-null.
-PASS event.target.result.direction is "prevunique"
index.openCursor()
PASS event.target.result is non-null.
PASS event.target.result.direction is "next"
@@ -115,18 +67,6 @@
index.openCursor(0, 'prevunique')
PASS event.target.result is non-null.
PASS event.target.result.direction is "prevunique"
-index.openCursor(0, IDBCursor.NEXT)
-PASS event.target.result is non-null.
-PASS event.target.result.direction is "next"
-index.openCursor(0, IDBCursor.NEXT_NO_DUPLICATE)
-PASS event.target.result is non-null.
-PASS event.target.result.direction is "nextunique"
-index.openCursor(0, IDBCursor.PREV)
-PASS event.target.result is non-null.
-PASS event.target.result.direction is "prev"
-index.openCursor(0, IDBCursor.PREV_NO_DUPLICATE)
-PASS event.target.result is non-null.
-PASS event.target.result.direction is "prevunique"
index.openCursor(IDBKeyRange.only(0))
PASS event.target.result is non-null.
PASS event.target.result.direction is "next"
@@ -142,18 +82,6 @@
index.openCursor(IDBKeyRange.only(0), 'prevunique')
PASS event.target.result is non-null.
PASS event.target.result.direction is "prevunique"
-index.openCursor(IDBKeyRange.only(0), IDBCursor.NEXT)
-PASS event.target.result is non-null.
-PASS event.target.result.direction is "next"
-index.openCursor(IDBKeyRange.only(0), IDBCursor.NEXT_NO_DUPLICATE)
-PASS event.target.result is non-null.
-PASS event.target.result.direction is "nextunique"
-index.openCursor(IDBKeyRange.only(0), IDBCursor.PREV)
-PASS event.target.result is non-null.
-PASS event.target.result.direction is "prev"
-index.openCursor(IDBKeyRange.only(0), IDBCursor.PREV_NO_DUPLICATE)
-PASS event.target.result is non-null.
-PASS event.target.result.direction is "prevunique"
index.openKeyCursor()
PASS event.target.result is non-null.
PASS event.target.result.direction is "next"
@@ -172,18 +100,6 @@
index.openKeyCursor(0, 'prevunique')
PASS event.target.result is non-null.
PASS event.target.result.direction is "prevunique"
-index.openKeyCursor(0, IDBCursor.NEXT)
-PASS event.target.result is non-null.
-PASS event.target.result.direction is "next"
-index.openKeyCursor(0, IDBCursor.NEXT_NO_DUPLICATE)
-PASS event.target.result is non-null.
-PASS event.target.result.direction is "nextunique"
-index.openKeyCursor(0, IDBCursor.PREV)
-PASS event.target.result is non-null.
-PASS event.target.result.direction is "prev"
-index.openKeyCursor(0, IDBCursor.PREV_NO_DUPLICATE)
-PASS event.target.result is non-null.
-PASS event.target.result.direction is "prevunique"
index.openKeyCursor(IDBKeyRange.only(0))
PASS event.target.result is non-null.
PASS event.target.result.direction is "next"
@@ -199,18 +115,6 @@
index.openKeyCursor(IDBKeyRange.only(0), 'prevunique')
PASS event.target.result is non-null.
PASS event.target.result.direction is "prevunique"
-index.openKeyCursor(IDBKeyRange.only(0), IDBCursor.NEXT)
-PASS event.target.result is non-null.
-PASS event.target.result.direction is "next"
-index.openKeyCursor(IDBKeyRange.only(0), IDBCursor.NEXT_NO_DUPLICATE)
-PASS event.target.result is non-null.
-PASS event.target.result.direction is "nextunique"
-index.openKeyCursor(IDBKeyRange.only(0), IDBCursor.PREV)
-PASS event.target.result is non-null.
-PASS event.target.result.direction is "prev"
-index.openKeyCursor(IDBKeyRange.only(0), IDBCursor.PREV_NO_DUPLICATE)
-PASS event.target.result is non-null.
-PASS event.target.result.direction is "prevunique"
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/storage/indexeddb/cursor-overloads.html (135307 => 135308)
--- trunk/LayoutTests/storage/indexeddb/cursor-overloads.html 2012-11-20 21:00:08 UTC (rev 135307)
+++ trunk/LayoutTests/storage/indexeddb/cursor-overloads.html 2012-11-20 21:10:23 UTC (rev 135308)
@@ -28,21 +28,12 @@
checkCursorDirection("store.openCursor(0, 'nextunique')", "nextunique");
checkCursorDirection("store.openCursor(0, 'prev')", "prev");
checkCursorDirection("store.openCursor(0, 'prevunique')", "prevunique");
- checkCursorDirection("store.openCursor(0, IDBCursor.NEXT)", "next");
- checkCursorDirection("store.openCursor(0, IDBCursor.NEXT_NO_DUPLICATE)", "nextunique");
- checkCursorDirection("store.openCursor(0, IDBCursor.PREV)", "prev");
- checkCursorDirection("store.openCursor(0, IDBCursor.PREV_NO_DUPLICATE)", "prevunique");
- // FIXME: Remove when grace period expires: http://webkit.org/b/85315
checkCursorDirection("store.openCursor(IDBKeyRange.only(0))", "next");
checkCursorDirection("store.openCursor(IDBKeyRange.only(0), 'next')", "next");
checkCursorDirection("store.openCursor(IDBKeyRange.only(0), 'nextunique')", "nextunique");
checkCursorDirection("store.openCursor(IDBKeyRange.only(0), 'prev')", "prev");
checkCursorDirection("store.openCursor(IDBKeyRange.only(0), 'prevunique')", "prevunique");
- checkCursorDirection("store.openCursor(IDBKeyRange.only(0), IDBCursor.NEXT)", "next");
- checkCursorDirection("store.openCursor(IDBKeyRange.only(0), IDBCursor.NEXT_NO_DUPLICATE)", "nextunique");
- checkCursorDirection("store.openCursor(IDBKeyRange.only(0), IDBCursor.PREV)", "prev");
- checkCursorDirection("store.openCursor(IDBKeyRange.only(0), IDBCursor.PREV_NO_DUPLICATE)", "prevunique");
checkCursorDirection("index.openCursor()", "next");
checkCursorDirection("index.openCursor(0)", "next");
@@ -50,21 +41,12 @@
checkCursorDirection("index.openCursor(0, 'nextunique')", "nextunique");
checkCursorDirection("index.openCursor(0, 'prev')", "prev");
checkCursorDirection("index.openCursor(0, 'prevunique')", "prevunique");
- checkCursorDirection("index.openCursor(0, IDBCursor.NEXT)", "next");
- checkCursorDirection("index.openCursor(0, IDBCursor.NEXT_NO_DUPLICATE)", "nextunique");
- checkCursorDirection("index.openCursor(0, IDBCursor.PREV)", "prev");
- checkCursorDirection("index.openCursor(0, IDBCursor.PREV_NO_DUPLICATE)", "prevunique");
- // FIXME: Remove when grace period expires: http://webkit.org/b/85315
checkCursorDirection("index.openCursor(IDBKeyRange.only(0))", "next");
checkCursorDirection("index.openCursor(IDBKeyRange.only(0), 'next')", "next");
checkCursorDirection("index.openCursor(IDBKeyRange.only(0), 'nextunique')", "nextunique");
checkCursorDirection("index.openCursor(IDBKeyRange.only(0), 'prev')", "prev");
checkCursorDirection("index.openCursor(IDBKeyRange.only(0), 'prevunique')", "prevunique");
- checkCursorDirection("index.openCursor(IDBKeyRange.only(0), IDBCursor.NEXT)", "next");
- checkCursorDirection("index.openCursor(IDBKeyRange.only(0), IDBCursor.NEXT_NO_DUPLICATE)", "nextunique");
- checkCursorDirection("index.openCursor(IDBKeyRange.only(0), IDBCursor.PREV)", "prev");
- checkCursorDirection("index.openCursor(IDBKeyRange.only(0), IDBCursor.PREV_NO_DUPLICATE)", "prevunique");
checkCursorDirection("index.openKeyCursor()", "next");
checkCursorDirection("index.openKeyCursor(0)", "next");
@@ -72,21 +54,12 @@
checkCursorDirection("index.openKeyCursor(0, 'nextunique')", "nextunique");
checkCursorDirection("index.openKeyCursor(0, 'prev')", "prev");
checkCursorDirection("index.openKeyCursor(0, 'prevunique')", "prevunique");
- checkCursorDirection("index.openKeyCursor(0, IDBCursor.NEXT)", "next");
- checkCursorDirection("index.openKeyCursor(0, IDBCursor.NEXT_NO_DUPLICATE)", "nextunique");
- checkCursorDirection("index.openKeyCursor(0, IDBCursor.PREV)", "prev");
- checkCursorDirection("index.openKeyCursor(0, IDBCursor.PREV_NO_DUPLICATE)", "prevunique");
- // FIXME: Remove when grace period expires: http://webkit.org/b/85315
checkCursorDirection("index.openKeyCursor(IDBKeyRange.only(0))", "next");
checkCursorDirection("index.openKeyCursor(IDBKeyRange.only(0), 'next')", "next");
checkCursorDirection("index.openKeyCursor(IDBKeyRange.only(0), 'nextunique')", "nextunique");
checkCursorDirection("index.openKeyCursor(IDBKeyRange.only(0), 'prev')", "prev");
checkCursorDirection("index.openKeyCursor(IDBKeyRange.only(0), 'prevunique')", "prevunique");
- checkCursorDirection("index.openKeyCursor(IDBKeyRange.only(0), IDBCursor.NEXT)", "next");
- checkCursorDirection("index.openKeyCursor(IDBKeyRange.only(0), IDBCursor.NEXT_NO_DUPLICATE)", "nextunique");
- checkCursorDirection("index.openKeyCursor(IDBKeyRange.only(0), IDBCursor.PREV)", "prev");
- checkCursorDirection("index.openKeyCursor(IDBKeyRange.only(0), IDBCursor.PREV_NO_DUPLICATE)", "prevunique");
trans._oncomplete_ = finishJSTest;
}
Modified: trunk/LayoutTests/storage/indexeddb/legacy-constants-expected.txt (135307 => 135308)
--- trunk/LayoutTests/storage/indexeddb/legacy-constants-expected.txt 2012-11-20 21:00:08 UTC (rev 135307)
+++ trunk/LayoutTests/storage/indexeddb/legacy-constants-expected.txt 2012-11-20 21:10:23 UTC (rev 135308)
@@ -1,76 +1,4 @@
-CONSOLE MESSAGE: Numeric transaction modes are deprecated in IDBDatabase.transaction. Use "readonly" or "readwrite".
-CONSOLE MESSAGE: Numeric transaction modes are deprecated in IDBDatabase.transaction. Use "readonly" or "readwrite".
-CONSOLE MESSAGE: Numeric direction values are deprecated in openCursor and openKeyCursor. Use "next", "nextunique", "prev", or "prevunique".
-CONSOLE MESSAGE: Numeric direction values are deprecated in openCursor and openKeyCursor. Use "next", "nextunique", "prev", or "prevunique".
-CONSOLE MESSAGE: Numeric transaction modes are deprecated in IDBDatabase.transaction. Use "readonly" or "readwrite".
-CONSOLE MESSAGE: Numeric direction values are deprecated in openCursor and openKeyCursor. Use "next", "nextunique", "prev", or "prevunique".
-CONSOLE MESSAGE: Numeric direction values are deprecated in openCursor and openKeyCursor. Use "next", "nextunique", "prev", or "prevunique".
-CONSOLE MESSAGE: Numeric transaction modes are deprecated in IDBDatabase.transaction. Use "readonly" or "readwrite".
-CONSOLE MESSAGE: Numeric direction values are deprecated in openCursor and openKeyCursor. Use "next", "nextunique", "prev", or "prevunique".
-CONSOLE MESSAGE: Numeric direction values are deprecated in openCursor and openKeyCursor. Use "next", "nextunique", "prev", or "prevunique".
-CONSOLE MESSAGE: Numeric transaction modes are deprecated in IDBDatabase.transaction. Use "readonly" or "readwrite".
-CONSOLE MESSAGE: Numeric direction values are deprecated in openCursor and openKeyCursor. Use "next", "nextunique", "prev", or "prevunique".
-CONSOLE MESSAGE: Numeric direction values are deprecated in openCursor and openKeyCursor. Use "next", "nextunique", "prev", or "prevunique".
-Test that legacy direction/mode constants work
-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;
-
-dbname = "legacy-constants.html"
-indexedDB.deleteDatabase(dbname)
-indexedDB.open(dbname)
-store = db.createObjectStore('store')
-store.createIndex('index', 'value')
-
-populating store...
-trans = db.transaction('store', IDBTransaction.READ_WRITE)
-PASS trans.mode is "readwrite"
-store = trans.objectStore('store');
-store.put({value: 111}, 1)
-store.put({value: 222}, 2)
-trans = db.transaction('store', IDBTransaction.READ_ONLY)
-PASS trans.mode is "readonly"
-request = store.openCursor(null, IDBCursor.NEXT)
-PASS cursor.direction is "next"
-cursor.continue();
-PASS cursor.direction is "next"
-cursor.continue();
-request = store.openCursor(1, IDBCursor.NEXT)
-PASS cursor.direction is "next"
-cursor.continue();
-trans = db.transaction('store', IDBTransaction.READ_ONLY)
-PASS trans.mode is "readonly"
-request = store.openCursor(null, IDBCursor.NEXT_NO_DUPLICATE)
-PASS cursor.direction is "nextunique"
-cursor.continue();
-PASS cursor.direction is "nextunique"
-cursor.continue();
-request = store.openCursor(1, IDBCursor.NEXT_NO_DUPLICATE)
-PASS cursor.direction is "nextunique"
-cursor.continue();
-trans = db.transaction('store', IDBTransaction.READ_ONLY)
-PASS trans.mode is "readonly"
-request = store.openCursor(null, IDBCursor.PREV)
-PASS cursor.direction is "prev"
-cursor.continue();
-PASS cursor.direction is "prev"
-cursor.continue();
-request = store.openCursor(1, IDBCursor.PREV)
-PASS cursor.direction is "prev"
-cursor.continue();
-trans = db.transaction('store', IDBTransaction.READ_ONLY)
-PASS trans.mode is "readonly"
-request = store.openCursor(null, IDBCursor.PREV_NO_DUPLICATE)
-PASS cursor.direction is "prevunique"
-cursor.continue();
-PASS cursor.direction is "prevunique"
-cursor.continue();
-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
@@ -80,6 +8,13 @@
PASS IDBTransaction.LOADING is undefined
PASS IDBRequest.LOADING is undefined
PASS IDBRequest.DONE is undefined
+PASS IDBCursor.NEXT is undefined
+PASS IDBCursor.NEXT_NO_DUPLICATE is undefined
+PASS IDBCursor.PREV is undefined
+PASS IDBCursor.PREV_NO_DUPLICATE is undefined
+PASS IDBTransaction.READ_ONLY is undefined
+PASS IDBTransaction.READ_WRITE is undefined
+PASS IDBTransaction.VERSION_CHANGE is undefined
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/storage/indexeddb/resources/constants.js (135307 => 135308)
--- trunk/LayoutTests/storage/indexeddb/resources/constants.js 2012-11-20 21:00:08 UTC (rev 135307)
+++ trunk/LayoutTests/storage/indexeddb/resources/constants.js 2012-11-20 21:10:23 UTC (rev 135308)
@@ -21,19 +21,8 @@
shouldBe("IDBDatabaseException.QUOTA_ERR", "DOMException.QUOTA_EXCEEDED_ERR");
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");
}
test();
-finishJSTest();
\ No newline at end of file
+finishJSTest();
Modified: trunk/LayoutTests/storage/indexeddb/resources/legacy-constants.js (135307 => 135308)
--- trunk/LayoutTests/storage/indexeddb/resources/legacy-constants.js 2012-11-20 21:00:08 UTC (rev 135307)
+++ trunk/LayoutTests/storage/indexeddb/resources/legacy-constants.js 2012-11-20 21:10:23 UTC (rev 135308)
@@ -3,83 +3,7 @@
importScripts('shared.js');
}
-description("Test that legacy direction/mode constants work");
-
-indexedDBTest(prepareDatabase, populateStore);
-function prepareDatabase()
-{
- db = event.target.result;
- event.target.transaction._onabort_ = unexpectedAbortCallback;
- nstore = evalAndLog("store = db.createObjectStore('store')");
- evalAndLog("store.createIndex('index', 'value')");
-}
-function populateStore()
-{
- debug("");
- debug("populating store...");
- evalAndLog("trans = db.transaction('store', IDBTransaction.READ_WRITE)");
- shouldBeEqualToString("trans.mode", "readwrite");
- evalAndLog("store = trans.objectStore('store');");
- trans._onerror_ = unexpectedErrorCallback;
- trans._onabort_ = unexpectedAbortCallback;
-
- evalAndLog("store.put({value: 111}, 1)");
- evalAndLog("store.put({value: 222}, 2)");
- trans._oncomplete_ = doChecks;
-}
-
-function doChecks()
-{
- var tests = [
- { legacy: 'IDBCursor.NEXT', current: 'next' },
- { legacy: 'IDBCursor.NEXT_NO_DUPLICATE', current: 'nextunique' },
- { legacy: 'IDBCursor.PREV', current: 'prev' },
- { legacy: 'IDBCursor.PREV_NO_DUPLICATE', current: 'prevunique' }
- ];
-
- function doNext()
- {
- var test = tests.shift();
- if (!test) {
- testObsoleteConstants();
- return;
- }
-
- evalAndLog("trans = db.transaction('store', IDBTransaction.READ_ONLY)");
- shouldBeEqualToString("trans.mode", "readonly");
- store = trans.objectStore('store');
-
- evalAndLog("request = store.openCursor(null, " + test.legacy + ")");
- request._onsuccess_ = function()
- {
- cursor = event.target.result;
- if (!cursor) {
- testWithKey();
- return;
- }
- shouldBeEqualToString("cursor.direction", test.current);
- evalAndLog("cursor.continue();");
- };
-
- function testWithKey()
- {
- evalAndLog("request = store.openCursor(1, " + test.legacy + ")");
- request._onsuccess_ = function()
- {
- cursor = event.target.result;
- if (!cursor)
- return;
- shouldBeEqualToString("cursor.direction", test.current);
- evalAndLog("cursor.continue();");
- };
- }
-
-
- trans._oncomplete_ = doNext;
- }
- doNext();
-}
-
+testObsoleteConstants();
function testObsoleteConstants()
{
debug("");
@@ -100,17 +24,15 @@
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");
+ 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");
+ shouldBe("IDBTransaction.READ_ONLY", "undefined");
+ shouldBe("IDBTransaction.READ_WRITE", "undefined");
+ shouldBe("IDBTransaction.VERSION_CHANGE", "undefined");
finishJSTest();
}
Modified: trunk/Source/WebCore/ChangeLog (135307 => 135308)
--- trunk/Source/WebCore/ChangeLog 2012-11-20 21:00:08 UTC (rev 135307)
+++ trunk/Source/WebCore/ChangeLog 2012-11-20 21:10:23 UTC (rev 135308)
@@ -1,3 +1,23 @@
+2012-11-20 David Grogan <dgro...@chromium.org>
+
+ IndexedDB: Remove legacy enum-based constants from IDL
+ https://bugs.webkit.org/show_bug.cgi?id=85315
+
+ Reviewed by Adam Barth.
+
+ These were only present in an earlier working draft of the spec and have
+ been removed for 8 months. See
+ http://lists.w3.org/Archives/Public/public-webapps/2012JanMar/0957.html
+
+ Tests - legacy-constants.html
+
+ * Modules/indexeddb/IDBCursor.cpp:
+ (WebCore::IDBCursor::stringToDirection):
+ * Modules/indexeddb/IDBCursor.idl:
+ * Modules/indexeddb/IDBTransaction.cpp:
+ (WebCore::IDBTransaction::stringToMode):
+ * Modules/indexeddb/IDBTransaction.idl:
+
2012-11-20 Elliott Sprehn <espr...@chromium.org>
Store MutationObserver callback in a hidden property for V8
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBCursor.cpp (135307 => 135308)
--- trunk/Source/WebCore/Modules/indexeddb/IDBCursor.cpp 2012-11-20 21:00:08 UTC (rev 135307)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursor.cpp 2012-11-20 21:10:23 UTC (rev 135308)
@@ -302,14 +302,6 @@
if (directionString == IDBCursor::directionPrevUnique())
return IDBCursor::PREV_NO_DUPLICATE;
- // FIXME: Remove legacy constants. http://webkit.org/b/85315
- // FIXME: This is not thread-safe.
- DEFINE_STATIC_LOCAL(String, consoleMessage, (ASCIILiteral("Numeric direction values are deprecated in openCursor and openKeyCursor. Use \"next\", \"nextunique\", \"prev\", or \"prevunique\".")));
- if (directionString == "0" || directionString == "1" || directionString == "2" || directionString == "3") {
- context->addConsoleMessage(JSMessageSource, LogMessageType, WarningMessageLevel, consoleMessage);
- return static_cast<IDBCursor::Direction>(IDBCursor::NEXT + (directionString[0] - '0'));
- }
-
ec = TypeError;
return IDBCursor::NEXT;
}
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBCursor.idl (135307 => 135308)
--- trunk/Source/WebCore/Modules/indexeddb/IDBCursor.idl 2012-11-20 21:00:08 UTC (rev 135307)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursor.idl 2012-11-20 21:10:23 UTC (rev 135308)
@@ -27,11 +27,6 @@
Conditional=INDEXED_DATABASE,
JSNoStaticTables
] interface IDBCursor {
- // FIXME: Eventually remove legacy enum constants, see https://bugs.webkit.org/show_bug.cgi?id=85315
- const unsigned short NEXT = 0;
- const unsigned short NEXT_NO_DUPLICATE = 1;
- const unsigned short PREV = 2;
- const unsigned short PREV_NO_DUPLICATE = 3;
readonly attribute DOMString direction;
readonly attribute any key;
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp (135307 => 135308)
--- trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp 2012-11-20 21:00:08 UTC (rev 135307)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp 2012-11-20 21:10:23 UTC (rev 135308)
@@ -351,14 +351,6 @@
if (modeString == IDBTransaction::modeReadWrite())
return IDBTransaction::READ_WRITE;
- // FIXME: Remove legacy constants. http://webkit.org/b/85315
- // FIXME: This is not thread-safe.
- DEFINE_STATIC_LOCAL(String, consoleMessage, (ASCIILiteral("Numeric transaction modes are deprecated in IDBDatabase.transaction. Use \"readonly\" or \"readwrite\".")));
- if (modeString == "0" || modeString == "1") {
- context->addConsoleMessage(JSMessageSource, LogMessageType, WarningMessageLevel, consoleMessage);
- return static_cast<IDBTransaction::Mode>(IDBTransaction::READ_ONLY + (modeString[0] - '0'));
- }
-
ec = TypeError;
return IDBTransaction::READ_ONLY;
}
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.idl (135307 => 135308)
--- trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.idl 2012-11-20 21:00:08 UTC (rev 135307)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.idl 2012-11-20 21:10:23 UTC (rev 135308)
@@ -30,10 +30,6 @@
EventTarget,
JSNoStaticTables
] interface IDBTransaction {
- // FIXME: Eventually remove legacy enum constants, see https://bugs.webkit.org/show_bug.cgi?id=85315
- const unsigned short READ_ONLY = 0;
- const unsigned short READ_WRITE = 1;
- const unsigned short VERSION_CHANGE = 2;
// Properties
readonly attribute DOMString mode;