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

Unified Diff: LayoutTests/fast/dom/custom/type-extensions.html

Issue 984523003: bindings: Moves most of DOM attributes to prototype chains. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated test results. Created 5 years, 9 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 | « no previous file | LayoutTests/http/tests/inspector/tracing/timeline-xhr-event-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1fd4a82c851fabbd17a9bcc217ac79c4f7052885..d19c36ed54bd35d4d77fcdf8b9ad1651898f8e94 100644
--- a/LayoutTests/fast/dom/custom/type-extensions.html
+++ b/LayoutTests/fast/dom/custom/type-extensions.html
@@ -3,6 +3,9 @@
<script src="../../../resources/testharnessreport.js"></script>
<body>
<script>
+var outerHTML = Object.getOwnPropertyDescriptor(Element.prototype, 'outerHTML');
+var tagName = Object.getOwnPropertyDescriptor(Element.prototype, 'tagName');
+
test(function() {
var p = Object.create(HTMLDivElement.prototype);
var C = document.registerElement('x-div', {extends: 'div', prototype: p});
@@ -17,7 +20,7 @@ test(function() {
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>',
+ assert_equals(outerHTML.get.call(e), '<em is="x-em">Hi!</em>',
'the type extension must not depend on the author-' +
'specified prototype');
}, 'register a type extension with a non-element prototype');
@@ -44,14 +47,14 @@ test(function() {
test(function() {
var C = document.registerElement('x-augment', {extends: 'ins', prototype: {}});
- assert_equals(new C().outerHTML, '<ins is="x-augment"></ins>');
+ assert_equals(outerHTML.get.call(new C()), '<ins is="x-augment"></ins>');
var D = document.registerElement('x-elide', {extends: 'del', prototype: {}});
- assert_equals(new D().outerHTML, '<del is="x-elide"></del>');
+ assert_equals(outerHTML.get.call(new D()), '<del is="x-elide"></del>');
}, 'register a type extensions of an interface with multiple element names');
test(function() {
var C = document.registerElement('x-ins', {extends: 'InS', prototype: {}});
- assert_equals(new C().tagName, 'INS',
+ assert_equals(tagName.get.call(new C()), 'INS',
'tag name should be that of the base element');
}, 'register a type extension with unusual case');
« no previous file with comments | « no previous file | LayoutTests/http/tests/inspector/tracing/timeline-xhr-event-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698