2010-10-14 03:25:33 +04:00
|
|
|
<!DOCTYPE HTML>
|
|
|
|
<html>
|
|
|
|
<head>
|
2017-10-17 14:21:39 +03:00
|
|
|
<title>Test for File API + Slice (in file)</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>
|
2010-10-14 03:25:33 +04:00
|
|
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
2017-10-17 14:21:39 +03:00
|
|
|
|
2010-10-14 03:25:33 +04:00
|
|
|
<p id="display">
|
2012-01-23 05:08:17 +04:00
|
|
|
<canvas id=canvas width=1100 height=1100 hidden moz-opaque></canvas>
|
2010-10-14 03:25:33 +04:00
|
|
|
</p>
|
|
|
|
|
2017-10-17 14:21:39 +03:00
|
|
|
<script type="text/javascript">
|
2017-10-17 14:21:38 +03:00
|
|
|
|
2010-10-14 03:25:33 +04:00
|
|
|
SimpleTest.waitForExplicitFinish();
|
2017-10-17 14:21:39 +03:00
|
|
|
SimpleTest.requestLongerTimeout(4);
|
2010-10-14 03:25:33 +04:00
|
|
|
|
2017-10-17 14:21:39 +03:00
|
|
|
let canvasData;
|
2010-10-14 03:25:33 +04:00
|
|
|
|
2017-10-17 14:21:39 +03:00
|
|
|
createCanvasURL()
|
|
|
|
.then(data => {
|
|
|
|
canvasData = data;
|
2017-10-17 14:21:39 +03:00
|
|
|
return createFile(data, "basicTestFile1");
|
2017-10-17 14:21:39 +03:00
|
|
|
})
|
2015-11-19 21:24:20 +03:00
|
|
|
|
2017-10-17 14:21:39 +03:00
|
|
|
.then(file => {
|
2017-10-17 14:21:39 +03:00
|
|
|
return testSlice(file, canvasData.length, "", canvasData, "fileFile", RANGE_1);
|
2017-10-17 14:21:39 +03:00
|
|
|
})
|
2015-11-19 21:24:20 +03:00
|
|
|
|
2017-10-17 14:21:39 +03:00
|
|
|
.then(SimpleTest.finish);
|
2010-10-14 03:25:33 +04:00
|
|
|
|
|
|
|
</script>
|
2015-11-19 21:24:20 +03:00
|
|
|
</body>
|
|
|
|
</html>
|