Index: LayoutTests/fast/dom/custom/element-upgrade.html |
diff --git a/LayoutTests/fast/dom/custom/element-upgrade.html b/LayoutTests/fast/dom/custom/element-upgrade.html |
index 19775d0c2e493d34508b3d661b3ebe10e773ee81..73b10e5e827447634f77036d7b926f54d159e002 100644 |
--- a/LayoutTests/fast/dom/custom/element-upgrade.html |
+++ b/LayoutTests/fast/dom/custom/element-upgrade.html |
@@ -14,7 +14,7 @@ description('Tests the element upgrade algorithm.'); |
// time; custom element does not have a created callback. |
var host = document.createElement('div'); |
host.innerHTML = '<x-a></x-a>'; // Using innerHTML avoids wrapping x-a |
-var A = document.register('x-a', {prototype: Object.create(HTMLElement.prototype)}); |
+var A = document.registerElement('x-a', {prototype: Object.create(HTMLElement.prototype)}); |
shouldBeTrue('host.firstChild instanceof A'); |
// Scenario B: Type extension; upgrade candidate is in the document; |
@@ -26,14 +26,14 @@ var callCount = 0; |
proto.createdCallback = function () { |
callCount++; |
}; |
-var B = document.register('x-b', {extends: 'span', prototype: proto}); |
+var B = document.registerElement('x-b', {extends: 'span', prototype: proto}); |
shouldBeTrue('element instanceof B'); |
shouldBe('callCount', '1'); |
// Scenario C: The candidate is a custom tag but the definition is a |
// type extension. Upgrade should not happen. |
element = document.createElement('x-c'); |
-var C = document.register('x-c', {extends: 'span', prototype: Object.create(HTMLSpanElement.prototype)}); |
+var C = document.registerElement('x-c', {extends: 'span', prototype: Object.create(HTMLSpanElement.prototype)}); |
shouldBeFalse('element instanceof C'); |
shouldBe('Object.getPrototypeOf(element)', 'HTMLElement.prototype'); |
@@ -41,7 +41,7 @@ shouldBe('Object.getPrototypeOf(element)', 'HTMLElement.prototype'); |
// extends a different tag. Upgrade should not happen. |
document.body.appendChild(host); |
host.innerHTML = '<span is="x-d"></span>'; |
-var D = document.register('x-d', {extends: 'div', prototype: Object.create(HTMLDivElement.prototype)}); |
+var D = document.registerElement('x-d', {extends: 'div', prototype: Object.create(HTMLDivElement.prototype)}); |
shouldBeFalse('host.firstChild instanceof D'); |
shouldBe('document.querySelector(":unresolved")', 'host.firstChild'); |
@@ -51,7 +51,7 @@ host.innerHTML = '<x-e id="e1"><x-e id="e2"></x-e></x-e><x-e id="e3"></x-e><x-e |
var upgradedOrder = []; |
var protoE = Object.create(HTMLElement.prototype); |
protoE.createdCallback = function() { upgradedOrder.push(this.id); }; |
-document.register('x-e', {prototype: protoE}); |
+document.registerElement('x-e', {prototype: protoE}); |
shouldBe('upgradedOrder', '["e1","e2","e3","e4","e5"]'); |
successfullyParsed = true; |