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

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

Issue 319263002: Add "created-watcher" to the web_components package. This was adapted from (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
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta http-equiv="X-UA-Compatible" content="IE=edge">
5 <meta name="dart.unittest" content="full-stack-traces">
6 <title> interop_test.html </title>
7 <style>
8 .unittest-table { font-family:monospace; border:1px; }
9 .unittest-pass { background: #6b3;}
10 .unittest-fail { background: #d55;}
11 .unittest-error { background: #a11;}
12 </style>
13 <script src="/packages/web_components/platform.js"></script>
14 <script src="/packages/web_components/dart_support.js"></script>
15 </head>
16 <body>
17 <h1> Running interop_test </h1>
18 <script>
19 var counter = 0;
20 var A = function() {};
21 A.prototype = Object.create(HTMLElement.prototype);
22 A.prototype.inc = function() { this.x = counter++; };
23 A.prototype.createdCallback = function() { this.inc(); };
24
25 var B = function() {};
26 B.prototype = Object.create(HTMLDivElement.prototype);
27 B.prototype.createdCallback = function() { this.x = counter++; };
28 B.extends = 'div';
29
30 document.registerElement('x-a', A);
31 document.registerElement('x-b', B);
32
33 function registerC() {
34 var proto = Object.create(HTMLElement.prototype, {
35 inc: { value: function() { this.x = counter++; } },
36 createdCallback: {
37 value: function() { this.inc(); },
38 configurable: true},
39 });
40 document.registerElement('x-c', {prototype: proto});
41 }
42 function addA() {
43 document.body.appendChild(document.createElement('x-a'));
44 }
45 function addB() {
46 document.body.appendChild(document.createElement('div', 'x-b'));
47 }
48 function addC() {
49 document.body.appendChild(document.createElement('x-c'));
50 }
51 </script>
52 <x-a id="i1"></x-a>
53 <div is="x-b" id="i2"></div>
54 <x-c id="i3"></x-b>
55 <script type="text/javascript"
56 src="/root_dart/tools/testing/dart/test_controller.js"></script>
57 %TEST_SCRIPTS%
58 </body>
59 </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