Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Issue 1032623008: Expose Cache Storage API in global window/worker scope (Closed)

Created:
5 years, 9 months ago by jsbell
Modified:
5 years, 8 months ago
CC:
blink-reviews, michaeln, jsbell+serviceworker_chromium.org, tzik, serviceworker-reviews, nhiroki, falken, kinuko+serviceworker, horo+watch_chromium.org
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Expose Cache Storage API in global window/worker scope Exposes self.caches which accesses the origin's CacheStorage instance. Requires the --enable-experimental-web-platform-features flag, otherwise the API is only available in Service Workers. https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#cache BUG=439389 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=192778

Patch Set 1 #

Patch Set 2 : window tests added and match sw tests #

Patch Set 3 : Incorporate serviceworker tests #

Patch Set 4 : Added worker tests #

Patch Set 5 : Add sandboxing test #

Patch Set 6 : Added test verifying window/worker see same storage #

Total comments: 1

Patch Set 7 : Rebased #

Patch Set 8 : Update webexposed expectations #

Unified diffs Side-by-side diffs Delta from patch set Stats (+508 lines, -129 lines) Patch
A LayoutTests/http/tests/cachestorage/common.html View 1 2 3 4 5 1 chunk +51 lines, -0 lines 0 comments Download
A + LayoutTests/http/tests/cachestorage/resources/blank.html View 1 0 chunks +-1 lines, --1 lines 0 comments Download
A LayoutTests/http/tests/cachestorage/resources/common-worker.js View 1 2 3 4 5 1 chunk +15 lines, -0 lines 0 comments Download
A + LayoutTests/http/tests/cachestorage/resources/fetch-status.php View 1 2 0 chunks +-1 lines, --1 lines 0 comments Download
A LayoutTests/http/tests/cachestorage/resources/iframe.html View 1 2 3 4 1 chunk +13 lines, -0 lines 0 comments Download
A + LayoutTests/http/tests/cachestorage/resources/simple.txt View 1 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/http/tests/cachestorage/resources/test-helpers.js View 1 1 chunk +0 lines, -12 lines 0 comments Download
A + LayoutTests/http/tests/cachestorage/script-tests/cache-add.js View 1 2 3 11 chunks +21 lines, -19 lines 0 comments Download
A + LayoutTests/http/tests/cachestorage/script-tests/cache-delete.js View 1 2 3 2 chunks +7 lines, -2 lines 0 comments Download
A + LayoutTests/http/tests/cachestorage/script-tests/cache-match.js View 1 2 3 4 chunks +9 lines, -5 lines 0 comments Download
A + LayoutTests/http/tests/cachestorage/script-tests/cache-put.js View 1 2 3 4 chunks +9 lines, -5 lines 0 comments Download
A + LayoutTests/http/tests/cachestorage/script-tests/cache-storage.js View 1 2 3 2 chunks +7 lines, -2 lines 0 comments Download
A + LayoutTests/http/tests/cachestorage/script-tests/cache-storage-keys.js View 1 2 3 2 chunks +7 lines, -3 lines 0 comments Download
A + LayoutTests/http/tests/cachestorage/script-tests/cache-storage-match.js View 1 2 3 2 chunks +7 lines, -3 lines 0 comments Download
A + LayoutTests/http/tests/cachestorage/serviceworker/cache-add.html View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
A + LayoutTests/http/tests/cachestorage/serviceworker/cache-add-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
A + LayoutTests/http/tests/cachestorage/serviceworker/cache-delete.html View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
A + LayoutTests/http/tests/cachestorage/serviceworker/cache-delete-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
A + LayoutTests/http/tests/cachestorage/serviceworker/cache-match.html View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
A + LayoutTests/http/tests/cachestorage/serviceworker/cache-match-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
A + LayoutTests/http/tests/cachestorage/serviceworker/cache-put.html View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
A + LayoutTests/http/tests/cachestorage/serviceworker/cache-put-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
A + LayoutTests/http/tests/cachestorage/serviceworker/cache-storage.html View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
A + LayoutTests/http/tests/cachestorage/serviceworker/cache-storage-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
A + LayoutTests/http/tests/cachestorage/serviceworker/cache-storage-keys.html View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
A LayoutTests/http/tests/cachestorage/serviceworker/cache-storage-match.html View 1 2 3 1 chunk +9 lines, -0 lines 0 comments Download
A + LayoutTests/http/tests/cachestorage/window/cache-add.html View 1 1 chunk +4 lines, -5 lines 0 comments Download
A + LayoutTests/http/tests/cachestorage/window/cache-add-expected.txt View 1 1 chunk +0 lines, -1 line 0 comments Download
A + LayoutTests/http/tests/cachestorage/window/cache-delete.html View 1 1 chunk +4 lines, -5 lines 0 comments Download
A + LayoutTests/http/tests/cachestorage/window/cache-delete-expected.txt View 1 1 chunk +0 lines, -1 line 0 comments Download
A LayoutTests/http/tests/cachestorage/window/cache-match.html View 1 1 chunk +8 lines, -0 lines 0 comments Download
A + LayoutTests/http/tests/cachestorage/window/cache-match-expected.txt View 1 1 chunk +0 lines, -1 line 0 comments Download
A + LayoutTests/http/tests/cachestorage/window/cache-put.html View 1 1 chunk +4 lines, -5 lines 0 comments Download
A + LayoutTests/http/tests/cachestorage/window/cache-put-expected.txt View 1 1 chunk +0 lines, -1 line 0 comments Download
A + LayoutTests/http/tests/cachestorage/window/cache-storage.html View 1 1 chunk +4 lines, -5 lines 0 comments Download
A + LayoutTests/http/tests/cachestorage/window/cache-storage-expected.txt View 1 1 chunk +0 lines, -1 line 0 comments Download
A + LayoutTests/http/tests/cachestorage/window/cache-storage-keys.html View 1 1 chunk +4 lines, -5 lines 0 comments Download
A LayoutTests/http/tests/cachestorage/window/cache-storage-match.html View 1 1 chunk +8 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/cachestorage/window/sandboxed-iframes.html View 1 2 3 4 5 1 chunk +66 lines, -0 lines 0 comments Download
A + LayoutTests/http/tests/cachestorage/worker/cache-add.html View 1 2 3 1 chunk +2 lines, -3 lines 0 comments Download
A + LayoutTests/http/tests/cachestorage/worker/cache-add-expected.txt View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
A + LayoutTests/http/tests/cachestorage/worker/cache-delete.html View 1 2 3 1 chunk +2 lines, -3 lines 0 comments Download
A + LayoutTests/http/tests/cachestorage/worker/cache-delete-expected.txt View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
A + LayoutTests/http/tests/cachestorage/worker/cache-match.html View 1 2 3 1 chunk +2 lines, -3 lines 0 comments Download
A + LayoutTests/http/tests/cachestorage/worker/cache-match-expected.txt View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
A + LayoutTests/http/tests/cachestorage/worker/cache-put.html View 1 2 3 1 chunk +2 lines, -3 lines 0 comments Download
A + LayoutTests/http/tests/cachestorage/worker/cache-put-expected.txt View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
A + LayoutTests/http/tests/cachestorage/worker/cache-storage.html View 1 2 3 1 chunk +2 lines, -3 lines 0 comments Download
A + LayoutTests/http/tests/cachestorage/worker/cache-storage-expected.txt View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
A + LayoutTests/http/tests/cachestorage/worker/cache-storage-keys.html View 1 2 3 1 chunk +2 lines, -3 lines 0 comments Download
A + LayoutTests/http/tests/cachestorage/worker/cache-storage-match.html View 1 2 3 1 chunk +3 lines, -4 lines 0 comments Download
A + LayoutTests/resources/testharness-helpers.js View 1 0 chunks +-1 lines, --1 lines 0 comments Download
M LayoutTests/virtual/stable/webexposed/global-interface-listing-dedicated-worker-expected.txt View 1 2 3 4 5 6 7 1 chunk +13 lines, -0 lines 0 comments Download
M LayoutTests/virtual/stable/webexposed/global-interface-listing-expected.txt View 1 2 3 4 5 6 7 1 chunk +13 lines, -0 lines 0 comments Download
M LayoutTests/virtual/stable/webexposed/global-interface-listing-shared-worker-expected.txt View 1 2 3 4 5 6 7 1 chunk +13 lines, -0 lines 0 comments Download
M LayoutTests/webexposed/global-interface-listing-dedicated-worker-expected.txt View 1 1 chunk +13 lines, -0 lines 0 comments Download
M LayoutTests/webexposed/global-interface-listing-expected.txt View 1 2 3 4 5 6 1 chunk +13 lines, -0 lines 0 comments Download
M LayoutTests/webexposed/global-interface-listing-shared-worker-expected.txt View 1 1 chunk +13 lines, -0 lines 0 comments Download
M Source/core/frame/UseCounter.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M Source/modules/modules.gypi View 1 2 chunks +4 lines, -0 lines 0 comments Download
M Source/modules/serviceworkers/Cache.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/serviceworkers/CacheStorage.idl View 1 1 chunk +1 line, -1 line 0 comments Download
A Source/modules/serviceworkers/GlobalCacheStorage.h View 1 chunk +24 lines, -0 lines 0 comments Download
A Source/modules/serviceworkers/GlobalCacheStorage.cpp View 1 1 chunk +84 lines, -0 lines 0 comments Download
A Source/modules/serviceworkers/WindowCacheStorage.idl View 1 chunk +11 lines, -0 lines 0 comments Download
A Source/modules/serviceworkers/WorkerCacheStorage.idl View 1 chunk +11 lines, -0 lines 0 comments Download
M Source/platform/RuntimeEnabledFeatures.in View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M Source/platform/weborigin/SecurityOrigin.h View 1 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 21 (9 generated)
jsbell
Okay, I think this is ready for a look, at least for landing behind a ...
5 years, 9 months ago (2015-03-26 21:59:12 UTC) #2
jsbell
I should probably note the reviewers:
5 years, 9 months ago (2015-03-27 16:22:45 UTC) #3
jsbell
kinuko@, michaeln@, jkarlin@, gavinp@ - please take a look? (I should also not hit 'send' ...
5 years, 9 months ago (2015-03-27 16:23:25 UTC) #4
jkarlin
lgtm! https://codereview.chromium.org/1032623008/diff/100001/Source/modules/serviceworkers/WorkerCacheStorage.idl File Source/modules/serviceworkers/WorkerCacheStorage.idl (right): https://codereview.chromium.org/1032623008/diff/100001/Source/modules/serviceworkers/WorkerCacheStorage.idl#newcode10 Source/modules/serviceworkers/WorkerCacheStorage.idl:10: [CallWith=ScriptState, Unforgeable, MeasureAs=GlobalCacheStorage, RuntimeEnabled=GlobalCacheStorage, RaisesException] readonly attribute CacheStorage ...
5 years, 9 months ago (2015-03-27 20:06:26 UTC) #5
kinuko
lgtm
5 years, 9 months ago (2015-03-28 02:07:19 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1032623008/100001
5 years, 8 months ago (2015-03-30 16:21:53 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: mac_blink_compile_dbg on tryserver.blink (JOB_FAILED, http://build.chromium.org/p/tryserver.blink/builders/mac_blink_compile_dbg/builds/40100)
5 years, 8 months ago (2015-03-30 16:27:28 UTC) #10
jsbell
Rebased the CL. Also, I need a Source/platform OWNER... hey pdr@ - can you take ...
5 years, 8 months ago (2015-03-30 17:05:45 UTC) #12
pdr.
On 2015/03/30 at 17:05:45, jsbell wrote: > Rebased the CL. Also, I need a Source/platform ...
5 years, 8 months ago (2015-03-30 17:11:23 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1032623008/120001
5 years, 8 months ago (2015-03-30 17:12:37 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1032623008/140001
5 years, 8 months ago (2015-03-30 20:22:14 UTC) #20
commit-bot: I haz the power
5 years, 8 months ago (2015-03-30 22:10:10 UTC) #21
Message was sent while issue was closed.
Committed patchset #8 (id:140001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=192778

Powered by Google App Engine
This is Rietveld 408576698