Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: LayoutTests/fast/files/blob-parts-slice-test.html

Issue 57483002: Implement File constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressed feedback on tests. Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../js/resources/js-test-pre.js"></script>
5 <script src="resources/blob-slice-common.js"></script>
6 <script>
7 description("Test the Blob.slice() behavior for Blobs made of multiple parts.");
8
9 var sliceTestCases = [
10 [2, 3, "2"],
11 [2, 12, "23456789"],
12 [2, 2, ""],
13 [2, 1, ""],
14 [2, -12, ""],
15 [2, 2147483647, "23456789"],
16 [2, -2147483648, ""],
17 [2, 9223372036854775000, "23456789"],
18 [2, -9223372036854775000, ""],
19 [-2, -1, "8"],
20 [-2, -2, ""],
21 [-2, -3, ""],
22 [-2, -12, ""],
23 [-2, 2147483647, "89"],
24 [-2, -2147483648, ""],
25 [-2, 9223372036854775000, "89"],
26 [-2, -9223372036854775000, ""],
27 [0, null, "0123456789"],
28 [2, null, "23456789"],
29 [-2, null, "89"],
30 [12, null, ""],
31 [-12, null, "0123456789"],
32 [2147483647, null, ""],
33 [-2147483648, null, "0123456789"],
34 [9223372036854775000, null, ""],
35 [-9223372036854775000, null, "0123456789"],
36 [null, null, "0123456789"],
37 ];
38
39 function runTests()
40 {
41 blob = new Blob(["0", new File(["12"], "slice-piece.txt"),
42 new Blob(["345"]), "6789"]);
43 file = new File(["0", new File(["12"], "slice-piece.txt"),
44 new Blob(["345"]), "6789"], "slice-text.txt");
45
46 runNextTest();
47 }
48
49 window.jsTestIsAsync = true;
50 </script>
51 </head>
52 <body onload="runTests()">
53 <pre id='console'></pre>
54 </body>
55 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698