Changeset 209193 in webkit


Ignore:
Timestamp:
Dec 1, 2016 12:33:05 PM (7 years ago)
Author:
Chris Dumez
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):

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r209191 r209193  
     12016-12-01  Chris Dumez  <cdumez@apple.com>
     2
     3        Parameter to DOMStringList.contains() should be mandatory
     4        https://bugs.webkit.org/show_bug.cgi?id=165257
     5
     6        Reviewed by Alex Christensen.
     7
     8        Extend layout test coverage.
     9
     10        * storage/indexeddb/database-basics-expected.txt:
     11        * storage/indexeddb/resources/database-basics.js:
     12        (checkObjectStore):
     13
    1142016-12-01  Jiewen Tan  <jiewen_tan@apple.com>
    215
  • trunk/LayoutTests/storage/indexeddb/database-basics-expected.txt

    r195181 r209193  
    2727PASS db.objectStoreNames.contains('test456') is false
    2828PASS db.objectStoreNames.contains('test123') is true
     29PASS db.objectStoreNames.contains() threw exception TypeError: Not enough arguments.
    2930db.close()
    3031request = indexedDB.open(dbname, 2)
     
    3738PASS db.objectStoreNames.contains('test456') is false
    3839PASS db.objectStoreNames.contains('test123') is true
     40PASS db.objectStoreNames.contains() threw exception TypeError: Not enough arguments.
    3941db.createObjectStore("test456")
    4042setVersionTrans = event.target.transaction
     
    4749PASS db.objectStoreNames.contains('test456') is false
    4850PASS db.objectStoreNames.contains('test123') is true
     51PASS db.objectStoreNames.contains() threw exception TypeError: Not enough arguments.
    4952db.close()
    5053Now that the connection is closed, transaction creation should fail
  • trunk/LayoutTests/storage/indexeddb/database-basics-private-expected.txt

    r195247 r209193  
    2727PASS db.objectStoreNames.contains('test456') is false
    2828PASS db.objectStoreNames.contains('test123') is true
     29PASS db.objectStoreNames.contains() threw exception TypeError: Not enough arguments.
    2930db.close()
    3031request = indexedDB.open(dbname, 2)
     
    3738PASS db.objectStoreNames.contains('test456') is false
    3839PASS db.objectStoreNames.contains('test123') is true
     40PASS db.objectStoreNames.contains() threw exception TypeError: Not enough arguments.
    3941db.createObjectStore("test456")
    4042setVersionTrans = event.target.transaction
     
    4749PASS db.objectStoreNames.contains('test456') is false
    4850PASS db.objectStoreNames.contains('test123') is true
     51PASS db.objectStoreNames.contains() threw exception TypeError: Not enough arguments.
    4952db.close()
    5053Now that the connection is closed, transaction creation should fail
  • trunk/LayoutTests/storage/indexeddb/resources/database-basics.js

    r163963 r209193  
    3333    shouldBe("db.objectStoreNames.contains('test456')", "false");
    3434    shouldBe("db.objectStoreNames.contains('test123')", "true");
     35    shouldThrow("db.objectStoreNames.contains()");
    3536}
    3637
  • trunk/Source/WebCore/ChangeLog

    r209191 r209193  
     12016-12-01  Chris Dumez  <cdumez@apple.com>
     2
     3        Parameter to DOMStringList.contains() should be mandatory
     4        https://bugs.webkit.org/show_bug.cgi?id=165257
     5
     6        Reviewed by Alex Christensen.
     7
     8        Parameter to DOMStringList.contains() should be mandatory.
     9        Gecko and Blink have it mandatory but WebKit had it optional and the
     10        string 'undefined" was used by default, which is not helpful.
     11
     12        No new tests, updated existing test.
     13
     14        * dom/DOMStringList.idl:
     15
    1162016-12-01  Jiewen Tan  <jiewen_tan@apple.com>
    217
  • trunk/Source/WebCore/dom/DOMStringList.idl

    r204679 r209193  
    3030    getter DOMString? item(unsigned long index);
    3131
    32     // FIXME: Using "undefined" as default parameter value is wrong.
    33     boolean contains(optional DOMString string = "undefined");
     32    boolean contains(DOMString string);
    3433};
    3534
Note: See TracChangeset for help on using the changeset viewer.