Index: LayoutTests/fast/dom/custom/type-extensions.html |
diff --git a/LayoutTests/fast/dom/custom/type-extensions.html b/LayoutTests/fast/dom/custom/type-extensions.html |
index 265593435f5194e371d79c00624baf1e6279c004..3506d7c0d4ea25c1752c496329a74c7deb941bab 100644 |
--- a/LayoutTests/fast/dom/custom/type-extensions.html |
+++ b/LayoutTests/fast/dom/custom/type-extensions.html |
@@ -5,7 +5,7 @@ |
<script> |
test(function() { |
var p = Object.create(HTMLDivElement.prototype); |
- var C = document.register('x-div', {extends: 'div', prototype: p}); |
+ var C = document.registerElement('x-div', {extends: 'div', prototype: p}); |
assert_equals(new C().outerHTML, '<div is="x-div"></div>', |
'type extensions should have an "is" attribute'); |
assert_equals(new C().tagName, 'DIV', |
@@ -14,7 +14,7 @@ test(function() { |
test(function() { |
var p = Object.create(Window.prototype); |
- var C = document.register('x-em', {extends: 'em', prototype: p}); |
+ var C = document.registerElement('x-em', {extends: 'em', prototype: p}); |
var e = new C(); |
Node.prototype.appendChild.call(e, document.createTextNode('Hi!')); |
assert_equals(e.outerHTML, '<em is="x-em">Hi!</em>', |
@@ -24,33 +24,33 @@ test(function() { |
test(function() { |
var p = Object.create(HTMLUnknownElement.prototype); |
- var C = document.register('x-unknown', {extends: 'unknown', prototype: p}); |
+ var C = document.registerElement('x-unknown', {extends: 'unknown', prototype: p}); |
assert_equals(new C().outerHTML, '<unknown is="x-unknown"></unknown>'); |
}, 'register a type extension of an unknown element'); |
test(function() { |
// registering an SVG element requires an SVGElement prototype |
var p = Object.create(SVGElement.prototype); |
- var C = document.register('x-use', {extends: 'use', prototype: p}); |
+ var C = document.registerElement('x-use', {extends: 'use', prototype: p}); |
assert_equals(new C().namespaceURI, 'http://www.w3.org/2000/svg', |
'SVG type extensions should have the SVG namespace'); |
}, 'register a type extension of an SVG element'); |
test(function() { |
var p = Object.create(HTMLElement.prototype); |
- var C = document.register('x-sect', {extends: 'section', prototype: p}); |
+ var C = document.registerElement('x-sect', {extends: 'section', prototype: p}); |
assert_equals(new C().outerHTML, '<section is="x-sect"></section>'); |
}, 'register a type extension of an element whose interface is HTMLElement'); |
test(function() { |
- var C = document.register('x-augment', {extends: 'ins', prototype: {}}); |
+ var C = document.registerElement('x-augment', {extends: 'ins', prototype: {}}); |
assert_equals(new C().outerHTML, '<ins is="x-augment"></ins>'); |
- var D = document.register('x-elide', {extends: 'del', prototype: {}}); |
+ var D = document.registerElement('x-elide', {extends: 'del', prototype: {}}); |
assert_equals(new D().outerHTML, '<del is="x-elide"></del>'); |
}, 'register a type extensions of an interface with multiple element names'); |
test(function() { |
- var C = document.register('x-ins', {extends: 'InS', prototype: {}}); |
+ var C = document.registerElement('x-ins', {extends: 'InS', prototype: {}}); |
assert_equals(new C().tagName, 'INS', |
'tag name should be that of the base element'); |
}, 'register a type extension with unusual case'); |
@@ -60,7 +60,7 @@ test(function() { |
'INVALID_CHARACTER_ERR', |
function() { |
var p = Object.create(HTMLElement.prototype); |
- document.register('x-bespoke', {extends: 'x-spoke', prototype: p}); |
+ document.registerElement('x-bespoke', {extends: 'x-spoke', prototype: p}); |
}, |
'registering a type extension of a custom tag should fail'); |
}, 'registering a type extension of a custom tag should fail'); |