| Index: third_party/WebKit/LayoutTests/fast/dom/DOMImplementation/createDocumentType-err.html
|
| diff --git a/third_party/WebKit/LayoutTests/fast/dom/DOMImplementation/createDocumentType-err.html b/third_party/WebKit/LayoutTests/fast/dom/DOMImplementation/createDocumentType-err.html
|
| index e078460162dd60090df0059d50933c6874bf0b91..9fdaea61035f44849ef04e123b28ec090f8220a6 100644
|
| --- a/third_party/WebKit/LayoutTests/fast/dom/DOMImplementation/createDocumentType-err.html
|
| +++ b/third_party/WebKit/LayoutTests/fast/dom/DOMImplementation/createDocumentType-err.html
|
| @@ -4,6 +4,35 @@
|
| <script src="../../../resources/js-test.js"></script>
|
| </head>
|
| <body>
|
| -<script src="script-tests/createDocumentType-err.js"></script>
|
| +<script>
|
| +description("createDocument tests modelled after mozilla's testing");
|
| +
|
| +function ExpectedNotEnoughArgumentsMessage(num) {
|
| + return "\"TypeError: Failed to execute 'createDocumentType' on 'DOMImplementation': 3 arguments required, but only " + num + " present.\"";
|
| +}
|
| +
|
| +shouldThrow("document.implementation.createDocumentType('foo')", ExpectedNotEnoughArgumentsMessage(1));
|
| +shouldThrow("document.implementation.createDocumentType('foo', null)", ExpectedNotEnoughArgumentsMessage(2));
|
| +shouldThrow("document.implementation.createDocumentType(undefined, undefined)", ExpectedNotEnoughArgumentsMessage(2));
|
| +shouldThrow("document.implementation.createDocumentType(null, undefined)", ExpectedNotEnoughArgumentsMessage(2));
|
| +shouldThrow("document.implementation.createDocumentType(undefined, null)", ExpectedNotEnoughArgumentsMessage(2));
|
| +shouldNotThrow("document.implementation.createDocumentType(undefined, undefined, null)");
|
| +shouldThrow("document.implementation.createDocumentType(null, null)", ExpectedNotEnoughArgumentsMessage(2));
|
| +shouldThrow("document.implementation.createDocumentType(null, '')", ExpectedNotEnoughArgumentsMessage(2));
|
| +shouldThrow("document.implementation.createDocumentType('', null)", ExpectedNotEnoughArgumentsMessage(2));
|
| +shouldThrow("document.implementation.createDocumentType('', '')", ExpectedNotEnoughArgumentsMessage(2));
|
| +shouldThrow("document.implementation.createDocumentType('a:', null, null)", '"NamespaceError: Failed to execute \'createDocumentType\' on \'DOMImplementation\': The qualified name provided (\'a:\') has an empty local name."');
|
| +shouldThrow("document.implementation.createDocumentType(':foo', null, null)", '"NamespaceError: Failed to execute \'createDocumentType\' on \'DOMImplementation\': The qualified name provided (\':foo\') has an empty namespace prefix."');
|
| +shouldThrow("document.implementation.createDocumentType(':', null, null)", '"NamespaceError: Failed to execute \'createDocumentType\' on \'DOMImplementation\': The qualified name provided (\':\') has an empty namespace prefix."');
|
| +shouldNotThrow("document.implementation.createDocumentType('foo', null, null)");
|
| +shouldNotThrow("document.implementation.createDocumentType('foo:bar', null, null)");
|
| +shouldThrow("document.implementation.createDocumentType('foo::bar', null, null)", '"NamespaceError: Failed to execute \'createDocumentType\' on \'DOMImplementation\': The qualified name provided (\'foo::bar\') contains multiple colons."');
|
| +shouldThrow("document.implementation.createDocumentType('\t:bar', null, null)", '"InvalidCharacterError: Failed to execute \'createDocumentType\' on \'DOMImplementation\': The qualified name provided (\'\t:bar\') contains the invalid name-start character \'\t\'."');
|
| +shouldThrow("document.implementation.createDocumentType('foo:\t', null, null)", '"InvalidCharacterError: Failed to execute \'createDocumentType\' on \'DOMImplementation\': The qualified name provided (\'foo:\t\') contains the invalid name-start character \'\t\'."');
|
| +shouldThrow("document.implementation.createDocumentType('foo :bar', null, null)", '"InvalidCharacterError: Failed to execute \'createDocumentType\' on \'DOMImplementation\': The qualified name provided (\'foo :bar\') contains the invalid character \' \'."');
|
| +shouldThrow("document.implementation.createDocumentType('foo: bar', null, null)", '"InvalidCharacterError: Failed to execute \'createDocumentType\' on \'DOMImplementation\': The qualified name provided (\'foo: bar\') contains the invalid name-start character \' \'."');
|
| +shouldThrow("document.implementation.createDocumentType('a:b:c', null, null)", '"NamespaceError: Failed to execute \'createDocumentType\' on \'DOMImplementation\': The qualified name provided (\'a:b:c\') contains multiple colons."');
|
| +
|
| +</script>
|
| </body>
|
| </html>
|
|
|