forked from mirrors/gecko-dev
MozReview-Commit-ID: 4wsHtf9312c --HG-- rename : testing/web-platform/tests/html/browsers/windows/support-window-name-echo.html => testing/web-platform/tests/html/browsers/windows/resources/echo-window-name.html rename : testing/web-platform/tests/html/browsers/windows/support-nested-browsing-contexts.html => testing/web-platform/tests/html/browsers/windows/resources/nested-post-to-opener.html rename : testing/web-platform/tests/html/browsers/windows/support-named-null-opener.html => testing/web-platform/tests/html/browsers/windows/resources/noreferrer-window-name.html rename : testing/web-platform/tests/html/browsers/windows/support-post-to-opener.html => testing/web-platform/tests/html/browsers/windows/resources/post-to-opener.html rename : testing/web-platform/tests/html/browsers/windows/support-close.html => testing/web-platform/tests/html/browsers/windows/resources/window-close-button.html rename : testing/web-platform/tests/html/browsers/windows/support-opener-null.html => testing/web-platform/tests/html/browsers/windows/resources/window-opener.html rename : testing/web-platform/tests/mediacapture-streams/MediaStreamTrack-end.https.html => testing/web-platform/tests/mediacapture-streams/MediaStreamTrack-end-manual.https.html rename : testing/web-platform/tests/notifications/shownotification-resolve-manual.html => testing/web-platform/tests/notifications/shownotification-resolve-manual.https.html rename : testing/web-platform/tests/service-workers/service-worker/fetch-event-within-sw-manual.html => testing/web-platform/tests/service-workers/service-worker/fetch-event-within-sw-manual.https.html rename : testing/web-platform/tests/service-workers/service-worker/fetch-event-within-sw.html => testing/web-platform/tests/service-workers/service-worker/fetch-event-within-sw.https.html rename : testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-cue-text-parsing-rules/buildtests.py => testing/web-platform/tests/webvtt/parsing/cue-text-parsing/buildtests.py rename : testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-cue-text-parsing-rules/common.js => testing/web-platform/tests/webvtt/parsing/cue-text-parsing/common.js rename : testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-cue-text-parsing-rules/dat/entities.dat => testing/web-platform/tests/webvtt/parsing/cue-text-parsing/dat/entities.dat rename : testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-cue-text-parsing-rules/dat/tags.dat => testing/web-platform/tests/webvtt/parsing/cue-text-parsing/dat/tags.dat rename : testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-cue-text-parsing-rules/dat/timestamps.dat => testing/web-platform/tests/webvtt/parsing/cue-text-parsing/dat/timestamps.dat rename : testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-cue-text-parsing-rules/dat/tree-building.dat => testing/web-platform/tests/webvtt/parsing/cue-text-parsing/dat/tree-building.dat rename : testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-cue-text-parsing-rules/tests/entities.html => testing/web-platform/tests/webvtt/parsing/cue-text-parsing/tests/entities.html rename : testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-cue-text-parsing-rules/tests/tags.html => testing/web-platform/tests/webvtt/parsing/cue-text-parsing/tests/tags.html rename : testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-cue-text-parsing-rules/tests/timestamps.html => testing/web-platform/tests/webvtt/parsing/cue-text-parsing/tests/timestamps.html rename : testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-cue-text-parsing-rules/tests/tree-building.html => testing/web-platform/tests/webvtt/parsing/cue-text-parsing/tests/tree-building.html rename : testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-formfeed.vtt => testing/web-platform/tests/webvtt/parsing/file-parsing/support/signature-formfeed.vtt rename : testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-lowercase.vtt => testing/web-platform/tests/webvtt/parsing/file-parsing/support/signature-lowercase.vtt rename : testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-null.vtt => testing/web-platform/tests/webvtt/parsing/file-parsing/support/signature-null.vtt rename : testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-too-short.vtt => testing/web-platform/tests/webvtt/parsing/file-parsing/support/signature-partial.vtt rename : testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-two-boms.vtt => testing/web-platform/tests/webvtt/parsing/file-parsing/support/signature-two-boms.vtt rename : testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-websrt.vtt => testing/web-platform/tests/webvtt/parsing/file-parsing/support/signature-websrt.vtt rename : testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-bom.vtt => testing/web-platform/tests/webvtt/parsing/file-parsing/tests/support/signature-bom.vtt rename : testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-no-newline.vtt => testing/web-platform/tests/webvtt/parsing/file-parsing/tests/support/signature-no-newline.vtt rename : testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-space-no-newline.vtt => testing/web-platform/tests/webvtt/parsing/file-parsing/tests/support/signature-space-no-newline.vtt rename : testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-space.vtt => testing/web-platform/tests/webvtt/parsing/file-parsing/tests/support/signature-space.vtt rename : testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-tab-no-newline.vtt => testing/web-platform/tests/webvtt/parsing/file-parsing/tests/support/signature-tab-no-newline.vtt rename : testing/web-platform/tests/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/signature-tab.vtt => testing/web-platform/tests/webvtt/parsing/file-parsing/tests/support/signature-tab.vtt
38 lines
1.2 KiB
HTML
38 lines
1.2 KiB
HTML
<!doctype html>
|
|
<title>Revoking blob URL used with XMLHttpRequest</title>
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
|
|
<script>
|
|
async_test(function(t) {
|
|
var blob = new Blob(["test"]);
|
|
var url = URL.createObjectURL(blob);
|
|
var xhr = new XMLHttpRequest();
|
|
xhr.open("GET", url);
|
|
|
|
// Revoke the object URL. XHR should take a reference to the blob as soon as
|
|
// it receives it in open(), so the request succeeds even though we revoke the
|
|
// URL before calling send().
|
|
URL.revokeObjectURL(url);
|
|
|
|
xhr.send();
|
|
|
|
xhr.onload = t.step_func_done(function() {
|
|
assert_equals(xhr.response, "test");
|
|
})
|
|
xhr.onerror = t.step_func(function() {
|
|
assert_unreached("Got unexpected error event");
|
|
})
|
|
}, "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>
|