2012-09-19  Nate Chapin  <japhet@chromium.org>

        Chromium gardening.

        A test is mistakenly marked as both SLOW and TIMEOUT.

        * platform/chromium/TestExpectations:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129035 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX: A few control types are returning the wrong answer for isReadOnly
https://bugs.webkit.org/show_bug.cgi?id=96735

Reviewed by Chris Fleizach.

Source/WebCore:

All input types should be read-only except ones that
are text fields. The previous logic was marking things like
checkboxes as not read-only.

Tests: platform/chromium/accessibility/readonly.html
       platform/mac/accessibility/form-control-value-settable.html

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::isReadOnly):

Tools:

Exposing isReadOnly in an AccessibilityObject to DumpRenderTree.

* DumpRenderTree/chromium/TestRunner/AccessibilityUIElementChromium.cpp:
(AccessibilityUIElement::AccessibilityUIElement):
(AccessibilityUIElement::isReadOnlyGetterCallback):
* DumpRenderTree/chromium/TestRunner/AccessibilityUIElementChromium.h:
(AccessibilityUIElement):

LayoutTests:

Adds a new test to make sure that readonly is exposed correctly on
all elements.

* platform/chromium/accessibility/readonly-expected.txt: Added.
* platform/chromium/accessibility/readonly.html: Added.
* platform/mac/accessibility/form-control-value-settable-expected.txt: Added.
* platform/mac/accessibility/form-control-value-settable.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129036 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: fire upgradeneeded even without an explicit integer version
https://bugs.webkit.org/show_bug.cgi?id=96444

Reviewed by Tony Chang.

Source/WebCore:

Also of note:
- New databases now get a default version of 1 instead of
the empty string when they are opened.
- We now allow databases with an integer version to revert to a string
version by calling setVersion.

Implementation detail: we store both an integer version and string
version for a particular database. If both are set we give preference
to the integer version and assume the db is on the integer track.

Test: storage/indexeddb/intversion-two-opens-no-versions.html

* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore):
(WebCore::IDBDatabaseBackendImpl::IDBDatabaseBackendImpl):
(WebCore::IDBDatabaseBackendImpl::setVersion):
(WebCore::IDBDatabaseBackendImpl::setVersionInternal):
Now that this can be called even after an int version is set we have
to make it revoke the int version.

(WebCore::IDBDatabaseBackendImpl::openConnection):
Nested ifs were getting deep, so refactor to return early instead.

(WebCore::IDBDatabaseBackendImpl::deleteDatabase):
(WebCore::IDBDatabaseBackendImpl::resetVersion):
Now that an int version could have been set before setVersion was
called we have to reset the int version on abort.

* Modules/indexeddb/IDBDatabaseBackendImpl.h:
(IDBDatabaseBackendImpl):
* Modules/indexeddb/IDBLevelDBBackingStore.cpp:
(WebCore::IDBLevelDBBackingStore::updateIDBDatabaseIntVersion):
* Modules/indexeddb/IDBOpenDBRequest.cpp:
0 is now a valid integer version to store to leveldb if an idb
database is reverting to a string version.

(WebCore::IDBOpenDBRequest::onUpgradeNeeded):
If the open request did not specify an integer version but
upgradeneeded is called, it means the database was given the default
version of 1.

LayoutTests:

Mostly updating expectations about getting an upgradeneeded on a new
database and the default version being 1 instead of "".

* http/tests/inspector/indexeddb/database-structure-expected.txt:
* storage/indexeddb/cursor-overloads-expected.txt:
* storage/indexeddb/cursor-overloads.html:
* storage/indexeddb/dont-commit-on-blocked-expected.txt:
* storage/indexeddb/dont-commit-on-blocked.html:
* storage/indexeddb/factory-deletedatabase-interactions-expected.txt:
* storage/indexeddb/intversion-and-setversion-expected.txt:
Remove test that setVersion fires an error if an int version is set.
Change it to testing that an int version can replace a string version
that replaced an int version.

* storage/indexeddb/intversion-bad-parameters-expected.txt:
* storage/indexeddb/intversion-invalid-setversion-has-no-side-effects-expected.txt: Removed.
setVersion is no longer invalid so this test can be deleted.

* storage/indexeddb/intversion-omit-parameter-expected.txt:
We now fully pass this test.

* storage/indexeddb/intversion-two-opens-no-versions-expected.txt: Added.
* storage/indexeddb/intversion-two-opens-no-versions.html: Renamed from LayoutTests/storage/indexeddb/intversion-invalid-setversion-has-no-side-effects.html.
* storage/indexeddb/list-ordering-expected.txt:
* storage/indexeddb/noblobs-expected.txt:
* storage/indexeddb/noblobs.html:
* storage/indexeddb/open-during-transaction-expected.txt:
This test had a bug in it AND its behavior is changed. It was trying
to open one database twice and another once but was actually opening
three different databases. The behavior change is that now the
transaction finishes while the last call to open is firing
upgradeneeded.

* storage/indexeddb/pending-activity-expected.txt:
* storage/indexeddb/pending-activity-workers-expected.txt:
* storage/indexeddb/resources/intversion-and-setversion.js:
(deleteSuccess):
(initialUpgradeNeeded):
(openSuccess):
(firstUpgradeNeeded):
(transactionCompleted):
(firstOpenWithVersion):
(secondSetVersionCallback):
(setIntVersion2):
(versionChangeGoingFromStringToInt):
(version2ConnectionBlocked):
(version2ConnectionSuccess):
(errorWhenTryingLowVersion):
* storage/indexeddb/resources/intversion-invalid-setversion-has-no-side-effects.js: Removed.
* storage/indexeddb/resources/intversion-two-opens-no-versions.js: Added.
(test):
(deleteSuccess):
(connection1UpgradeNeeded):
(connection1OpenSuccess):
(connection2UpgradeNeeded):
(connection2OpenSuccess):
* storage/indexeddb/resources/list-ordering.js:
* storage/indexeddb/resources/open-during-transaction.js:
(startTransaction.trans.oncomplete):
(startTransaction):
(tryOpens.openreq3.onsuccess):
(tryOpens):
* storage/indexeddb/resources/pending-activity.js:
* storage/indexeddb/structured-clone-expected.txt:
* storage/indexeddb/structured-clone.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129037 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: Free up resources used by completed cursors earlier
https://bugs.webkit.org/show_bug.cgi?id=97023

Reviewed by Tony Chang.

Source/WebCore:

Prior to this patch, IDBCursor objects are kept around by their parent
IDBTransaction until the transaction finishes. It's possible to release
references to them earlier, when the cursor has been "run to the end",
as no further events will fire and all calls to continue() etc should fail.

This change tells the cursor it's done when "null" finally comes through in
the IDBRequest, and the cursor then lets transaction know it can be
forgotten.

The added test doesn't distinguish the new behavior, but does exercise
"finished" cursors and apparently we didn't have tests for these before.

Test: storage/indexeddb/cursor-finished.html

* Modules/indexeddb/IDBCursor.cpp:
(WebCore::IDBCursor::close): Make idempotent; notify transaction.
* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::onSuccess): Tell cursor it's finished before releasing.
* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::OpenCursorNotifier::~OpenCursorNotifier):
(WebCore):
(WebCore::IDBTransaction::OpenCursorNotifier::cursorFinished): New method for explicit notification.
* Modules/indexeddb/IDBTransaction.h:
(OpenCursorNotifier):

LayoutTests:

Test to exercise cursor methods after the cursor has been run to the end.

* storage/indexeddb/cursor-finished-expected.txt: Added.
* storage/indexeddb/cursor-finished.html: Added.
* storage/indexeddb/resources/cursor-finished.js: Added.
(test):
(prepareDatabase):
(onDeleteSuccess):
(onUpgradeNeeded):
(onOpenSuccess):
(onCursorSuccess):


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