Remove LegacyDefaultOptionalArguments flag from storage IDL files
authorarv@chromium.org <arv@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Nov 2011 01:56:09 +0000 (01:56 +0000)
committerarv@chromium.org <arv@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Nov 2011 01:56:09 +0000 (01:56 +0000)
https://bugs.webkit.org/show_bug.cgi?id=65744

Reviewed by Adam Barth.

Source/WebCore:

Test: storage/domstorage/localstorage/missing-arguments.html

* storage/DatabaseCallback.idl:
* storage/IDBRequest.idl:
* storage/IDBTransaction.idl:
* storage/SQLResultSetRowList.idl:
* storage/SQLStatementCallback.idl:
* storage/SQLStatementErrorCallback.idl:
* storage/SQLTransaction.idl:
* storage/SQLTransactionCallback.idl:
* storage/SQLTransactionErrorCallback.idl:
* storage/SQLTransactionSync.idl:
* storage/SQLTransactionSyncCallback.idl:
* storage/Storage.idl:
* storage/StorageInfo.idl:
* storage/StorageInfoErrorCallback.idl:
* storage/StorageInfoQuotaCallback.idl:
* storage/StorageInfoUsageCallback.idl:

LayoutTests:

* storage/domstorage/localstorage/missing-arguments-expected.txt: Added.
* storage/domstorage/localstorage/missing-arguments.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99130 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/chromium/test_expectations.txt
LayoutTests/storage/domstorage/localstorage/missing-arguments-expected.txt [new file with mode: 0644]
LayoutTests/storage/domstorage/localstorage/missing-arguments.html [new file with mode: 0644]
LayoutTests/storage/storageinfo-missing-arguments-expected.txt [new file with mode: 0644]
LayoutTests/storage/storageinfo-missing-arguments.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/storage/DatabaseCallback.idl
Source/WebCore/storage/IDBRequest.idl
Source/WebCore/storage/IDBTransaction.idl
Source/WebCore/storage/SQLResultSetRowList.idl
Source/WebCore/storage/SQLStatementCallback.idl
Source/WebCore/storage/SQLStatementErrorCallback.idl
Source/WebCore/storage/SQLTransaction.idl
Source/WebCore/storage/SQLTransactionCallback.idl
Source/WebCore/storage/SQLTransactionErrorCallback.idl
Source/WebCore/storage/SQLTransactionSync.idl
Source/WebCore/storage/SQLTransactionSyncCallback.idl
Source/WebCore/storage/Storage.idl
Source/WebCore/storage/StorageInfo.idl
Source/WebCore/storage/StorageInfoErrorCallback.idl
Source/WebCore/storage/StorageInfoQuotaCallback.idl
Source/WebCore/storage/StorageInfoUsageCallback.idl

index ffee571..030a789 100644 (file)
@@ -1,3 +1,13 @@
+2011-11-02  Erik Arvidsson  <arv@chromium.org>
+
+        Remove LegacyDefaultOptionalArguments flag from storage IDL files
+        https://bugs.webkit.org/show_bug.cgi?id=65744
+
+        Reviewed by Adam Barth.
+
+        * storage/domstorage/localstorage/missing-arguments-expected.txt: Added.
+        * storage/domstorage/localstorage/missing-arguments.html: Added.
+
 2011-11-02  Dan Bernstein  <mitz@apple.com>
 
         REGRESSION (r98759-r98773): platform/mac/fonts/color-bitmap.html failing on Lion Intel Debug (Tests)
index 2290673..2893d36 100644 (file)
@@ -63,9 +63,10 @@ BUGCR24189 SKIP : fast/dom/open-and-close-by-DOM.html = FAIL
 BUGCR36681 SKIP : java = TEXT
 
 // Quota API is not supported in DRT yet.
+BUGCR84572 SKIP : storage/storageinfo-missing-arguments.html = FAIL
+BUGCR84572 SKIP : storage/storageinfo-no-callbacks.html = FAIL
 BUGCR84572 SKIP : storage/storageinfo-query-usage.html = FAIL
 BUGCR84572 SKIP : storage/storageinfo-request-quota.html = FAIL
-BUGCR84572 SKIP : storage/storageinfo-no-callbacks.html = FAIL
 
 // Animation API is disabled.  Dean Jackson has promised (as of Aug. 25, 2011)
 // to re-enable these "in the next few weeks".
diff --git a/LayoutTests/storage/domstorage/localstorage/missing-arguments-expected.txt b/LayoutTests/storage/domstorage/localstorage/missing-arguments-expected.txt
new file mode 100644 (file)
index 0000000..c3aa011
--- /dev/null
@@ -0,0 +1,14 @@
+Ensures that we get exceptions when we do not include required arguments for localStorage methods.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS localStorage.key() threw exception TypeError: Not enough arguments.
+PASS localStorage.getItem() threw exception TypeError: Not enough arguments.
+PASS localStorage.setItem() threw exception TypeError: Not enough arguments.
+PASS localStorage.setItem("a") threw exception TypeError: Not enough arguments.
+PASS localStorage.removeItem() threw exception TypeError: Not enough arguments.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/domstorage/localstorage/missing-arguments.html b/LayoutTests/storage/domstorage/localstorage/missing-arguments.html
new file mode 100644 (file)
index 0000000..b4fd36f
--- /dev/null
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<script src="resources/clearLocalStorage.js"></script>
+<script src="../../../fast/js/resources/js-test-pre.js"></script>
+<script>
+
+description('Ensures that we get exceptions when we do not include required arguments for localStorage methods.');
+
+var notEnoughArguments = '"TypeError: Not enough arguments"';
+
+shouldThrow('localStorage.key()', notEnoughArguments);
+shouldThrow('localStorage.getItem()', notEnoughArguments);
+shouldThrow('localStorage.setItem()', notEnoughArguments);
+shouldThrow('localStorage.setItem("a")', notEnoughArguments);
+shouldThrow('localStorage.removeItem()', notEnoughArguments);
+
+</script>
+<script src="../../../fast/js/resources/js-test-post.js"></script>
diff --git a/LayoutTests/storage/storageinfo-missing-arguments-expected.txt b/LayoutTests/storage/storageinfo-missing-arguments-expected.txt
new file mode 100644 (file)
index 0000000..16a47a7
--- /dev/null
@@ -0,0 +1,12 @@
+Ensures that we get exceptions when we do not include required arguments for webkitStorageInfo methods.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS webkitStorageInfo.requestQuota() threw exception TypeError: Not enough arguments.
+PASS webkitStorageInfo.requestQuota(webkitStorageInfo.TEMPORARY) threw exception TypeError: Not enough arguments.
+PASS webkitStorageInfo.queryUsageAndQuota() threw exception TypeError: Not enough arguments.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/storageinfo-missing-arguments.html b/LayoutTests/storage/storageinfo-missing-arguments.html
new file mode 100644 (file)
index 0000000..f0c9470
--- /dev/null
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<script src="../fast/js/resources/js-test-pre.js"></script>
+<script>
+
+description('Ensures that we get exceptions when we do not include required arguments for webkitStorageInfo methods.');
+
+if (window.webkitStorageInfo) {
+    var notEnoughArguments = '"TypeError: Not enough arguments"';
+    shouldThrow('webkitStorageInfo.requestQuota()', notEnoughArguments);
+    shouldThrow('webkitStorageInfo.requestQuota(webkitStorageInfo.TEMPORARY)', notEnoughArguments);
+    shouldThrow('webkitStorageInfo.queryUsageAndQuota()', notEnoughArguments);
+} else
+    debug("This test requires window.webkitStorageInfo.");
+
+</script>
+<script src="../fast/js/resources/js-test-post.js"></script>
index 21b6b34..86f3e98 100644 (file)
@@ -1,3 +1,29 @@
+2011-11-02  Erik Arvidsson  <arv@chromium.org>
+
+        Remove LegacyDefaultOptionalArguments flag from storage IDL files
+        https://bugs.webkit.org/show_bug.cgi?id=65744
+
+        Reviewed by Adam Barth.
+
+        Test: storage/domstorage/localstorage/missing-arguments.html
+
+        * storage/DatabaseCallback.idl:
+        * storage/IDBRequest.idl:
+        * storage/IDBTransaction.idl:
+        * storage/SQLResultSetRowList.idl:
+        * storage/SQLStatementCallback.idl:
+        * storage/SQLStatementErrorCallback.idl:
+        * storage/SQLTransaction.idl:
+        * storage/SQLTransactionCallback.idl:
+        * storage/SQLTransactionErrorCallback.idl:
+        * storage/SQLTransactionSync.idl:
+        * storage/SQLTransactionSyncCallback.idl:
+        * storage/Storage.idl:
+        * storage/StorageInfo.idl:
+        * storage/StorageInfoErrorCallback.idl:
+        * storage/StorageInfoQuotaCallback.idl:
+        * storage/StorageInfoUsageCallback.idl:
+
 2011-11-02  Adam Klein  <adamk@chromium.org>
 
         Replace usage of StringImpl with String where possible in CharacterData and Text
index a52e5ce..8d31648 100644 (file)
@@ -29,7 +29,6 @@
 module storage {
     interface [
         Conditional=SQL_DATABASE,
-        LegacyDefaultOptionalArguments,
         Callback
     ] DatabaseCallback {
         boolean handleEvent(in Database database);
index 9fde4a8..29f94cd 100644 (file)
@@ -30,7 +30,6 @@
 module storage {
 
     interface [
-        LegacyDefaultOptionalArguments,
         Conditional=INDEXED_DATABASE,
         ActiveDOMObject,
         EventTarget
index 0ea1141..9e3b0e9 100644 (file)
@@ -27,7 +27,6 @@
 module storage {
 
     interface [
-        LegacyDefaultOptionalArguments,
         Conditional=INDEXED_DATABASE,
         ActiveDOMObject,
         EventTarget
index f04ee31..44db523 100644 (file)
@@ -29,7 +29,6 @@
 module storage {
 
     interface [
-        LegacyDefaultOptionalArguments,
         Conditional=SQL_DATABASE,
         OmitConstructor,
         NoStaticTables
index 8bd168d..c3053c0 100644 (file)
@@ -28,7 +28,6 @@
 
 module storage {
     interface [
-        LegacyDefaultOptionalArguments,
         Conditional=SQL_DATABASE,
         Callback
     ] SQLStatementCallback {
index 4c8d893..1fc96cb 100644 (file)
@@ -28,7 +28,6 @@
 
 module storage {
     interface [
-        LegacyDefaultOptionalArguments,
         Conditional=SQL_DATABASE,
         Callback
     ] SQLStatementErrorCallback {
index 52fe6a0..f410ca4 100644 (file)
 module storage {
 
     interface [
-        LegacyDefaultOptionalArguments,
         Conditional=SQL_DATABASE,
         OmitConstructor,
         NoStaticTables
     ] SQLTransaction {
-        [Custom] void executeSql(in DOMString sqlStatement, in ObjectArray arguments, in SQLStatementCallback callback, in SQLStatementErrorCallback errorCallback);
+        [Custom] void executeSql(in DOMString sqlStatement,
+                                 in ObjectArray arguments,
+                                 in [Optional, Callback] SQLStatementCallback callback,
+                                 in [Optional, Callback] SQLStatementErrorCallback errorCallback);
     };
 }
index 066fde8..1b50bee 100644 (file)
@@ -28,7 +28,6 @@
 
 module storage {
     interface [
-        LegacyDefaultOptionalArguments,
         Conditional=SQL_DATABASE,
         Callback
     ] SQLTransactionCallback {
index 1d20823..f6ec156 100644 (file)
@@ -28,7 +28,6 @@
 
 module storage {
     interface [
-        LegacyDefaultOptionalArguments,
         Conditional=SQL_DATABASE,
         Callback
     ] SQLTransactionErrorCallback {
index c2033f6..0ada59d 100644 (file)
@@ -31,7 +31,6 @@
 module storage {
 
     interface [
-        LegacyDefaultOptionalArguments,
         Conditional=SQL_DATABASE,
         OmitConstructor,
         NoStaticTables
index 1867135..ea22e5f 100644 (file)
@@ -30,7 +30,6 @@
 
 module storage {
     interface [
-        LegacyDefaultOptionalArguments,
         Conditional=SQL_DATABASE,
         Callback
     ] SQLTransactionSyncCallback {
index fc6d16e..7ad6bdf 100644 (file)
@@ -26,7 +26,6 @@
 module storage {
 
     interface [
-        LegacyDefaultOptionalArguments,
         HasNameGetter,
         GenerateIsReachable=ImplFrame,
         CustomDeleteProperty,
index 13011d4..16af440 100644 (file)
@@ -25,7 +25,6 @@
 
 module storage {
     interface [
-        LegacyDefaultOptionalArguments,
         Conditional=QUOTA,
         OmitConstructor,
         GenerateNativeConverter
index 27e07a8..66c3316 100644 (file)
@@ -30,7 +30,6 @@
 
 module storage {
     interface [
-        LegacyDefaultOptionalArguments,
         Conditional=QUOTA,
         Callback
     ] StorageInfoErrorCallback {
index 4721735..1c8e11c 100644 (file)
@@ -30,7 +30,6 @@
 
 module storage {
     interface [
-        LegacyDefaultOptionalArguments,
         Conditional=QUOTA,
         Callback
     ] StorageInfoQuotaCallback {
index 11ff45f..dfa58e6 100644 (file)
@@ -30,7 +30,6 @@
 
 module storage {
     interface [
-        LegacyDefaultOptionalArguments,
         Conditional=QUOTA,
         Callback
     ] StorageInfoUsageCallback {