2017-10-17 14:21:39 +03:00
|
|
|
<!DOCTYPE HTML>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>Test for File API + Slice (in memory)</title>
|
2019-04-16 06:53:28 +03:00
|
|
|
<script src="/tests/SimpleTest/SimpleTest.js"></script>
|
2017-10-17 14:21:39 +03:00
|
|
|
<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();
|
2017-10-17 14:21:39 +03:00
|
|
|
SimpleTest.requestLongerTimeout(4);
|
2017-10-17 14:21:39 +03:00
|
|
|
|
|
|
|
createCanvasURL()
|
|
|
|
.then(data => {
|
|
|
|
let cx = $("canvas").getContext('2d');
|
|
|
|
let memFile = cx.canvas.mozGetAsFile("image/png");
|
2017-10-17 14:21:39 +03:00
|
|
|
return testSlice(memFile, data.length, "image/png", data, "memFile", RANGE_2);
|
2017-10-17 14:21:39 +03:00
|
|
|
})
|
|
|
|
|
|
|
|
.then(SimpleTest.finish);
|
|
|
|
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|