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

Side by Side Diff: LayoutTests/imported/web-platform-tests/FileAPI/blob/Blob-XHR-revoke.html

Issue 1236713002: Import FileAPI tests from web-platform-tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Ugh, stupid baselines Created 5 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!doctype html>
2 <title>Revoking blob URL used with XMLHttpRequest</title>
3 <script src="../../../../resources/testharness.js"></script>
4 <script src="../../../../resources/testharnessreport.js"></script>
5
6 <script>
7 async_test(function(t) {
8 var blob = new Blob(["test"]);
9 var url = URL.createObjectURL(blob);
10 var xhr = new XMLHttpRequest();
11 xhr.open("GET", url);
12
13 // Revoke the object URL. XHR should take a reference to the blob as soon a s
14 // it receives it in open(), so the request succeeds even though we revoke t he
15 // URL before calling send().
16 URL.revokeObjectURL(url);
17
18 xhr.send();
19
20 xhr.onload = t.step_func(function() {
21 assert_equals(xhr.response, "test");
22 t.done();
23 })
24 xhr.onerror = t.step_func(function() {
25 assert_unreached("Got unexpected error event");
26 })
27 });
28 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698