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

Unified Diff: LayoutTests/http/tests/cachestorage/script-tests/cache-match.js

Issue 1032623008: Expose Cache Storage API in global window/worker scope (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update webexposed expectations Created 5 years, 9 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
Index: LayoutTests/http/tests/cachestorage/script-tests/cache-match.js
diff --git a/LayoutTests/http/tests/serviceworker/resources/cache-match-worker.js b/LayoutTests/http/tests/cachestorage/script-tests/cache-match.js
similarity index 97%
copy from LayoutTests/http/tests/serviceworker/resources/cache-match-worker.js
copy to LayoutTests/http/tests/cachestorage/script-tests/cache-match.js
index 774297c72c89e23ed33ca20a8bd9b5646bcbfeae..6d69503ec97df0179dec82f5794c20f85f6303a3 100644
--- a/LayoutTests/http/tests/serviceworker/resources/cache-match-worker.js
+++ b/LayoutTests/http/tests/cachestorage/script-tests/cache-match.js
@@ -1,6 +1,8 @@
-importScripts('worker-testharness.js');
-importScripts('/resources/testharness-helpers.js');
-importScripts('override_assert_object_equals.js');
+if (self.importScripts) {
+ importScripts('/resources/testharness.js');
+ importScripts('/resources/testharness-helpers.js');
+ importScripts('../resources/test-helpers.js');
+}
// A set of Request/Response pairs to be used with prepopulated_cache_test().
var simple_entries = [
@@ -405,7 +407,7 @@ prepopulated_cache_test(vary_entries, function(cache, entries) {
cache_test(function(cache) {
var request = new Request('http://example.com');
var response;
- var request_url = new URL('simple.txt', location.href).href;
+ var request_url = new URL('../resources/simple.txt', location.href).href;
return fetch(request_url)
.then(function(fetch_result) {
response = fetch_result;
@@ -433,7 +435,7 @@ cache_test(function(cache) {
}, 'Cache.match with Request and Response objects with different URLs');
cache_test(function(cache) {
- var request_url = new URL('simple.txt', location.href).href;
+ var request_url = new URL('../resources/simple.txt', location.href).href;
return fetch(request_url)
.then(function(fetch_result) {
return cache.put(new Request(request_url), fetch_result);
@@ -495,3 +497,5 @@ function prepopulated_cache_test(entries, test_function, description) {
});
}, description);
}
+
+done();

Powered by Google App Engine
This is Rietveld 408576698