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

Side by Side Diff: pkg/web_components/test/interop_test.html

Issue 341003002: web_components: fix extending another custom element (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/web_components/test/interop_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 4 <meta http-equiv="X-UA-Compatible" content="IE=edge">
5 <meta name="dart.unittest" content="full-stack-traces"> 5 <meta name="dart.unittest" content="full-stack-traces">
6 <title> interop_test.html </title> 6 <title> interop_test.html </title>
7 <style> 7 <style>
8 .unittest-table { font-family:monospace; border:1px; } 8 .unittest-table { font-family:monospace; border:1px; }
9 .unittest-pass { background: #6b3;} 9 .unittest-pass { background: #6b3;}
10 .unittest-fail { background: #d55;} 10 .unittest-fail { background: #d55;}
(...skipping 14 matching lines...) Expand all
25 var B = function() {}; 25 var B = function() {};
26 B.prototype = Object.create(HTMLDivElement.prototype); 26 B.prototype = Object.create(HTMLDivElement.prototype);
27 B.prototype.createdCallback = function() { this.x = counter++; }; 27 B.prototype.createdCallback = function() { this.x = counter++; };
28 B.extends = 'div'; 28 B.extends = 'div';
29 29
30 var D = function() {}; 30 var D = function() {};
31 D.prototype = Object.create(HTMLElement.prototype); 31 D.prototype = Object.create(HTMLElement.prototype);
32 D.prototype.inc = function() { this.x = counter++; }; 32 D.prototype.inc = function() { this.x = counter++; };
33 D.prototype.createdCallback = function() { this.inc(); }; 33 D.prototype.createdCallback = function() { this.inc(); };
34 34
35 var E = { prototype: Object.create(D.prototype) };
36 E.prototype.inc2 = function() {
37 this.y = counter++;
38 };
39 E.prototype.createdCallback = function() {
40 D.prototype.createdCallback.call(this);
41 this.inc2();
42 };
43
35 document.registerElement('x-a', A); 44 document.registerElement('x-a', A);
36 document.registerElement('x-b', B); 45 document.registerElement('x-b', B);
37 document.registerElement('x-d', D); 46 document.registerElement('x-d', D);
47 document.registerElement('x-e', E);
38 48
39 function registerC() { 49 function registerC() {
40 var proto = Object.create(HTMLElement.prototype, { 50 var proto = Object.create(HTMLElement.prototype, {
41 inc: { value: function() { this.x = counter++; } }, 51 inc: { value: function() { this.x = counter++; } },
42 createdCallback: { 52 createdCallback: {
43 value: function() { this.inc(); }, 53 value: function() { this.inc(); },
44 configurable: true}, 54 configurable: true},
45 }); 55 });
46 document.registerElement('x-c', {prototype: proto}); 56 document.registerElement('x-c', {prototype: proto});
47 } 57 }
48 function addA() { 58 function addA() {
49 document.body.appendChild(document.createElement('x-a')); 59 document.body.appendChild(document.createElement('x-a'));
50 } 60 }
51 function addB() { 61 function addB() {
52 document.body.appendChild(document.createElement('div', 'x-b')); 62 document.body.appendChild(document.createElement('div', 'x-b'));
53 } 63 }
54 function addC() { 64 function addC() {
55 document.body.appendChild(document.createElement('x-c')); 65 document.body.appendChild(document.createElement('x-c'));
56 } 66 }
57 function addD() { 67 function addD() {
58 document.body.appendChild(document.createElement('x-d')); 68 document.body.appendChild(document.createElement('x-d'));
59 } 69 }
70 function addE() {
71 document.body.appendChild(document.createElement('x-e'));
72 }
60 </script> 73 </script>
61 <x-a id="i1"></x-a> 74 <x-a id="i1"></x-a>
62 <div is="x-b" id="i2"></div> 75 <div is="x-b" id="i2"></div>
63 <x-c id="i3"></x-c> 76 <x-c id="i3"></x-c>
64 <x-d id="i4"></x-d> 77 <x-d id="i4"></x-d>
65 <script type="text/javascript" 78 <script type="text/javascript"
66 src="/root_dart/tools/testing/dart/test_controller.js"></script> 79 src="/root_dart/tools/testing/dart/test_controller.js"></script>
67 %TEST_SCRIPTS% 80 %TEST_SCRIPTS%
68 </body> 81 </body>
69 </html> 82 </html>
OLDNEW
« no previous file with comments | « pkg/web_components/test/interop_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698