summaryrefslogtreecommitdiffstats
path: root/dom/tests
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2020-01-04 18:59:37 -0500
committerGaming4JC <g4jc@hyperbola.info>2020-01-26 15:50:17 -0500
commit9d51b9d06a16b4725e4540a6424c71f6a1ee94c3 (patch)
tree2d34a6be09f37edf133ccbad415c7f24924b2bc9 /dom/tests
parente86aac28b8f450cc99836b07a5c0ffddb59f222f (diff)
downloadUXP-9d51b9d06a16b4725e4540a6424c71f6a1ee94c3.tar
UXP-9d51b9d06a16b4725e4540a6424c71f6a1ee94c3.tar.gz
UXP-9d51b9d06a16b4725e4540a6424c71f6a1ee94c3.tar.lz
UXP-9d51b9d06a16b4725e4540a6424c71f6a1ee94c3.tar.xz
UXP-9d51b9d06a16b4725e4540a6424c71f6a1ee94c3.zip
Creating customized built-in elements without relevant definitions registered first shouldn't throw NotFoundError;
per spec change: https://github.com/w3c/webcomponents/issues/608 Tag UXP Issue #1344
Diffstat (limited to 'dom/tests')
-rw-r--r--dom/tests/mochitest/webcomponents/test_document_register.html40
1 files changed, 0 insertions, 40 deletions
diff --git a/dom/tests/mochitest/webcomponents/test_document_register.html b/dom/tests/mochitest/webcomponents/test_document_register.html
index a9c194b60..aa80fef5f 100644
--- a/dom/tests/mochitest/webcomponents/test_document_register.html
+++ b/dom/tests/mochitest/webcomponents/test_document_register.html
@@ -103,52 +103,12 @@ function startTest() {
is(extendedButton.getAttribute("is"), "x-extended-button", "The |is| attribute of the created element should be the extended type.");
is(extendedButton.type, "submit", "Created element should be a button with type of \"submit\"");
- // document.createElementNS with different namespace than definition.
- try {
- var svgButton = document.createElementNS("http://www.w3.org/2000/svg", "button", {is: "x-extended-button"});
- ok(false, "An exception should've been thrown");
- } catch(err) {
- is(err.name, "NotFoundError", "A NotFoundError exception should've been thrown");
- }
-
- // document.createElementNS with no namespace.
- try {
- var noNamespaceButton = document.createElementNS("", "button", {is: "x-extended-button"});
- ok(false, "An exception should've been thrown");
- } catch(err) {
- is(err.name, "NotFoundError", "A NotFoundError exception should've been thrown");
- }
-
- // document.createElement with non-existant extended type.
- try {
- var normalButton = document.createElement("button", {is: "x-non-existant"});
- ok(false, "An exception should've been thrown");
- } catch(err) {
- is(err.name, "NotFoundError", "A NotFoundError exception should've been thrown");
- }
-
- // document.createElement with exteneded type that does not match with local name of element.
- try {
- var normalDiv = document.createElement("div", {is: "x-extended-button"});
- ok(false, "An exception should've been thrown");
- } catch(err) {
- is(err.name, "NotFoundError", "A NotFoundError exception should've been thrown");
- }
-
// Custom element constructor.
var constructedButton = new buttonConstructor();
is(constructedButton.tagName, "BUTTON", "Created element should have local name of BUTTON");
is(constructedButton.__proto__, extendedProto, "Created element should have the prototype of the extended type.");
is(constructedButton.getAttribute("is"), "x-extended-button", "The |is| attribute of the created element should be the extended type.");
- // document.createElement with different namespace than definition for extended element.
- try {
- var htmlText = document.createElement("text", {is: "x-extended-text"});
- ok(false, "An exception should've been thrown");
- } catch(err) {
- is(err.name, "NotFoundError", "A NotFoundError exception should've been thrown");
- }
-
// Try creating an element with a custom element name, but not in the html namespace.
var htmlNamespaceProto = Object.create(HTMLElement.prototype);
document.registerElement("x-in-html-namespace", { prototype: htmlNamespaceProto });