Title: [89380] trunk
- Revision
- 89380
- Author
- [email protected]
- Date
- 2011-06-21 14:09:58 -0700 (Tue, 21 Jun 2011)
Log Message
2011-06-21 Mark Pilgrim <[email protected]>
Reviewed by Adam Barth.
IndexedDB: keyrange methods should throw TypeError if required arguments are missing
https://bugs.webkit.org/show_bug.cgi?id=63085
* storage/indexeddb/keyrange-required-arguments-expected.txt: Added.
* storage/indexeddb/keyrange-required-arguments.html: Added.
2011-06-21 Mark Pilgrim <[email protected]>
Reviewed by Adam Barth.
IndexedDB: keyrange methods should throw TypeError if required arguments are missing
https://bugs.webkit.org/show_bug.cgi?id=63085
Test: storage/indexeddb/keyrange-required-arguments.html
* storage/IDBKeyRange.idl: remove LegacyDefaultOptionalArguments flag
so missing required arguments throw TypeError, as per WebIDL spec.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (89379 => 89380)
--- trunk/LayoutTests/ChangeLog 2011-06-21 21:08:24 UTC (rev 89379)
+++ trunk/LayoutTests/ChangeLog 2011-06-21 21:09:58 UTC (rev 89380)
@@ -1,3 +1,13 @@
+2011-06-21 Mark Pilgrim <[email protected]>
+
+ Reviewed by Adam Barth.
+
+ IndexedDB: keyrange methods should throw TypeError if required arguments are missing
+ https://bugs.webkit.org/show_bug.cgi?id=63085
+
+ * storage/indexeddb/keyrange-required-arguments-expected.txt: Added.
+ * storage/indexeddb/keyrange-required-arguments.html: Added.
+
2011-06-21 Dmitry Titov <[email protected]>
[Chromium] Unreviewed, updating test expectations after r89367,
Added: trunk/LayoutTests/storage/indexeddb/keyrange-required-arguments-expected.txt (0 => 89380)
--- trunk/LayoutTests/storage/indexeddb/keyrange-required-arguments-expected.txt (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/keyrange-required-arguments-expected.txt 2011-06-21 21:09:58 UTC (rev 89380)
@@ -0,0 +1,22 @@
+Test IndexedDB keyrange required arguments
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
+PASS indexedDB == null is false
+IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;
+PASS IDBDatabaseException == null is false
+IDBCursor = window.IDBCursor || window.webkitIDBCursor;
+PASS IDBCursor == null is false
+IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange;
+PASS IDBKeyRange == null is false
+PASS IDBKeyRange.only(); threw exception TypeError: Not enough arguments.
+PASS IDBKeyRange.lowerBound(); threw exception TypeError: Not enough arguments.
+PASS IDBKeyRange.upperBound(); threw exception TypeError: Not enough arguments.
+PASS IDBKeyRange.bound(1); threw exception TypeError: Not enough arguments.
+PASS IDBKeyRange.bound(); threw exception TypeError: Not enough arguments.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/storage/indexeddb/keyrange-required-arguments.html (0 => 89380)
--- trunk/LayoutTests/storage/indexeddb/keyrange-required-arguments.html (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/keyrange-required-arguments.html 2011-06-21 21:09:58 UTC (rev 89380)
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link rel="stylesheet" href=""
+<script src=""
+<script src=""
+<script src=""
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script>
+
+description("Test IndexedDB keyrange required arguments");
+if (window.layoutTestController)
+ layoutTestController.waitUntilDone();
+
+function test()
+{
+ indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
+ shouldBeFalse("indexedDB == null");
+ IDBDatabaseException = evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;");
+ shouldBeFalse("IDBDatabaseException == null");
+ IDBCursor = evalAndLog("IDBCursor = window.IDBCursor || window.webkitIDBCursor;");
+ shouldBeFalse("IDBCursor == null");
+ IDBKeyRange = evalAndLog("IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange;");
+ shouldBeFalse("IDBKeyRange == null");
+
+ shouldThrow("IDBKeyRange.only();");
+ shouldThrow("IDBKeyRange.lowerBound();");
+ shouldThrow("IDBKeyRange.upperBound();");
+ shouldThrow("IDBKeyRange.bound(1);");
+ shouldThrow("IDBKeyRange.bound();");
+
+ done();
+}
+
+var successfullyParsed = true;
+
+test();
+
+</script>
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (89379 => 89380)
--- trunk/Source/WebCore/ChangeLog 2011-06-21 21:08:24 UTC (rev 89379)
+++ trunk/Source/WebCore/ChangeLog 2011-06-21 21:09:58 UTC (rev 89380)
@@ -1,5 +1,17 @@
2011-06-21 Mark Pilgrim <[email protected]>
+ Reviewed by Adam Barth.
+
+ IndexedDB: keyrange methods should throw TypeError if required arguments are missing
+ https://bugs.webkit.org/show_bug.cgi?id=63085
+
+ Test: storage/indexeddb/keyrange-required-arguments.html
+
+ * storage/IDBKeyRange.idl: remove LegacyDefaultOptionalArguments flag
+ so missing required arguments throw TypeError, as per WebIDL spec.
+
+2011-06-21 Mark Pilgrim <[email protected]>
+
Reviewed by Tony Chang.
IndexedDB: should throw TypeError when indexedDB.open() name argument is missing
Modified: trunk/Source/WebCore/storage/IDBKeyRange.idl (89379 => 89380)
--- trunk/Source/WebCore/storage/IDBKeyRange.idl 2011-06-21 21:08:24 UTC (rev 89379)
+++ trunk/Source/WebCore/storage/IDBKeyRange.idl 2011-06-21 21:09:58 UTC (rev 89380)
@@ -26,7 +26,6 @@
module storage {
interface [
- LegacyDefaultOptionalArguments,
Conditional=INDEXED_DATABASE
] IDBKeyRange {
readonly attribute IDBKey lower;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes