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

Unified Diff: LayoutTests/http/tests/serviceworker/chromium/memory-cache.html

Issue 640463003: MemoryCache: Enable MemoryCache to have multiple isolated resource maps (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: tweak variable names Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/fetch/MemoryCache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/serviceworker/chromium/memory-cache.html
diff --git a/LayoutTests/http/tests/serviceworker/chromium/memory-cache.html b/LayoutTests/http/tests/serviceworker/chromium/memory-cache.html
index 5567c2b3b368b9546b65a3de4d013fc0d3c5ece4..a2d2a9b691d43c52e33ef898701b1d5a2ca363bd 100644
--- a/LayoutTests/http/tests/serviceworker/chromium/memory-cache.html
+++ b/LayoutTests/http/tests/serviceworker/chromium/memory-cache.html
@@ -33,10 +33,19 @@ async_test(function(t) {
.then(function() { return with_iframe(scope); })
.then(function(f) {
frame = f;
+
// Request a json file from controlled page.
+ assert_false(
+ frame.contentWindow.internals.isLoadingFromMemoryCache(json_url),
+ 'Cache for controlled page should be empty');
promises.push(frame.contentWindow.getJSONP(json_url));
+
// Request a json file from non-controlled page.
+ assert_false(
+ internals.isLoadingFromMemoryCache(json_url),
+ 'Cache for non-controlled page should be empty');
promises.push(getJSONP(json_url));
+
return Promise.all(promises);
})
.then(function(results) {
@@ -48,6 +57,12 @@ async_test(function(t) {
results[1].src,
'network',
'Response for non-controlled page should be served by network');
+ assert_true(
+ frame.contentWindow.internals.isLoadingFromMemoryCache(json_url),
+ 'Response for controlled page should be cached');
+ assert_true(
+ internals.isLoadingFromMemoryCache(json_url),
+ 'Response for non-controlled page should be cached');
unload_iframe(frame);
return registration.unregister();
})
« no previous file with comments | « no previous file | Source/core/fetch/MemoryCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698