Changeset 106991 in webkit


Ignore:
Timestamp:
Feb 7, 2012 2:18:29 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

IndexedDB createIndex should fail if options arg is invalid
https://bugs.webkit.org/show_bug.cgi?id=58467

Patch by Eugene Girard <girard@chromium.org> on 2012-02-07
Reviewed by Tony Chang.

This ticket was fixed as part of https://bugs.webkit.org/show_bug.cgi?id=58471
Adding unit tests to verify correct operation.

  • storage/indexeddb/index-basics-expected.txt:
  • storage/indexeddb/index-basics-workers-expected.txt:
  • storage/indexeddb/resources/index-basics.js:

(deleteExisting):

Location:
trunk/LayoutTests
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r106990 r106991  
     12012-02-07  Eugene Girard  <girard@chromium.org>
     2
     3        IndexedDB createIndex should fail if options arg is invalid
     4        https://bugs.webkit.org/show_bug.cgi?id=58467
     5
     6        Reviewed by Tony Chang.
     7
     8        This ticket was fixed as part of https://bugs.webkit.org/show_bug.cgi?id=58471
     9        Adding unit tests to verify correct operation.
     10
     11        * storage/indexeddb/index-basics-expected.txt:
     12        * storage/indexeddb/index-basics-workers-expected.txt:
     13        * storage/indexeddb/resources/index-basics.js:
     14        (deleteExisting):
     15
    1162012-02-07  Julien Chaffraix  <jchaffraix@webkit.org>
    217
  • trunk/LayoutTests/storage/indexeddb/index-basics-expected.txt

    r106827 r106991  
    1515store.createIndex('indexName2', 'y', {unique: false})
    1616store.createIndex('zIndex', 'z', {unique: true})
     17PASS indexObject2.unique is false
     18PASS indexObject3.unique is true
     19Expecting TypeError exception from store.createIndex('failureIndex', 'zzz', true)
     20PASS Exception was thrown.
     21PASS store.createIndex('failureIndex', 'zzz', true) threw TypeError: Not an object.
     22Expecting TypeError exception from store.createIndex('failureIndex', 'zzz', 'string')
     23PASS Exception was thrown.
     24PASS store.createIndex('failureIndex', 'zzz', 'string') threw TypeError: Not an object.
    1725PASS 'name' in indexObject is true
    1826PASS indexObject.name is "indexName"
  • trunk/LayoutTests/storage/indexeddb/index-basics-workers-expected.txt

    r106886 r106991  
    1616[Worker] store.createIndex('indexName2', 'y', {unique: false})
    1717[Worker] store.createIndex('zIndex', 'z', {unique: true})
     18PASS [Worker] indexObject2.unique is false
     19PASS [Worker] indexObject3.unique is true
     20[Worker] Expecting TypeError exception from store.createIndex('failureIndex', 'zzz', true)
     21PASS [Worker] Exception was thrown.
     22PASS [Worker] store.createIndex('failureIndex', 'zzz', true) threw TypeError: Not an object.
     23[Worker] Expecting TypeError exception from store.createIndex('failureIndex', 'zzz', 'string')
     24PASS [Worker] Exception was thrown.
     25PASS [Worker] store.createIndex('failureIndex', 'zzz', 'string') threw TypeError: Not an object.
    1826PASS [Worker] 'name' in indexObject is true
    1927PASS [Worker] indexObject.name is "indexName"
  • trunk/LayoutTests/storage/indexeddb/resources/index-basics.js

    r106898 r106991  
    3737    self.indexObject2 = evalAndLog("store.createIndex('indexName2', 'y', {unique: false})");
    3838    self.indexObject3 = evalAndLog("store.createIndex('zIndex', 'z', {unique: true})");
     39    shouldBeFalse("indexObject2.unique");
     40    shouldBeTrue("indexObject3.unique");
     41    evalAndExpectExceptionClass("store.createIndex('failureIndex', 'zzz', true)", "TypeError");
     42    evalAndExpectExceptionClass("store.createIndex('failureIndex', 'zzz', 'string')", "TypeError");
    3943    addData();
    4044}
Note: See TracChangeset for help on using the changeset viewer.