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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/thorough/scheme-blob.js

Issue 1908263002: Don't expose URL.createObjectURL and revokeObjectURL to Service Workers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update expectations/update fetch tests Created 4 years, 7 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: third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/thorough/scheme-blob.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/thorough/scheme-blob.js b/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/thorough/scheme-blob.js
index a7965145752772088271150e411a2968c13d084c..97826c9d52df26df831346919b818ecb2fd803b9 100644
--- a/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/thorough/scheme-blob.js
+++ b/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/thorough/scheme-blob.js
@@ -3,30 +3,36 @@ if (self.importScripts) {
importScripts('/fetch/resources/thorough-util.js');
}
-var url = URL.createObjectURL(new Blob(["report({jsonpResult: 'success'});"], {type: 'application/json'}));
+// Only [Exposed=(Window,DedicatedWorker,SharedWorker)].
yhirano 2016/05/11 01:54:05 Could you define an empty TEST_TARGETS here and mo
jsbell 2016/05/11 21:52:41 Done.
+if ('createObjectURL' in URL) {
+ var url = URL.createObjectURL(new Blob(["report({jsonpResult: 'success'});"], {type: 'application/json'}));
-var TEST_TARGETS = [
-// Same-origin blob: requests.
- [BASE_URL + 'url=' + encodeURIComponent(url) + '&mode=same-origin&method=GET',
- [fetchResolved, hasContentLength, noServerHeader, hasBody, typeBasic],
- [checkJsonpSuccess]],
- [BASE_URL + 'url=' + encodeURIComponent(url) + '&mode=cors&method=GET',
- [fetchResolved, hasContentLength, noServerHeader, hasBody, typeBasic],
- [checkJsonpSuccess]],
- [BASE_URL + 'url=' + encodeURIComponent(url) + '&mode=no-cors&method=GET',
- [fetchResolved, hasContentLength, noServerHeader, hasBody, typeBasic],
- [checkJsonpSuccess]],
+ var TEST_TARGETS = [
+ // Same-origin blob: requests.
+ [BASE_URL + 'url=' + encodeURIComponent(url) + '&mode=same-origin&method=GET',
+ [fetchResolved, hasContentLength, noServerHeader, hasBody, typeBasic],
+ [checkJsonpSuccess]],
+ [BASE_URL + 'url=' + encodeURIComponent(url) + '&mode=cors&method=GET',
+ [fetchResolved, hasContentLength, noServerHeader, hasBody, typeBasic],
+ [checkJsonpSuccess]],
+ [BASE_URL + 'url=' + encodeURIComponent(url) + '&mode=no-cors&method=GET',
+ [fetchResolved, hasContentLength, noServerHeader, hasBody, typeBasic],
+ [checkJsonpSuccess]],
-// blob: requests with non-GET methods.
- [BASE_URL + 'url=' + encodeURIComponent(url) +
- '&mode=same-origin&method=POST',
- [fetchRejected]],
- [BASE_URL + 'url=' + encodeURIComponent(url) +
- '&mode=same-origin&method=HEAD',
- [fetchRejected]],
-];
+ // blob: requests with non-GET methods.
+ [BASE_URL + 'url=' + encodeURIComponent(url) +
+ '&mode=same-origin&method=POST',
+ [fetchRejected]],
+ [BASE_URL + 'url=' + encodeURIComponent(url) +
+ '&mode=same-origin&method=HEAD',
+ [fetchRejected]],
+ ];
+
+ if (self.importScripts) {
+ executeTests(TEST_TARGETS);
+ }
+}
if (self.importScripts) {
- executeTests(TEST_TARGETS);
done();
}

Powered by Google App Engine
This is Rietveld 408576698