Commit 88e8ebf9 authored by Marijn Kruisselbrink's avatar Marijn Kruisselbrink Committed by Commit Bot

Add a few more blob URL tests, checking for races with revoking and resolving.

Revoking right after navigating and/or loading script should not break
the loading.

Bug: 800901
Change-Id: I5b2fc378ae4681fb4d42e1e3742111f67a2d1a41
Reviewed-on: https://chromium-review.googlesource.com/894843
Commit-Queue: Marijn Kruisselbrink <mek@chromium.org>
Reviewed-by: default avatarVictor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533743}
parent 5b240cfb
...@@ -1715,8 +1715,10 @@ crbug.com/751952 virtual/origin-trials-runtimeflags-disabled/http/tests/origin_t ...@@ -1715,8 +1715,10 @@ crbug.com/751952 virtual/origin-trials-runtimeflags-disabled/http/tests/origin_t
crbug.com/800898 external/wpt/FileAPI/url/url-with-fetch.any.worker.html [ Pass Failure ] crbug.com/800898 external/wpt/FileAPI/url/url-with-fetch.any.worker.html [ Pass Failure ]
crbug.com/800898 external/wpt/FileAPI/url/url-with-xhr.any.worker.html [ Pass Failure ] crbug.com/800898 external/wpt/FileAPI/url/url-with-xhr.any.worker.html [ Pass Failure ]
crbug.com/800898 external/wpt/FileAPI/url/url-in-tags-revoke.window.html [ Pass Failure ]
crbug.com/800898 virtual/mojo-blobs/external/wpt/FileAPI/url/url-with-fetch.any.worker.html [ Pass Failure ] crbug.com/800898 virtual/mojo-blobs/external/wpt/FileAPI/url/url-with-fetch.any.worker.html [ Pass Failure ]
crbug.com/800898 virtual/mojo-blobs/external/wpt/FileAPI/url/url-with-xhr.any.worker.html [ Pass Failure ] crbug.com/800898 virtual/mojo-blobs/external/wpt/FileAPI/url/url-with-xhr.any.worker.html [ Pass Failure ]
crbug.com/800898 virtual/mojo-blobs/external/wpt/FileAPI/url/url-in-tags-revoke.window.html [ Pass Failure ]
# Websockets # Websockets
crbug.com/803558 external/wpt/websockets/Create-Secure-extensions-empty.htm [ Timeout ] crbug.com/803558 external/wpt/websockets/Create-Secure-extensions-empty.htm [ Timeout ]
......
async_test(t => {
const run_result = 'test_frame_OK';
const blob_contents = '<!doctype html>\n<meta charset="utf-8">\n' +
'<script>window.test_result = "' + run_result + '";</script>';
const blob = new Blob([blob_contents], {type: 'text/html'});
const url = URL.createObjectURL(blob);
const frame = document.createElement('iframe');
frame.setAttribute('src', url);
frame.setAttribute('style', 'display:none;');
document.body.appendChild(frame);
URL.revokeObjectURL(url);
frame.onload = t.step_func_done(() => {
assert_equals(frame.contentWindow.test_result, run_result);
});
}, 'Fetching a blob URL immediately before revoking it works in an iframe.');
async_test(t => {
const run_result = 'test_script_OK';
const blob_contents = 'window.script_test_result = "' + run_result + '";';
const blob = new Blob([blob_contents]);
const url = URL.createObjectURL(blob);
const e = document.createElement('script');
e.setAttribute('src', url);
e.onload = t.step_func_done(() => {
assert_equals(window.script_test_result, run_result);
});
document.body.appendChild(e);
URL.revokeObjectURL(url);
}, 'Fetching a blob URL immediately before revoking it works in <script> tags.');
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment