зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1305230 - Splitting test_fileapi_slice in two files, r=qdot
This commit is contained in:
Родитель
152f7eeac2
Коммит
91ed8fdbd6
|
@ -24,6 +24,8 @@ support-files = file_ipc_messagemanager_blob.html
|
|||
[test_fileapi.html]
|
||||
[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</title>
|
||||
<title>Test for File API + Slice (in file)</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,11 +17,7 @@
|
|||
|
||||
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 => {
|
||||
|
@ -30,14 +26,7 @@ createCanvasURL()
|
|||
})
|
||||
|
||||
.then(file => {
|
||||
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");
|
||||
return testSlice(file, canvasData.length, "", canvasData, "fileFile");
|
||||
})
|
||||
|
||||
.then(SimpleTest.finish);
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
<!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>
|
Загрузка…
Ссылка в новой задаче