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

Unified Diff: LayoutTests/http/tests/cachestorage/script-tests/cache-put.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-put.js
diff --git a/LayoutTests/http/tests/serviceworker/resources/cache-put-worker.js b/LayoutTests/http/tests/cachestorage/script-tests/cache-put.js
similarity index 97%
copy from LayoutTests/http/tests/serviceworker/resources/cache-put-worker.js
copy to LayoutTests/http/tests/cachestorage/script-tests/cache-put.js
index 9393a15473b8fc3a25fd04845b9370eb877e0869..cc8c7c9e128c95eb4cae0e21a13a1bcce4e2e1e3 100644
--- a/LayoutTests/http/tests/serviceworker/resources/cache-put-worker.js
+++ b/LayoutTests/http/tests/cachestorage/script-tests/cache-put.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');
+}
var test_url = 'https://example.com/foo';
var test_body = 'Hello world!';
@@ -16,7 +18,7 @@ cache_test(function(cache) {
}, 'Cache.put called with simple Request and Response');
cache_test(function(cache) {
- var test_url = new URL('simple.txt', location.href).href;
+ var test_url = new URL('../resources/simple.txt', location.href).href;
var request = new Request(test_url);
var response;
return fetch(test_url)
@@ -125,7 +127,7 @@ cache_test(function(cache) {
}, 'Cache.put with an empty response body');
cache_test(function(cache) {
- var test_url = new URL('fetch-status.php?status=500', location.href).href;
+ var test_url = new URL('../resources/fetch-status.php?status=500', location.href).href;
var request = new Request(test_url);
var response;
return fetch(test_url)
@@ -321,3 +323,5 @@ cache_test(function(cache) {
'Cache.put should throw a TypeError for a response with used body.');
});
}, 'Cache.put with a used response body');
+
+done();

Powered by Google App Engine
This is Rietveld 408576698