Index: third_party/WebKit/LayoutTests/external/wpt/FileAPI/blob/Blob-XHR-revoke.html |
diff --git a/third_party/WebKit/LayoutTests/external/wpt/FileAPI/blob/Blob-XHR-revoke.html b/third_party/WebKit/LayoutTests/external/wpt/FileAPI/blob/Blob-XHR-revoke.html |
index fea313eeee5663f007df29e9e0ae128e88ba3835..a38caaf3221023d030690f914122f74cd8c02aef 100644 |
--- a/third_party/WebKit/LayoutTests/external/wpt/FileAPI/blob/Blob-XHR-revoke.html |
+++ b/third_party/WebKit/LayoutTests/external/wpt/FileAPI/blob/Blob-XHR-revoke.html |
@@ -17,12 +17,22 @@ async_test(function(t) { |
xhr.send(); |
- xhr.onload = t.step_func(function() { |
+ xhr.onload = t.step_func_done(function() { |
assert_equals(xhr.response, "test"); |
- t.done(); |
}) |
xhr.onerror = t.step_func(function() { |
assert_unreached("Got unexpected error event"); |
}) |
-}); |
-</script> |
+}, "Revoke blob URL after open(), will fetch"); |
+ |
+async_test(t => { |
+ const blob = new Blob(["test"]), |
+ blobURL = URL.createObjectURL(blob), |
+ client = new XMLHttpRequest |
+ URL.revokeObjectURL(blobURL) |
+ client.open("GET", blobURL) |
+ client.onload = t.step_func(() => assert_unreached("Got unexpected load event")) |
+ client.onerror = t.step_func_done() |
+ client.send() |
+}, "Revoke blob URL before open(), network error (after send())") |
+</script> |