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

Side by Side Diff: LayoutTests/fast/dom/DOMError-constructor.html

Issue 254823007: Make DOMError constructible (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaseline additional test Created 6 years, 7 months 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/fast/dom/DOMError-constructor-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 <link rel="help" href="http://dom.spec.whatwg.org/#dom-domerror">
5 <script src="../../resources/js-test.js"></script>
6 </head>
7 <body>
8 <script>
9 description("Tests that DOMError is constructible.");
10
11 var error;
12
13 // Passing 2 arguments.
14 shouldNotThrow("error = new DOMError('NotFoundError', 'This item was not found.' )");
15 shouldBeEqualToString("error.name", "NotFoundError");
16 shouldBeEqualToString("error.message", "This item was not found.");
17
18 // Passing 1 argument. Default value for the second argument should be the empty string.
19 shouldNotThrow("error = new DOMError('IndexSizeError')");
20 shouldBeEqualToString("error.name", "IndexSizeError");
21 shouldBeEqualToString("error.message", "");
22
23 // Not passing any argument. First argument should be mandatory.
24 shouldThrow("new DOMError()", '"TypeError: Failed to construct \'DOMError\': 1 a rgument required, but only 0 present."');
25 </script>
26 </body>
27 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/DOMError-constructor-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698