From e6ed22f248afe5b4ac9f6fd8b34e3b4da87287af Mon Sep 17 00:00:00 2001 From: Sebastian Hengst Date: Fri, 13 Oct 2017 13:25:22 +0200 Subject: [PATCH] Backed out changeset 6c0e229ac2e8 (bug 1305230) --- dom/file/tests/mochitest.ini | 2 -- dom/file/tests/test_fileapi_slice.html | 15 ++++++++++-- dom/file/tests/test_fileapi_slice2.html | 31 ------------------------- 3 files changed, 13 insertions(+), 35 deletions(-) delete mode 100644 dom/file/tests/test_fileapi_slice2.html diff --git a/dom/file/tests/mochitest.ini b/dom/file/tests/mochitest.ini index c856b2616f1c..566808fb7b76 100644 --- a/dom/file/tests/mochitest.ini +++ b/dom/file/tests/mochitest.ini @@ -27,8 +27,6 @@ support-files = file_ipc_messagemanager_blob.html support-files = worker_fileReader.js [test_fileapi_slice.html] skip-if = (toolkit == 'android') # Android: Bug 775227 -[test_fileapi_slice2.html] -skip-if = (toolkit == 'android') # Android: Bug 775227 [test_fileapi_slice_image.html] skip-if = (toolkit == 'android') # Android: Bug 775227 [test_mozfiledataurl.html] diff --git a/dom/file/tests/test_fileapi_slice.html b/dom/file/tests/test_fileapi_slice.html index e652a4581070..5cab433b5dc7 100644 --- a/dom/file/tests/test_fileapi_slice.html +++ b/dom/file/tests/test_fileapi_slice.html @@ -1,7 +1,7 @@ - Test for File API + Slice (in file) + Test for File API + Slice @@ -17,7 +17,11 @@ SimpleTest.waitForExplicitFinish(); +// Create files containing data we'll test with. We'll want long +// strings to ensure they span multiple buffers while loading + let canvasData; +let fileData; createCanvasURL() .then(data => { @@ -26,7 +30,14 @@ createCanvasURL() }) .then(file => { - return testSlice(file, canvasData.length, "", canvasData, "fileFile"); + fileData = file; + return testSlice(fileData, canvasData.length, "", canvasData, "fileFile"); +}) + +.then(file => { + let cx = $("canvas").getContext('2d'); + let memFile = cx.canvas.mozGetAsFile("image/png"); + return testSlice(memFile, canvasData.length, "image/png", canvasData, "memFile"); }) .then(SimpleTest.finish); diff --git a/dom/file/tests/test_fileapi_slice2.html b/dom/file/tests/test_fileapi_slice2.html deleted file mode 100644 index 1be15dab6fb5..000000000000 --- a/dom/file/tests/test_fileapi_slice2.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - Test for File API + Slice (in memory) - - - - - - - -

- -

- - - -