michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: /** michael@0: * Make sure passing null and nothing to various variable-arg DownloadUtils michael@0: * methods provide the same result. michael@0: */ michael@0: michael@0: let Cu = Components.utils; michael@0: Cu.import("resource://gre/modules/DownloadUtils.jsm"); michael@0: michael@0: function run_test() michael@0: { michael@0: do_check_eq(DownloadUtils.getDownloadStatus(1000, null, null, null) + "", michael@0: DownloadUtils.getDownloadStatus(1000) + ""); michael@0: do_check_eq(DownloadUtils.getDownloadStatus(1000, null, null) + "", michael@0: DownloadUtils.getDownloadStatus(1000, null) + ""); michael@0: michael@0: do_check_eq(DownloadUtils.getTransferTotal(1000, null) + "", michael@0: DownloadUtils.getTransferTotal(1000) + ""); michael@0: michael@0: do_check_eq(DownloadUtils.getTimeLeft(1000, null) + "", michael@0: DownloadUtils.getTimeLeft(1000) + ""); michael@0: }