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

Unified Diff: LayoutTests/fast/dom/custom/element-upgrade.html

Issue 23717043: Implement Custom Elements 'extends' option. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/dom/custom/element-type.html ('k') | LayoutTests/fast/dom/custom/isolated-world.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c0ac9ab159c49d0d67752ae49cf96cac0733eb1a..19ae7250df10fde6ba8b28707b740ec540413e12 100644
--- a/LayoutTests/fast/dom/custom/element-upgrade.html
+++ b/LayoutTests/fast/dom/custom/element-upgrade.html
@@ -26,14 +26,14 @@ var callCount = 0;
proto.createdCallback = function () {
callCount++;
};
-var B = document.register('x-b', {prototype: proto});
+var B = document.register('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', {prototype: Object.create(HTMLSpanElement.prototype)});
+var C = document.register('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', {prototype: Object.create(HTMLDivElement.prototype)});
+var D = document.register('x-d', {extends: 'div', prototype: Object.create(HTMLDivElement.prototype)});
shouldBeFalse('host.firstChild instanceof D');
shouldBe('document.querySelector(":unresolved")', 'host.firstChild');
« no previous file with comments | « LayoutTests/fast/dom/custom/element-type.html ('k') | LayoutTests/fast/dom/custom/isolated-world.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698