Allow blocking of application cache in third-party contexts
https://bugs.webkit.org/show_bug.cgi?id=112288

Reviewed by Adam Barth.

Source/WebCore:

Return early if we can't access the application cache due to security
restrictions.

Tests: http/tests/security/cross-origin-appcache-allowed.html
       http/tests/security/cross-origin-appcache.html
       http/tests/security/same-origin-appcache-blocked.html

* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::selectCache):
(WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL):
* page/SecurityOrigin.h:
(WebCore::SecurityOrigin::canAccessApplicationCache):

LayoutTests:

* http/tests/security/cross-origin-appcache-allowed-expected.txt: Added.
* http/tests/security/cross-origin-appcache-allowed.html: Added.
* http/tests/security/cross-origin-appcache-expected.txt: Added.
* http/tests/security/cross-origin-appcache.html: Added.
* http/tests/security/resources/cross-origin-iframe-for-appcache-allowed.html: Added.
* http/tests/security/resources/cross-origin-iframe-for-appcache.html: Added.
* http/tests/security/resources/manifest-for-appcache-allowed.manifest: Added.
* http/tests/security/resources/manifest-for-appcache-blocked.manifest: Added.
* http/tests/security/resources/manifest-for-appcache.manifest: Added.
* http/tests/security/resources/same-origin-iframe-for-appcache-blocked.html: Added.
* http/tests/security/same-origin-appcache-blocked-expected.txt: Added.
* http/tests/security/same-origin-appcache-blocked.html: Added.
* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146115 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Inspector: [Chromium] http/tests/inspector/indexeddb/database-data.html ASSERT on Win7 following r133855
https://bugs.webkit.org/show_bug.cgi?id=101618

Deactivate transactions created by the inspector, before
they are reactivated by IndexedDB. This puts transactions
in an identical state as when they are created by scripts.

Reviewed by Vsevolod Vlasov.

Test: http/tests/inspector/indexeddb/database-data.html

* inspector/InspectorIndexedDBAgent.cpp: Make transactions inactive upon leaving the inspector code.


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