OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <meta charset=utf-8> | 2 <meta charset=utf-8> |
3 <title>File constructor</title> | 3 <title>File constructor</title> |
4 <link rel=help href="http://dev.w3.org/2006/webapi/FileAPI/#dfn-file"> | 4 <link rel=help href="http://dev.w3.org/2006/webapi/FileAPI/#dfn-file"> |
5 <script src="../../../../resources/testharness.js"></script> | 5 <script src="../../../../resources/testharness.js"></script> |
6 <script src="../../../../resources/testharnessreport.js"></script> | 6 <script src="../../../../resources/testharnessreport.js"></script> |
7 <div id="log"></div> | 7 <div id="log"></div> |
8 <script> | 8 <script> |
9 test(function() { | 9 test(function() { |
10 assert_true("File" in window, "window should have a File property."); | 10 assert_true("File" in window, "window should have a File property."); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 assert_true(file instanceof File); | 63 assert_true(file instanceof File); |
64 assert_equals(file.lastModified, 42); | 64 assert_equals(file.lastModified, 42); |
65 }, "Using lastModified"); | 65 }, "Using lastModified"); |
66 test(function() { | 66 test(function() { |
67 var file = new File(["bits"], "dummy", { name: "foo" }); | 67 var file = new File(["bits"], "dummy", { name: "foo" }); |
68 assert_true(file instanceof File); | 68 assert_true(file instanceof File); |
69 assert_equals(file.name, "dummy"); | 69 assert_equals(file.name, "dummy"); |
70 }, "Misusing name"); | 70 }, "Misusing name"); |
71 | 71 |
72 </script> | 72 </script> |
OLD | NEW |