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..e25e910cb53f66597f7b272d1a012333d41a3c82 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,28 +3,33 @@ if (self.importScripts) { |
importScripts('/fetch/resources/thorough-util.js'); |
} |
-var url = URL.createObjectURL(new Blob(["report({jsonpResult: 'success'});"], {type: 'application/json'})); |
+var TEST_TARGETS = []; |
-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]], |
+// Only [Exposed=(Window,DedicatedWorker,SharedWorker)]. |
+if ('createObjectURL' in URL) { |
+ var url = URL.createObjectURL(new Blob(["report({jsonpResult: 'success'});"], {type: 'application/json'})); |
-// 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]], |
-]; |
+ 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]], |
+ ]; |
+} |
if (self.importScripts) { |
executeTests(TEST_TARGETS); |