Changeset 80025 in webkit


Ignore:
Timestamp:
Mar 1, 2011 12:37:25 PM (13 years ago)
Author:
jorlow@chromium.org
Message:

2011-02-28 Jeremy Orlow <jorlow@chromium.org>

Reviewed by Steve Block.

Only IndexedDB's error event should be cancelable
https://bugs.webkit.org/show_bug.cgi?id=55413

Add checks to existing tests.

  • storage/indexeddb/objectstore-basics.html:
  • storage/indexeddb/transaction-basics.html:

2011-02-28 Jeremy Orlow <jorlow@chromium.org>

Reviewed by Steve Block.

Only IndexedDB's error event should be cancelable
https://bugs.webkit.org/show_bug.cgi?id=55413

  • storage/IDBRequest.cpp: (WebCore::createSuccessEvent):
  • storage/IDBTransaction.cpp: (WebCore::IDBTransaction::onAbort): (WebCore::IDBTransaction::onComplete):
Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r80023 r80025  
     12011-02-28  Jeremy Orlow  <jorlow@chromium.org>
     2
     3        Reviewed by Steve Block.
     4
     5        Only IndexedDB's error event should be cancelable
     6        https://bugs.webkit.org/show_bug.cgi?id=55413
     7
     8        Add checks to existing tests.
     9
     10        * storage/indexeddb/objectstore-basics.html:
     11        * storage/indexeddb/transaction-basics.html:
     12
    1132011-03-01  Jia Pu  <jpu@apple.com>
    214
  • trunk/LayoutTests/storage/indexeddb/objectstore-basics-expected.txt

    r79458 r80025  
    7575store = transaction.objectStore('storeName')
    7676store.add({x: null}, 'validkey')
     77PASS event.cancelable is true
    7778addWithNullIndexFailure():
    7879PASS event.target.errorCode is webkitIDBDatabaseException.DATA_ERR
  • trunk/LayoutTests/storage/indexeddb/objectstore-basics.html

    r79458 r80025  
    209209function addWithNullIndexFailure()
    210210{
     211    shouldBeTrue("event.cancelable");
    211212    debug("addWithNullIndexFailure():");
    212213    shouldBe("event.target.errorCode", "webkitIDBDatabaseException.DATA_ERR");
  • trunk/LayoutTests/storage/indexeddb/transaction-basics-expected.txt

    r79458 r80025  
    3535store = db.createObjectStore('storeFail', null)
    3636index = store.createIndex('indexFail', 'x', false)
     37PASS event.cancelable is false
    3738PASS window.db.objectStoreNames is []
    3839PASS window.db.objectStoreNames.length is 0
     
    6768PASS store.name is "storeName"
    6869PASS complete event fired
     70PASS event.cancelable is false
    6971PASS complete event fired
    7072PASS oncomplete event had fired
  • trunk/LayoutTests/storage/indexeddb/transaction-basics.html

    r79458 r80025  
    9393function testSetVersionAbort3()
    9494{
     95    shouldBeFalse("event.cancelable");
    9596    checkMetadataEmpty();
    9697    request = evalAndLog("request = startSetVersion('version fail')");
     
    100101function addIDBObjects()
    101102{
     103    shouldBeFalse("event.cancelable");
    102104    debug("addIDBObjects():");
    103105    var trans = evalAndLog("trans = event.target.result");
     
    213215function completeCallback()
    214216{
     217    shouldBeFalse("event.cancelable");
    215218    testPassed("complete event fired");
    216219    window.completeEventFired = true;
  • trunk/Source/WebCore/ChangeLog

    r80023 r80025  
     12011-02-28  Jeremy Orlow  <jorlow@chromium.org>
     2
     3        Reviewed by Steve Block.
     4
     5        Only IndexedDB's error event should be cancelable
     6        https://bugs.webkit.org/show_bug.cgi?id=55413
     7
     8        * storage/IDBRequest.cpp:
     9        (WebCore::createSuccessEvent):
     10        * storage/IDBTransaction.cpp:
     11        (WebCore::IDBTransaction::onAbort):
     12        (WebCore::IDBTransaction::onComplete):
     13
    1142011-03-01  Jia Pu  <jpu@apple.com>
    215
  • trunk/Source/WebCore/storage/IDBRequest.cpp

    r78908 r80025  
    137137static PassRefPtr<Event> createSuccessEvent()
    138138{
    139     return Event::create(eventNames().successEvent, false, true);
     139    return Event::create(eventNames().successEvent, false, false);
    140140}
    141141
  • trunk/Source/WebCore/storage/IDBTransaction.cpp

    r78525 r80025  
    106106void IDBTransaction::onAbort()
    107107{
    108     enqueueEvent(Event::create(eventNames().abortEvent, true, true));
     108    enqueueEvent(Event::create(eventNames().abortEvent, true, false));
    109109}
    110110
    111111void IDBTransaction::onComplete()
    112112{
    113     enqueueEvent(Event::create(eventNames().completeEvent, false, true));
     113    enqueueEvent(Event::create(eventNames().completeEvent, false, false));
    114114}
    115115
Note: See TracChangeset for help on using the changeset viewer.