Backout 42fdd61be0ba (bug 765575) due to test failures.
This commit is contained in:
Родитель
75c388b0b9
Коммит
ea00949bf7
|
@ -1020,13 +1020,9 @@ nsYouSendItFileUploader.prototype = {
|
|||
"\r\nContent-Disposition: form-data; name=\"bid\"\r\n\r\n" +
|
||||
this._urlInfo.fileId;
|
||||
|
||||
let fileName = /^[\040-\176]+$/.test(this.file.leafName)
|
||||
? this.file.leafName
|
||||
: encodeURIComponent(this.file.leafName);
|
||||
|
||||
fileContents += "\r\n--" + boundary +
|
||||
"\r\nContent-Disposition: form-data; name=\"fname\"; filename=\"" +
|
||||
fileName + "\"\r\nContent-Type: application/octet-stream" +
|
||||
this.file.leafName + "\"\r\nContent-Type: application/octet-stream" +
|
||||
"\r\n\r\n";
|
||||
|
||||
// Since js doesn't like binary data in strings, we're going to create
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Ullamco farm-to-table banh mi, echo park dolor lomo chillwave seitan cred ad mustache 3 wolf moon excepteur. Odd future placeat sint, cliche consequat portland banksy vinyl 3 wolf moon high life you probably haven't heard of them nisi jean shorts. Eu freegan skateboard, kogi etsy beard aliquip blog sapiente pour-over sunt. Cosby sweater jean shorts wayfarers keytar trust fund, four loko pitchfork pinterest forage semiotics lo-fi cray beard swag butcher. Odd future cred swag, pork belly keytar velit terry richardson locavore id brunch excepteur commodo occupy mollit pickled. Street art voluptate pickled fap, ad craft beer cupidatat messenger bag placeat helvetica. Enim raw denim occupy pork belly irure et.
|
|
@ -321,32 +321,3 @@ function test_bug771132_fix_no_scheme() {
|
|||
urlForFile = provider.urlForFile(file);
|
||||
assert_equals(kExpectedUrl, urlForFile);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test for bug 765575 - if Yousendit fails on some non-ASCII attachments
|
||||
*/
|
||||
function test_bug765575_fix_non_ascii() {
|
||||
const kExpectedUrl = "http://www.example.com/expectedUrl";
|
||||
const kTopics = [kUploadFile, kGetFileURL];
|
||||
|
||||
gServer.planForUploadFile("%E2%88%80.eml");
|
||||
gServer.planForGetFileURL("%E2%88%80.eml", {url: kExpectedUrl});
|
||||
|
||||
let obs = new ObservationRecorder();
|
||||
for each (let [, topic] in Iterator(kTopics)) {
|
||||
obs.planFor(topic);
|
||||
Services.obs.addObserver(obs, topic, false);
|
||||
}
|
||||
|
||||
let requestObserver = gObsManager.create("test_simple_case - Upload 1");
|
||||
let file = getFile("./data/∀.eml", __file__);
|
||||
let provider = gServer.getPreparedBackend("someAccountKey");
|
||||
provider.uploadFile(file, requestObserver);
|
||||
|
||||
mc.waitFor(function () requestObserver.success);
|
||||
|
||||
let urlForFile = provider.urlForFile(file);
|
||||
assert_equals(kExpectedUrl, urlForFile);
|
||||
assert_equals(1, obs.numSightings(kUploadFile));
|
||||
assert_equals(1, obs.numSightings(kGetFileURL));
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче