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

Side by Side Diff: LayoutTests/fast/dom/custom/default-prototype.html

Issue 117313008: Update Custom Elements API to new names. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update for forgotten tests. Created 7 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../../../resources/testharness.js"></script> 2 <script src="../../../resources/testharness.js"></script>
3 <script src="../../../resources/testharnessreport.js"></script> 3 <script src="../../../resources/testharnessreport.js"></script>
4 <body> 4 <body>
5 <script> 5 <script>
6 test(function () { 6 test(function () {
7 var A = document.register('x-a'); 7 var A = document.registerElement('x-a');
8 assert_equals(A.prototype.constructor, A, 8 assert_equals(A.prototype.constructor, A,
9 'the default prototype\'s constructor should be the ' + 9 'the default prototype\'s constructor should be the ' +
10 'generated constructor'); 10 'generated constructor');
11 11
12 assert_true(A.prototype instanceof HTMLElement, 12 assert_true(A.prototype instanceof HTMLElement,
13 'the default prototype should be HTMLElement'); 13 'the default prototype should be HTMLElement');
14 14
15 function m() { } 15 function m() { }
16 A.prototype.myMethod = m; 16 A.prototype.myMethod = m;
17 var x = new A(); 17 var x = new A();
18 assert_equals(x.myMethod, m, 18 assert_equals(x.myMethod, m,
19 'the element should get methods from the default prototype'); 19 'the element should get methods from the default prototype');
20 }, 'a default prototype object should be provided if one is not specified'); 20 }, 'a default prototype object should be provided if one is not specified');
21 </script> 21 </script>
OLDNEW
« no previous file with comments | « LayoutTests/fast/dom/custom/created-callback.html ('k') | LayoutTests/fast/dom/custom/document-register-basic.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698