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

Side by Side Diff: LayoutTests/fast/files/file-reader-methods-illegal-arguments.html

Issue 114953006: Add missing FileReader argument typechecking. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years 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
« no previous file with comments | « no previous file | LayoutTests/fast/files/file-reader-methods-illegal-arguments-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!doctype html>
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <pre id='console'></pre>
8 <script>
9 description("Test FileReader methods and their argument type checking.");
10
11 if (window.testRunner)
12 testRunner.dumpAsText();
13
14 var blob = new Blob(["aa"]);
15 var fileReader;
16 var method;
17 function testReadMethod(name)
18 {
19 fileReader = new FileReader();
20 shouldThrow("fileReader." + name + "();");
21 shouldThrow("fileReader." + name + "(2);");
22 shouldThrow("fileReader." + name + "(null)");
23 shouldThrow("fileReader." + name + "(fileReader)");
24 shouldThrow("fileReader." + name + "([])");
25 shouldNotThrow("fileReader." + name + "(blob, 'utf-8')");
26 shouldThrow("fileReader." + name + "(blob)");
27 }
28
29 var methods = [ "readAsArrayBuffer", "readAsBinaryString", "readAsText", "readAs DataURL" ];
30
31 methods.forEach(function (m) { testReadMethod(m); });
32
33 </script>
34 </body>
35 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/files/file-reader-methods-illegal-arguments-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698