Backed out changeset 6c0e229ac2e8 (bug 1305230)

This commit is contained in:
Sebastian Hengst 2017-10-13 13:25:22 +02:00
Родитель 3909e15a13
Коммит e6ed22f248
3 изменённых файлов: 13 добавлений и 35 удалений

Просмотреть файл

@ -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]

Просмотреть файл

@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test for File API + Slice (in file)</title>
<title>Test for File API + Slice</title>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="text/javascript" src="common_blob.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
@ -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);

Просмотреть файл

@ -1,31 +0,0 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test for File API + Slice (in memory)</title>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="text/javascript" src="common_blob.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<p id="display">
<canvas id=canvas width=1100 height=1100 hidden moz-opaque></canvas>
</p>
<script type="text/javascript">
SimpleTest.waitForExplicitFinish();
createCanvasURL()
.then(data => {
let cx = $("canvas").getContext('2d');
let memFile = cx.canvas.mozGetAsFile("image/png");
return testSlice(memFile, data.length, "image/png", data, "memFile");
})
.then(SimpleTest.finish);
</script>
</body>
</html>