| Index: LayoutTests/fast/files/blob-slice-test.html
|
| diff --git a/LayoutTests/fast/files/blob-slice-test.html b/LayoutTests/fast/files/blob-slice-test.html
|
| index 06fec6e4cbc5a427761a131a9f4908be0609185f..8ddad325952d6e5ded6e408594ac92643c48773a 100644
|
| --- a/LayoutTests/fast/files/blob-slice-test.html
|
| +++ b/LayoutTests/fast/files/blob-slice-test.html
|
| @@ -1,9 +1,8 @@
|
| <!DOCTYPE html>
|
| <html>
|
| <head>
|
| +<script src="resources/blob-slice-common.js"></script>
|
| <script>
|
| -var blob;
|
| -var testIndex = 0;
|
| var sliceParams = [
|
| [2, 3],
|
| [2, 12],
|
| @@ -34,55 +33,10 @@ var sliceParams = [
|
| [],
|
| ];
|
|
|
| -function log(message)
|
| -{
|
| - document.getElementById('console').appendChild(document.createTextNode(message + "\n"));
|
| -}
|
| -
|
| -function testSlicing(start, end)
|
| -{
|
| - var subBlob;
|
| - var reader = new FileReader();
|
| - var message = "Slicing ";
|
| - if (start == undefined && end == undefined) {
|
| - message += "without parameters";
|
| - subBlob = blob.slice();
|
| - } else if (end == undefined) {
|
| - message += "from " + start;
|
| - subBlob = blob.slice(start);
|
| - } else {
|
| - message += "from " + start + " to " + end;
|
| - subBlob = blob.slice(start, end);
|
| - }
|
| - message += ": ";
|
| - reader.onload = function(event) {
|
| - log(message + event.target.result);
|
| - runNextTest();
|
| - };
|
| - reader.onerror = function(event) {
|
| - log(message + "error " + event.target.error.code);
|
| - runNextTest();
|
| - };
|
| - reader.readAsText(subBlob);
|
| -}
|
| -
|
| -function runNextTest()
|
| -{
|
| - if (testIndex >= sliceParams.length) {
|
| - if (window.testRunner)
|
| - testRunner.notifyDone();
|
| - return;
|
| - }
|
| -
|
| - var start = sliceParams[testIndex][0];
|
| - var end = sliceParams[testIndex][1];
|
| - testIndex++;
|
| - testSlicing(start, end);
|
| -}
|
| -
|
| function runTests()
|
| {
|
| blob = new Blob(["0123456789"]);
|
| + file = new File(["0123456789"], "slice-test.txt");
|
|
|
| runNextTest();
|
| }
|
|
|