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

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

Issue 1371393003: [Fetch] Support blob: scheme (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 1 month 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 unified diff | Download patch
OLDNEW
(Empty)
1 if (self.importScripts) {
2 importScripts('/fetch/resources/fetch-test-helpers.js');
3 importScripts('/fetch/resources/thorough-util.js');
4 }
5
6 var url = URL.createObjectURL(new Blob(["report({jsonpResult: 'success'});"], {t ype: 'application/json'}));
7
8 var TEST_TARGETS = [
9 // Same-origin blob: requests.
10 [BASE_URL + 'url=' + encodeURIComponent(url) + '&mode=same-origin&method=GET',
11 [fetchResolved, hasContentLength, noServerHeader, hasBody, typeBasic],
12 [checkJsonpSuccess]],
13 [BASE_URL + 'url=' + encodeURIComponent(url) + '&mode=cors&method=GET',
14 [fetchResolved, hasContentLength, noServerHeader, hasBody, typeBasic],
15 [checkJsonpSuccess]],
16 [BASE_URL + 'url=' + encodeURIComponent(url) + '&mode=no-cors&method=GET',
17 [fetchResolved, hasContentLength, noServerHeader, hasBody, typeBasic],
18 [checkJsonpSuccess]],
19
20 // blob: requests with non-GET methods.
21 [BASE_URL + 'url=' + encodeURIComponent(url) +
22 '&mode=same-origin&method=POST',
23 [fetchRejected]],
24 [BASE_URL + 'url=' + encodeURIComponent(url) +
25 '&mode=same-origin&method=HEAD',
26 [fetchRejected]],
27 ];
28
29 if (self.importScripts) {
30 executeTests(TEST_TARGETS);
31 done();
32 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698