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

Unified Diff: LayoutTests/fast/files/file-constructor.html

Issue 111373003: Migrate bindings constructors to the new ExceptionState model. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Ugh. 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/files/file-constructor.html
diff --git a/LayoutTests/fast/files/file-constructor.html b/LayoutTests/fast/files/file-constructor.html
index 91b5cf8a307a15c7d2bcf03c6459b76dcce9cb5d..6561421b0fff2fcdfe00d37d9715a128f87fd992 100644
--- a/LayoutTests/fast/files/file-constructor.html
+++ b/LayoutTests/fast/files/file-constructor.html
@@ -16,8 +16,8 @@ shouldBeTrue("(new File(['hello'], 'world.html', {type:'text/html', endings:'tra
shouldBeTrue("(new File([], 'world.html')) instanceof window.File")
// Verify that the file name argument is required.
-shouldThrow("(new File())", "'TypeError: File constructor requires at least two arguments'");
-shouldThrow("(new File([]))", "'TypeError: File constructor requires at least two arguments'");
+shouldThrow("(new File())", '"TypeError: Failed to construct \'File\': 2 arguments required, but only 0 present."');
+shouldThrow("(new File([]))", '"TypeError: Failed to construct \'File\': 2 arguments required, but only 1 present."');
// Test valid file names.
shouldBeTrue("(new File([], null)) instanceof window.File");
@@ -65,10 +65,10 @@ shouldThrow("(new File([], throwingObj)).name", "'Error'");
// Test some invalid property bags.
shouldBeTrue("(new File([], 'world.html', {unknownKey:'value'})) instanceof window.File"); // Ignore invalid keys
-shouldThrow("new File([], 'world.html', {endings:'illegalValue'})", "'TypeError: Failed to construct \\'File\\': The \"endings\" property must be either \"transparent\" or \"native\".'");
+shouldThrow("new File([], 'world.html', {endings:'illegalValue'})", "'TypeError: Failed to construct \\'File\\': The \\'endings\\' property must be either \\'transparent\\' or \\'native\\'.'");
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', {type:'hello\u00EE'})", "'SyntaxError: Failed to construct \\'File\\': The \\'type\\' property must consist of ASCII characters.'");
// 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.'");
@@ -144,7 +144,7 @@ shouldBe("new File({length: 0}, 'world.txt').size", "0");
shouldBe("new File({length: 1, 0: 'string'}, 'world.txt').size", "6");
shouldBe("new File({length: 2, 0: new Uint8Array(100), 1: new Int16Array(100)}, 'world.txt').size", "300");
shouldBe("new File({length: 1, 0: 'string'}, 'world.txt', {type: 'text/html'}).type", "'text/html'");
-shouldThrow("new File({length: 0}, 'world.txt', {endings:'illegal'})", "'TypeError: Failed to construct \\'File\\': The \"endings\" property must be either \"transparent\" or \"native\".'");
+shouldThrow("new File({length: 0}, 'world.txt', {endings:'illegal'})", "'TypeError: Failed to construct \\'File\\': The \\'endings\\' property must be either \\'transparent\\' or \\'native\\'.'");
// Test passing blog parts in a sequence-like object that throws on property access.
var throwingSequence = {length: 4, 0: 'hello', 3: 'world'};
« no previous file with comments | « LayoutTests/fast/files/blob-constructor-expected.txt ('k') | LayoutTests/fast/files/file-constructor-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698