Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / files / file-reader-methods-illegal-arguments.html
blob0ab900b1dc007f2e926bb4b7cb4f1a3b95228cea
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.");
11 if (window.testRunner)
12 testRunner.dumpAsText();
14 var blob = new Blob(["aa"]);
15 var fileReader;
16 var method;
17 function testReadMethod(name)
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)");
29 var methods = [ "readAsArrayBuffer", "readAsBinaryString", "readAsText", "readAsDataURL" ];
31 methods.forEach(function (m) { testReadMethod(m); });
33 </script>
34 </body>
35 </html>