mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 16:55:40 +00:00
f9f5914039
# ignore-this-changeset Differential Revision: https://phabricator.services.mozilla.com/D36041 --HG-- extra : source : 96b3895a3b2aa2fcb064c85ec5857b7216884556
18 lines
507 B
JavaScript
18 lines
507 B
JavaScript
/* Any copyright is dedicated to the Public Domain.
|
|
http://creativecommons.org/publicdomain/zero/1.0/ */
|
|
var { NetUtil } = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
|
|
|
|
function test() {
|
|
var file = new File(
|
|
[new Blob(["test"], { type: "text/plain" })],
|
|
"test-name"
|
|
);
|
|
var url = URL.createObjectURL(file);
|
|
var channel = NetUtil.newChannel({
|
|
uri: url,
|
|
loadUsingSystemPrincipal: true,
|
|
});
|
|
|
|
is(channel.contentDispositionFilename, "test-name", "filename matches");
|
|
}
|