Title: [209193] trunk
Revision
209193
Author
cdu...@apple.com
Date
2016-12-01 12:33:05 -0800 (Thu, 01 Dec 2016)

Log Message

Parameter to DOMStringList.contains() should be mandatory
https://bugs.webkit.org/show_bug.cgi?id=165257

Reviewed by Alex Christensen.

Source/WebCore:

Parameter to DOMStringList.contains() should be mandatory.
Gecko and Blink have it mandatory but WebKit had it optional and the
string 'undefined" was used by default, which is not helpful.

No new tests, updated existing test.

* dom/DOMStringList.idl:

LayoutTests:

Extend layout test coverage.

* storage/indexeddb/database-basics-expected.txt:
* storage/indexeddb/resources/database-basics.js:
(checkObjectStore):

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (209192 => 209193)


--- trunk/LayoutTests/ChangeLog	2016-12-01 20:12:38 UTC (rev 209192)
+++ trunk/LayoutTests/ChangeLog	2016-12-01 20:33:05 UTC (rev 209193)
@@ -1,3 +1,16 @@
+2016-12-01  Chris Dumez  <cdu...@apple.com>
+
+        Parameter to DOMStringList.contains() should be mandatory
+        https://bugs.webkit.org/show_bug.cgi?id=165257
+
+        Reviewed by Alex Christensen.
+
+        Extend layout test coverage.
+
+        * storage/indexeddb/database-basics-expected.txt:
+        * storage/indexeddb/resources/database-basics.js:
+        (checkObjectStore):
+
 2016-12-01  Jiewen Tan  <jiewen_...@apple.com>
 
         SubtleCrypto::deriveBits always return NOT_SUPPORTED_ERR for now

Modified: trunk/LayoutTests/storage/indexeddb/database-basics-expected.txt (209192 => 209193)


--- trunk/LayoutTests/storage/indexeddb/database-basics-expected.txt	2016-12-01 20:12:38 UTC (rev 209192)
+++ trunk/LayoutTests/storage/indexeddb/database-basics-expected.txt	2016-12-01 20:33:05 UTC (rev 209193)
@@ -26,6 +26,7 @@
 PASS db.objectStoreNames.contains('') is false
 PASS db.objectStoreNames.contains('test456') is false
 PASS db.objectStoreNames.contains('test123') is true
+PASS db.objectStoreNames.contains() threw exception TypeError: Not enough arguments.
 db.close()
 request = indexedDB.open(dbname, 2)
 db = event.target.result
@@ -36,6 +37,7 @@
 PASS db.objectStoreNames.contains('') is false
 PASS db.objectStoreNames.contains('test456') is false
 PASS db.objectStoreNames.contains('test123') is true
+PASS db.objectStoreNames.contains() threw exception TypeError: Not enough arguments.
 db.createObjectStore("test456")
 setVersionTrans = event.target.transaction
 PASS setVersionTrans is non-null.
@@ -46,6 +48,7 @@
 PASS db.objectStoreNames.contains('') is false
 PASS db.objectStoreNames.contains('test456') is false
 PASS db.objectStoreNames.contains('test123') is true
+PASS db.objectStoreNames.contains() threw exception TypeError: Not enough arguments.
 db.close()
 Now that the connection is closed, transaction creation should fail
 Expecting exception from db.transaction('test123')

Modified: trunk/LayoutTests/storage/indexeddb/database-basics-private-expected.txt (209192 => 209193)


--- trunk/LayoutTests/storage/indexeddb/database-basics-private-expected.txt	2016-12-01 20:12:38 UTC (rev 209192)
+++ trunk/LayoutTests/storage/indexeddb/database-basics-private-expected.txt	2016-12-01 20:33:05 UTC (rev 209193)
@@ -26,6 +26,7 @@
 PASS db.objectStoreNames.contains('') is false
 PASS db.objectStoreNames.contains('test456') is false
 PASS db.objectStoreNames.contains('test123') is true
+PASS db.objectStoreNames.contains() threw exception TypeError: Not enough arguments.
 db.close()
 request = indexedDB.open(dbname, 2)
 db = event.target.result
@@ -36,6 +37,7 @@
 PASS db.objectStoreNames.contains('') is false
 PASS db.objectStoreNames.contains('test456') is false
 PASS db.objectStoreNames.contains('test123') is true
+PASS db.objectStoreNames.contains() threw exception TypeError: Not enough arguments.
 db.createObjectStore("test456")
 setVersionTrans = event.target.transaction
 PASS setVersionTrans is non-null.
@@ -46,6 +48,7 @@
 PASS db.objectStoreNames.contains('') is false
 PASS db.objectStoreNames.contains('test456') is false
 PASS db.objectStoreNames.contains('test123') is true
+PASS db.objectStoreNames.contains() threw exception TypeError: Not enough arguments.
 db.close()
 Now that the connection is closed, transaction creation should fail
 Expecting exception from db.transaction('test123')

Modified: trunk/LayoutTests/storage/indexeddb/resources/database-basics.js (209192 => 209193)


--- trunk/LayoutTests/storage/indexeddb/resources/database-basics.js	2016-12-01 20:12:38 UTC (rev 209192)
+++ trunk/LayoutTests/storage/indexeddb/resources/database-basics.js	2016-12-01 20:33:05 UTC (rev 209193)
@@ -32,6 +32,7 @@
     shouldBe("db.objectStoreNames.contains('')", "false");
     shouldBe("db.objectStoreNames.contains('test456')", "false");
     shouldBe("db.objectStoreNames.contains('test123')", "true");
+    shouldThrow("db.objectStoreNames.contains()");
 }
 
 

Modified: trunk/Source/WebCore/ChangeLog (209192 => 209193)


--- trunk/Source/WebCore/ChangeLog	2016-12-01 20:12:38 UTC (rev 209192)
+++ trunk/Source/WebCore/ChangeLog	2016-12-01 20:33:05 UTC (rev 209193)
@@ -1,3 +1,18 @@
+2016-12-01  Chris Dumez  <cdu...@apple.com>
+
+        Parameter to DOMStringList.contains() should be mandatory
+        https://bugs.webkit.org/show_bug.cgi?id=165257
+
+        Reviewed by Alex Christensen.
+
+        Parameter to DOMStringList.contains() should be mandatory.
+        Gecko and Blink have it mandatory but WebKit had it optional and the
+        string 'undefined" was used by default, which is not helpful.
+
+        No new tests, updated existing test.
+
+        * dom/DOMStringList.idl:
+
 2016-12-01  Jiewen Tan  <jiewen_...@apple.com>
 
         SubtleCrypto::deriveBits always return NOT_SUPPORTED_ERR for now

Modified: trunk/Source/WebCore/dom/DOMStringList.idl (209192 => 209193)


--- trunk/Source/WebCore/dom/DOMStringList.idl	2016-12-01 20:12:38 UTC (rev 209192)
+++ trunk/Source/WebCore/dom/DOMStringList.idl	2016-12-01 20:33:05 UTC (rev 209193)
@@ -29,7 +29,6 @@
     readonly attribute unsigned long length;
     getter DOMString? item(unsigned long index);
 
-    // FIXME: Using "undefined" as default parameter value is wrong.
-    boolean contains(optional DOMString string = "undefined");
+    boolean contains(DOMString string);
 };
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to