| Index: LayoutTests/fast/files/file-constructor.html
|
| diff --git a/LayoutTests/fast/files/file-constructor.html b/LayoutTests/fast/files/file-constructor.html
|
| index f615864f75e496d559deab8828f0874b669cf0b7..5e1af2391b9f960a7708883da8c6460c8586fba9 100644
|
| --- a/LayoutTests/fast/files/file-constructor.html
|
| +++ b/LayoutTests/fast/files/file-constructor.html
|
| @@ -69,6 +69,8 @@ shouldThrow("new File([], 'world.html', {endings:'illegalValue'})", "'TypeError:
|
| shouldThrow("new File([], 'world.html', {endings:throwingObj})", "'Error'");
|
| shouldThrow("new File([], 'world.html', {type:throwingObj})", "'Error'");
|
| shouldThrow("new File([], 'world.html', {type:'hello\u00EE'})", "'SyntaxError: Failed to construct \\'File\\': The \"type\" property must consist of ASCII characters.'");
|
| +shouldThrow("new File([], 'world.html', {lastModifiedDate: 'not a date'})", "'SyntaxError: Failed to construct \\'File\\': The \"lastModifiedDate\" property must be a Date instance.'");
|
| +shouldThrow("new File([], 'world.html', {lastModifiedDate: null})", "'SyntaxError: Failed to construct \\'File\\': The \"lastModifiedDate\" property must be a Date instance.'");
|
|
|
| // Test various non-object literals being used as property bags.
|
| shouldThrow("(new File([], 'world.html', null)) instanceof window.File", "'TypeError: Failed to construct \\'File\\': The 3rd argument is not of type Object.'");
|
| @@ -87,6 +89,14 @@ shouldBe("(new File([], 'world.html', {type:'text/html'})).type", "'text/html'")
|
| shouldBe("(new File([], 'world.html', {type:'text/html'})).size", "0");
|
| shouldBe("(new File([], 'world.html', {type:'text/plain;charset=UTF-8'})).type", "'text/plain;charset=utf-8'");
|
|
|
| +// Test that the lastModificationDate is correctly added to the File.
|
| +var aDate = new Date(441532800000);
|
| +shouldBeTrue("(new File([], 'world.html', {lastModifiedDate: aDate})).lastModifiedDate instanceof Date");
|
| +shouldBe("(new File([], 'world.html', {lastModifiedDate: aDate})).lastModifiedDate.valueOf()", "aDate.valueOf()");
|
| +shouldBeTrue("(new File([], 'world.html', {lastModifiedDate: 441532800000})).lastModifiedDate instanceof Date");
|
| +shouldBe("(new File([], 'world.html', {lastModifiedDate: 441532800000})).lastModifiedDate.valueOf()", "aDate.valueOf()");
|
| +shouldBeTrue("Math.abs(Date.now() - (new File([], 'world.html')).lastModifiedDate) <= 1000"); // Unless specified, lastModifiedDate should default to now.
|
| +
|
| // Test the number of expected arguments in the File constructor.
|
| shouldBe("window.File.length", "2");
|
|
|
|
|